10-MHz-DDS-Funktionsgenerator mit PC-Softwaresteuerung-preis:69,95 euro
Das ist gut, Ya ?
10-MHz-DDS-Funktionsgenerator mit PC-Softwaresteuerung-preis:69,95 euro
Das ist gut, Ya ?
Hi Speck,
It can always be done with a hardware PWM and low pass filter. See my sinewave inverter thread http://www.picbasic.co.uk/forum/showthread.php?t=1846 for a code snippet that does this at an update rate of 100Hz driving a half bridge. Scaling the sine table is impractical with only 8 bits of resolution. For example if you define your sinewave lookup table to produce the maximum peak value into an 8 bit one then you have to do fractional math.That is your modulation index (depth of modulation) is <= 1. (The dSPIC supports fractional math). So the trade-off is multiplying the lookup table with a 8bit value and shredding off the LSBs. This works okay for low fixed frequency. If you do a cycle by cycle computation then the overhead is manageable. But for a 20K function generator to work with a base frequency and modulating frequency it has to be updated every PWM interrupt cycle. That is too much you could ask for a 16F PIC @ 5 MIPS. The 18Fs have an extended instruction set featuring a single cycle hardware multiply that too @ 10MIPS. In fact you can use Darrel's Software PWM http://www.pbpgroup.com/modules/wfse...p?articleid=12 to make your life easy. It takes of all your pain in doing it in asm.
BTW the PIC Hardware PWM uses upto 10bits and it is a good practice to set your PR2 to $FF. That is where you get the maximum usable PWM resolution.
Regards
Sougata
Hi,JoeOriginally Posted by Joe S.
I've "built" ( laughs ...) the 20Mhz one ...
just need an extra output buffer for > 10 Mhz outputs ( there's a too low -pass response somewhere ! ) ... and because the HC132 is a bit weak on even small capacitive loads.
Otherwise it works really fine !!! ... and 4Mhz is the Max I really need ...as a variable PIC clock drive.
precision and resolution are really unbeaten for such price ...
Yawohl ... sehr gut !!!
Alain
************************************************** ***********************
Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
************************************************** ***********************
IF there is the word "Problem" in your question ...
certainly the answer is " RTFM " or " RTFDataSheet " !!!
*****************************************
Je dit... c'est le excellent prix pour le excellent produit ... yah!
I don't know the following, and i don't know how good they are and are really far of the needed range here but...
http://www.amqrp.org/kits/dds60/
http://www.minikits.com.au/kits4.html
Kinda time saver i guess.
Last edited by mister_e; - 13th December 2006 at 08:37.
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
Hi Speck,
It should be possible to do with hardware PWM, espescially at low frequencies like that. I just never got it working very well at higher freqs, so i never really finished it off to see where the limits were. Feel free to carry out your own investigation cause it should be possible.
I think it was probably due to the fact that the loop runs at 5000000/28=178,571kHz and the highest (useable) PWM freq was around twice that ....... no resolution. However, like i said, i never took it all the way, i got the results i wanted with the R-2R ladder.
/Ingvar
Hi,All
I saw one application in a the French "Electronique Pratique" magazine, issue 247, page 86 ...
But, halas, I didn't download the Pic ( Hex ) Program ... and it's no more available.
May be someone has it in his computer memory ???
Alain
************************************************** ***********************
Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
************************************************** ***********************
IF there is the word "Problem" in your question ...
certainly the answer is " RTFM " or " RTFDataSheet " !!!
*****************************************
Bookmarks