AnsweredAssumed Answered

AD9833 low frequency tuning words

Question asked by rogerb on Apr 8, 2011
Latest reply on May 4, 2011 by Georgy

Hi all,


I seem to be struggling with a problem of getting a 0.5hz signal from my AD9833 using a 25Mhz crystal clock, any integer value seems to be ok in that I can generate any frequency from 1hz upwards in integer steps.


If I hard code the high and low words (i.e Freq0registerdata1  = 0x4010; Freq0registerdata2  = 0x4000; ) I get the correct output of 1.5hz so it comes down to how I construct the tuning words. I'm using 'C' for an embedded Microchip device and heres a code snippet that doesn't work!:


tuningword   = (requiredfreq*(2^28))/25000000;
// 2^28/CLOCK = (2^28)/(20*10^6) = ???
final_word   = tuningword;
low_word     = final_word & 0x3FFF;
high_word    = final_word >> 16;


High Word and Low Word are passed to the DDS as Freq0registerdata1 and Freq0registerdata2


All help appreciated


Roger B