AnsweredAssumed Answered

Trouble writing to AD5504 DAC over SPI

Question asked by jonk on Sep 16, 2012
Latest reply on Sep 25, 2012 by jonk

I'm having trouble writing and reading to the AD5504 over SPI. After a week tinkering with various SPI clock polarities, speeds, and phases without success, I'm trying out the EngineerZone.


My attempts to write to the AD5504 do not result in changes in the voltage on the DAC outputs, and reads to registers I have written indicate the write was not successful.

Following is an annotated logic analyzer capture showing an attempt to enable and set the value for channel 1.

I don't observe any change in voltage on pin 12 following the write. (I've tried writing higher voltages too, not just 0x00A).



Figure 1: Logic analyzer display from attempted write. The SCK frequency is 250 kHz (9 MHz is the maximum for reads). Channels are labeled on the left. (Click the image for the full version, it is truncated by the messageboard.)


My understanding of the events surrounding markers T1 through T6 on the image follow:

  1. The AD5504 is cleared with the /CLR pulse.
  2. Channel 1 is enabled by writing to the control register (0x7004 is sent). There is a glitch between the two 8 bit SPI writes on the microcontroller, but there is more than 15ns setup time for the intended low before the falling clock edge.
  3. The !SYNC input to the AD5504 is pulsed high between writes.
  4. Channel 1 is set to 10 (0x100A is sent).
  5. The control register is read back (0xF000 is sent). As expected, the AD5504 takes control of MISO on the rising edge of the fifth clock, however, the enable bit for channel 1 is not high. I expect the AD5504 to return 0xF004, it returns 0xF000.
  6. The value register for channel 1 is read (0x9000 is sent). As expected, the AD5504 takes control of MISO on the rising edge of the fifth clock, however, the value of the value register reads back as 0. I expect the AD5504 to return 0x000A, it returns 0x7000.



Figure 2: Schematic of AD5504 circuit. CLR, SYNC, SCK, MOSI, and MISO resistors are jumpers. LDAC is grounded. DAC outputs are open. V+ is 15V


I've gotten a bit stumped as to why the AD5504 isn't taking my writes.

Do y'all have any ideas on why it is not writing (or reading?) successfully to the AD5504?

A logic analyzer capture of a successful read and write would be extremely helpful. I haven't found anything the the datasheet to indicate why my approach wouldn't work.

As far as I can determine, my logic analyzer capture is compliant with the waveform described in page 7 of the AD5504 datasheet.