AD9854 DDS Help

Hello and many thanks for allowing to join your forum - this is my first post so apologies if I have started the thread in the wrong sub-forum.

I have a reasonably large project work in progress and have, for the most got all of my modules designed and ready for bread-boarding, however I have a rather stubborn module which I am hoping some of you guys can help guide me with.
The project is a multi-band radio transceiver which I have been wanting to build for many years and have jumped in with both feet on this one :slight_smile:

I decided to use the AD9854 DDS module for the basis of my VFO for the radio, I purchased a Chinese AD9854 DDS evaluation board which unfortunately did not come with any documentation or example code.

Having searched the internet I have found only one example however this is for controlling the AD9854 using the SPI bus and my requirement is to control the DDS chip with the parallel interface which is where I am struggling.

The evaluation board has no way of enabling the SPI bus on the AD9854 as the s_select pin which allows selection between serial or parallel interfacing is tied permanently to +VCC which forces it in to parallel mode, now I have made many projects using I2C and SPI bus controlled devices successfully and now I am faced with this rather daunting task of figuring out the parallel interface.

In summary, according to the Analogue Devices datasheet for the AD9854 the parallel interface requires both address and frequency word data to be sent, not as simple as the good old AD9850 chip which was very simple to get running.

Firstly, how do I go about configuring my controller, in this case an Arduino Mega, correctly?
I have tried several attempts using both Digital outputs and Analogue Outputs without success, I am still quite new to the micro programming game so please excuse any school boy errors.

The steps from what I have reversed engineered from the example I found suggest the steps are as follows:

  1. Master Reset the device.
  2. Writes the parallel address bytes.
  3. Pulse WD pin high then low
  4. Write the frequency word bytes.
  5. Pulse WD pin high then low.
  6. Pulse SD_CLK high then low.

However I am stuck and unable to get a sine-wave out of this module, any help and guidance would be greatly appreciated and thanks for taking the time to read.

Cheers

Rob.

AD9854.c (3.2 KB)

Hold WD low while you pulse UD_CLOCK, then release it.

/* AD9854-Write registers*/
void ad9854_write( uint8_t addr, uint8_t data )
{
   digitalWrite(WD,HIGH);   // WR high
   ad9854_set_addr( addr );
   digitalWrite(WD,LOW);  // WR low
   ad9854_set_data( data );

   digitalWrite(UD_CLK,HIGH);
   digitalWrite(UD_CLK,LOW);

   digitalWrite(WD,HIGH);   // WR high
}

Many thanks I will give it a try.

Cheers

Rob.

No luck so far, will keep trying and report back if I ever get this working.

Thanks and best regards

Rob.

Hi, I have the same module, and couldn't figure out how to program it with Arduino yet. Did it work with you?

load the sine output with a 100 ohm to ground and check for an output (with oscilloscope) of about 250 mV, maybe less.

I tried it with a 100 Ohm load resistor but also it didn't work. Maybe I am doing something wrong? Anybody has a working source code for the AD9854? Thanks

Well, I gave up with the AD9854 module as I just could not get it to work - faulty maybe?

Anyway, I bought the a newer module with the AD9959 chip and found some basic examples online to communicate with this chip over SPI, I did spend several weeks trying to get it to work and was successful - the AD9959 is much better device with 4 independent output channels with amplitude and phase control registers, I have a working proto-type running with an Arduino Due, the AD9959 is 3V3 logic so the Due was an obvious choice rather than having to worry about level shifting on the SPI lines etc.

If anyone would like a copy of my code I will be more than happy to provide it, there are a few tweaks work in progress at the moment however please feel free to ask any questions.

Cheers

Rob.

vhf_builder: If anyone would like a copy of my code I will be more than happy to provide it, there are a few tweaks work in progress at the moment however please feel free to ask any questions.

Cheers

Rob.

Would love to see your code Rob, as I am working on something similar.

Can not get my UNO to compile so would like to try your code. Thanks tom

Hi guys sorry for the late reply - I will try and get the code uploaded this weekend.

Cheers

Rob.

vhf_builder: Well, I gave up with the AD9854 module as I just could not get it to work - faulty maybe?

Anyway, I bought the a newer module with the AD9959 chip and found some basic examples online to communicate with this chip over SPI, I did spend several weeks trying to get it to work and was successful - the AD9959 is much better device with 4 independent output channels with amplitude and phase control registers, I have a working proto-type running with an Arduino Due, the AD9959 is 3V3 logic so the Due was an obvious choice rather than having to worry about level shifting on the SPI lines etc.

If anyone would like a copy of my code I will be more than happy to provide it, there are a few tweaks work in progress at the moment however please feel free to ask any questions.

Cheers

Rob.

Dear Rob,

I am totally new in programming aurdino for Ad9959 DDS devices. It would be very helpful, if you kindly upload the code here. I would be really grateful to you.

Thanks a lot

Tanzir Ahmed