9850 DDS Module

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 6.

Moderator: Benj

Post Reply
peterhalloway
Posts: 30
Joined: Sat Dec 29, 2012 4:49 pm
Has thanked: 9 times
Been thanked: 5 times

9850 DDS Module

Post by peterhalloway »

Hi I have just purchased an AD9850 DDS module and was after a kick start with programming it. Has anyone done any work with these and could share any info? Ultimately I will have a rotary encoder and LCD as this will form a VFO for a receiver but help with what to send to get it to output a sinewave at a given frequency would be a good start.

Thanks

Pete

peterhalloway
Posts: 30
Joined: Sat Dec 29, 2012 4:49 pm
Has thanked: 9 times
Been thanked: 5 times

Re: 9850 DDS Module

Post by peterhalloway »

I have found a little more information.

I need to send a serial word to program the DDS module. The value of the word will ultimately depend on input from a rotary encoder but to start with setting up a fixed frequency would be good. Can anyone help me understand how I can send the following hex code serially from the PIC to the DDS module:

03C74FB5

this should set a frequency of 1.845MHz

Any help would be really appreciated.

Thanks

Pete

User avatar
QMESAR
Valued Contributor
Valued Contributor
Posts: 1287
Joined: Sun Oct 05, 2014 3:20 pm
Location: Russia
Has thanked: 384 times
Been thanked: 614 times

Re: 9850 DDS Module

Post by QMESAR »

Hello Peter
You can try this macro it will send your 4 bytes to the serial Port
Hope it helps

:D
Attachments
TxData.fcm
(1.53 KiB) Downloaded 244 times
1.jpg
1.jpg (65.02 KiB) Viewed 6156 times

jim_g
Posts: 22
Joined: Tue Jan 13, 2015 12:47 pm
Has thanked: 6 times
Been thanked: 8 times

Re: 9850 DDS Module

Post by jim_g »

Peter

Here's another one, programming the DDS chip using a serial word (ties up fewer output pins). Tested with a 128 pulses per revolution I/Q resolver. I don't claim elegance but it works. Frequencies in kHz, which is what I wanted. Its going to be part of an automatic antenna tuner.

Jim
Attachments
DDS_Controller.fcfx
(16.33 KiB) Downloaded 319 times

jim_g
Posts: 22
Joined: Tue Jan 13, 2015 12:47 pm
Has thanked: 6 times
Been thanked: 8 times

Re: 9850 DDS Module

Post by jim_g »

Sorry, in manageFrequency and ddsSetFrequency, programWord = ddsFrequency * 34360 comes from the Analog Devices data sheet...

Fout = Clkin * TuneWord/2^32

so TuneWord = Fout * 2^32 / ClkIn

The chinese modules usually have a 125MHz clock, and my application will work with 1kHz steps, so this becomes...

TuneWord = Fout * 4294967296/125000 = Fout * 34360 (rounded)

(I expect that was obvious, if so I appologise!)

If you're using one of the cheap Chinese DDS boards, look at tyhe price of the DDS chips from AD and form your own opinion! You may get a noisy oscillator and a layout which is sub-optimum for low spur levels, not a good recipe for a local oscillator. On the other hand, the module may be excellent. Certainly fine for prototyping. Analog Devices have (or used to have) an article by G3XJP on using the chip; I can witness that his construction provides low spurs.

Regards

Jim

peterhalloway
Posts: 30
Joined: Sat Dec 29, 2012 4:49 pm
Has thanked: 9 times
Been thanked: 5 times

Re: 9850 DDS Module

Post by peterhalloway »

Hi Jim
your Obviously a radio amateur like myself. I will have a good look at this over the next week or two (half term will give me room to breath and do something for me!

Perhaps we can compare projects, although you are ahead of me so I do not have anything to give at the moment!

Thanks

Pete

Post Reply