AnsweredAssumed Answered

Programming an AD9850 with assistance from the Configuration Assistant

Question asked by GregoireLeGros on Jun 27, 2012
Latest reply on Jul 2, 2012 by GregoireLeGros


I'm using C++ and an mbed microcontroller. I'd like to program my AD9850 for an output frequency of 2MHz.

I used the online configuration assistant which gave me the following values for the 40bit programming word.


. The simplest way for me to enter the data as a serial stream is to use pin D7 and my approach is this

I join all the values obtained into one long word and then clock in each bit one at a time. The 40 bit word I use is


but it looks as if the msb is 1 which would make my output frequency much larger than 2 MHz. I think I have concatenated the sub-words incorrectly. What should the order be ? Should each sub-word also be reversed ? Is this a correct way to load the 40 bit word into the device ?

10     reset=0

20     reset=1

30     reset=0

40     load the word into a char array w[]=1010111011001001000110000010000000000000

50     for(i=0;i<39;i++)

60     if(w[i]=1) then

70     write 1 to the D7 pi

80     else write a 0

90     when all bits are loaded update the frequency

100   fq_ud=0

110   fq_ud=1

120   fq_ud=0 


I have unpredictable results when using this method and sometimes I can see a nice square/sine wave on my scope and sometimes not. I'm not sure if I should pull the iout (pin20) up or down. My scope has a ceiling of 25 MHz so if I get my word backwards I expect it will be difficult to see a good sine wave. Perhaps I need to filter the output anyway. Also if you try to translate the last 4 sub-words into a frequency it seems not to make 2 MHz so I do not understand the relation between the digital word 32 bit frequency part and the output frequency. The calculation in the datasheet does not seem to correspond with the calculation in the InteractiveDesignTool ( Also not sure of control bits in w0-7 in particular what are the power-up power-down bits doing ? Do they turn device on or off after programming ? Finally how does the device know whether serial or parallel programming is used ?Any advice welcome.

My AD9850 is on a module inclulding a 125 MHz crystal clock. Picture included.