Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

AD9852 configuration

Status
Not open for further replies.

ejleiss

Junior Member level 2
Joined
Jul 2, 2009
Messages
22
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,446
Hi,

I'm looking for some help in configuring an AD9852 using an ATXMEGA microcontroller. Would anybody have some insight on where to begin with this?
Thanks
 

I would recommend using the SPI interface (MOSI>SDIO, MISO>SDO, SCLK to SCLK, and a GPIO for /CS)
S/P pin is GND for this mode. Also use a GPIO for the master reset. Be sure to tie the unused parallel pins low per Table 10 of the data sheet.


If you have not used SPI before it can be frustrating to get to work the first time but once you get it, it is a simple interface.
The MCU will be the master and the AD9852 the slave. SPI is no more than a pair of daisy chained 8 bit shift registers (SR). One in the master and one in the slave.
You drop a byte in the master's SR, drop /CS, and it is automatically (s)clocked into the slave's SR and whatever was in the slaves SR is shifted back into the master's SR.
If you want to just read the slave you drop a dummy byte into the Master SR and whatever was in the slave's SR is now available in the master.
The slave can not initiate a read or write, something is pushed into it and whatever was in its SR is simultaneously pushed back on the same 8 clocks. People get in trouble by trying to "read" the slave or they wait until they receive data from the master and then write to the slave's SR (SPI buffer) and wonder why their data is one write old.

Set up a register table with the configuration reg values,
do a master reset making sure to wait for 10 clock periods
using a GPIO to drop /CS,
use a loop to send the reg values to the AD9852
use a while(SPI flag); to gate the data
followed by raising the /CS
This is all you need to do to initialize the device.

I believe there is still software for the AD9852 evaluation board on the analog.com site, it has been awhile since I downloaded it. We use the associated GUI to make our configuration selections and then use the exported reg values to populate our register table. If it is still available you can download the software even without having the eval board.
 
Thanks for all the info. I actually have the eval board right now and was using the software GUI from analog.com and am able to output a waveform. I am a little confused about how to configure the registers. Could you possibly give me an example for say a 150KHz FTW using a 10MHz clock? Or any other example would be helpful.
Thanks again.
 

hello,


hello,

I don't know AD9852 but i worked a lot on AD9850, maybe similar ..
this xls document show how to fill the register data to get the desired frequency..
you can use a float to convert Frequence to 32 bits value, or direct uses 32 bits value to force the frequence output.
You said 10MHz for AD9852 ? it seems very low freuqncy clock .. compare to 125MHz on AD9850..
don't mixt clock of microcontroler and clock for AD985x
ther is no relation ship between the clock of microcontroler ( can be 1Mhz to 64Mhz !) and clock of AD985x
except if you use the same clock for both devices !
but with 10Mhz the maximum frequency could be 9 999 999 Hz with a abfull form of output signal..
because maxima must be Fclock / 4 => 10Mhz => 2,5Mhz maxi
but you can get a minimum output frequency as low as 0.002 Hz (2 milli H)z

for more details you can see on my page web : double DDS application .. with C18 source
 

Attachments

  • DDS register_xls.txt
    151 KB · Views: 55

Thanks for all the info. I actually have the eval board right now and was using the software GUI from analog.com and am able to output a waveform. I am a little confused about how to configure the registers. Could you possibly give me an example for say a 150KHz FTW using a 10MHz clock? Or any other example would be helpful.
Thanks again.

Which ATXMEGA microcontroller are you using and what IDE?
 

Hi,

I am using the ATXMEGA256A3 only because I had a few left over from a different project. I am using that with AVR Studio 6.
Thanks
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top