A FREE frequency generator if you have a Raspberry Pi

On a sunny day (Tue, 2 May 2017 05:13:03 -0700 (PDT)) it happened snipped-for-privacy@gmail.com wrote in :

Well, since I wrote that code, or at leat most if it, long ago, it was for the older Pi 2? New ones need code change. The compile warning is irrelevant. I do not have the latest Pi so no idea. What model do you use?

Reply to
Jan Panteltje
Loading thread data ...

not an error, a warning.

--
This email has not been checked by half-arsed antivirus software
Reply to
Jasen Betts

On a sunny day (Tue, 2 May 2017 05:13:03 -0700 (PDT)) it happened snipped-for-privacy@gmail.com wrote in :

PS, you do not come back it seems, but anyways somebody ported that code to a later raspi model ( I lost count of all those models:

formatting link
} Latest:
formatting link

It is fun to write code for something new, it gets boring after having to re-write it again and again each time a new sort of berry drops of the tree. I managed to get some older models...

Raspi foundation works against themselves that way. But you can't stop 'progress'. Although without ethernet? Not my idea of progress.. And now all its clones...

Reply to
Jan Panteltje

thanks guys, it is now working after reinstall the OS. thanks ps its a rsp2 2 years old

Reply to
sohbay2

Jan, does v0.7 work on an RPi 3B+? Per your instructions I have compiled it getting the warning and installed it and it is running, but there is no activity on GPIO4 (pin 7). sudo freq -f 200000 ==> I changed the name to freq

I am running Raspbian over Noobs whatever the latest builds are - I just loaded them. I am also a noobs so take that into consideration.

I originally loaded 0.2 but I don't know how to remove it (diff filename than 0.7). apt-get remove can't find the package. thanks

Reply to
bill.ruggirello

That message you're replying to is 6 years old! :-D

--
This message may be freely reproduced without limit or charge only via  
the Usenet protocol. Reproduction in whole or part through other  
protocols, whether for profit or not, is conditional upon a charge of  
GBP10.00 per reproduction. Publication in this manner via non-Usenet  
protocols constitutes acceptance of this condition.
Reply to
Cursitor Doom

Y'all should go out and purchase a cheap Chinese dual-channel Function Generator, like an MHS-5225A, or a FeelTech FY2224, or Adoner FY6600. Or better yet, FeelTech FY6600, it goes to 60MHz, Arbitrary Functions to 10MHz, to 20Vp-p, and has a 10-line color programming display, plus USB link. $99 and up.

--
 Thanks, 
    - Win
Reply to
Winfield Hill

Good advice! Even if it happens to be six years too late. :-)

BTW, I think you probably meant to write "FY6800" for that last recommendation (although it's essentially just a slightly revised FY6600 with improved "haptics" and an "earth loop hazard" thrown in for free - this free gift can be refused by connecting a 10 or even a 1 kR resistor in series with the stolen from the PSU to main board ribbon cable ground return wire and the PE tag on the IEC C13/14 mains socket).

There's a whole load of useful info on the FY6600 (and the FY6800) here:

--
Johnny B Good
Reply to
Johnny B Good

sir i have really impressed with the code..can we change the minimum frequency to 12khz to maximum frequency to 2mhz..let me know if it is possible...

Reply to
murali.acelogysystems

From the software... So in short, No unless you change the clock source in the Pye...

clock sources are 650 MHz, 400 MHz, and 200 MHz

So the lowest frequency we can make is 200,000,000 / 4095.4095 =

48,835.165323516 Hz

But I get 61,043 Hz

4095.4095 * 61043 = 249,996,082.108499999 Hz....

But for MASH 1, MASH min DIVI min output freq average output freq max output freq 0 (int divide) 1 source / ( DIVI ) source / ( DIVI ) source / ( DIVI )

  • 1 2 source / ( DIVI ) source / ( DIVI + DIVF /
1024 ) source / ( DIVI + 1 ) 2 3 source / ( DIVI - 1 ) source / ( DIVI + DIVF / 1024 ) source / ( DIVI + 2 ) 3 5 source / ( DIVI - 3 ) source / ( DIVI + DIVF / 1024 ) source / ( DIVI + 4 )

200,000,000 / (4095 = 48840.048840048

200,000,000 / (4095 + (4095/1024) ) = 48792.400011912

So

61043 * (4095 + .3999023437) = 249995496.238766479 Hz, looks liike we have a 250 MHz clock.

Lowest frequency then is 61,043 Hz, highest frequency then is 250,000,000 / 1 = 250,000,000 Hz

--
This email has been checked for viruses by Avast antivirus software. 
https://www.avast.com/antivirus
Reply to
TTman

On a sunny day (Thu, 6 Jun 2019 03:36:02 -0700 (PDT)) it happened snipped-for-privacy@gmail.com wrote in :

Simpe software loop, not hardware

set pin high usleep X or nops for pulse width set pin low usleep Y or nops for delay between pulses.

Command line option for frequency and pulse width

delay Y is 1/f seconds - pulse-width X or something along those lines.

You'd have to make sure the task switch never happens..

Simpler to use a PIC for those low frequencies. Program it in asm. serial interface or up-down buttons whatever.

Even simpler 555 timer?

Even more simple UJT transistor? (not sure if those go op to 2 MHz,

2 mHz ? sure with a big enough capacitor.

Or use the 74HC4046, it easily does 1 Hz to 2 MHz and more.

Reply to
Jan Panteltje

We've made nice sine waves, using software DDS and the DAC on a small ARM chip. Frequency range is limited to basically audio, but we can control amplitude and frequency nicely.

We just ran some code in a periodic interrupt, but some DMA thing could be done too, I guess.

My benchtop B+K analog function generator is handy. It has knobs.

--

John Larkin         Highland Technology, Inc 

lunatic fringe electronics
Reply to
John Larkin

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.