AnsweredAssumed Answered

continous frequency updation in AD9833

Question asked by SKKS on Oct 29, 2011
Latest reply on Nov 1, 2011 by LiamR

i want to make a sine wave generator of frequency ranging from 10Khz to 1Mhz. but whatever be the data i write into the chip, the output frequency is 300khz. the master clock i supplied to the chip is 5Mhz. here i'm listing some of the data that i given to the chip.

 

vSetPinValue(FSYNC,0);

usSPITranceiveData(SPICHN2,0x21);// command word is 2100 599A 4666 C000 2000
usSPITranceiveData(SPICHN2,0x00);
usSPITranceiveData(SPICHN2,0x59);//For 500Khz
usSPITranceiveData(SPICHN2,0x9A);
usSPITranceiveData(SPICHN2,0x46);
usSPITranceiveData(SPICHN2,0x66);

usSPITranceiveData(SPICHN2,0xC0);
usSPITranceiveData(SPICHN2,0x00);
usSPITranceiveData(SPICHN2,0x20);
usSPITranceiveData(SPICHN2,0x00);
vDelay(20);

vSetPinValue(FSYNC,1);

 

for changing frequency i send all the 5commands by changing the commands in bold. is it necessary to write all the 5 command words to change the frequency?

I think itz a problem with the command word that i'm giving into the chip. can you please give me some sample command words for some frequencies say 20,25,30,35,40,45Khz....(for Eg: for <500Khz> <1Mhz>:: <2100 599A 4666 C000 2000> <2100 7333 4CCC C000 2000>)

Outcomes