Operating AD5780 EVAL Board Via MicroController

OK, so thanks in advance because I am new here. I am reading the AD57XX drivers here  https://wiki.analog.com/resources/tools-software/uc-drivers/renesas/ad5780 and am struggling to understand how to get the device working and understanding it properly. I am using code here https://github.com/maxgerhardt/arduino-ad57xx-driver/blob/master/src/main.cpp in order to test the DAC. I have several questions about the drivers and operation in general. I will itemize them if that is ok

  1. Where in the drivers am I performing Slave Select and where am I determining Clock Speed? I have looked through the C in the drivers library, and it seems that each command, whether reading or writing selects the Slave/Master each time? I see no reference to which pins on my microcontroller it is reference though so I do not know if any of this is right.
  2. Why do I need to be reading in the Control Register or anything from the DAC at all? Why does this matter? All I want is to output a voltage
  3. How do I perform the right conversion to a voltage that I want? The command " AD57XX_SetDacValue() " takes a long, but I do not understand how that relates to a float value of voltage. Say I want 2.35 Volts, or a Sine Function from -2 to 2 Volts, how do I do this conversion?
  4. I don't know how to debug the system in general. When I run the example code, which is supposed to output a triangle wave function, I get a sin function. Is this just background noise that the DAC outputs. I don't know how to tweak parameters or understand it. If the photo is low resolution, from peak to anti peak, the wave function is only about 300 mV.

Thanks in advance for all the help.

  • 0
    •  Analog Employees 
    on Mar 25, 2019 11:06 AM over 1 year ago


    Someone's currently looking into this query and will respond to you as soon as possible.



  • Thanks Ivan, here I asked the question on StackExchange, so I answered 1 and 2. For 3, I suppose the drivers require me to convert from a float to the binary representation that the DAC requires, but I'm still confused by the best way to do this.

    I am also going to look around my department for a logical analyzer, but debugging advice would still be incredible. I'm surprised there's no guide to do something similar online yet

  • 0
    •  Analog Employees 
    on Mar 26, 2019 2:37 AM over 1 year ago in reply to andrewkhardy

    Hi andrewkhardy,

    3. If you are referring to how would you compute for the required binary code for a specific voltage, you can use the equation found on the data sheet and solve for "D".

    If you need to output let say a ±2V sine wave you have to have a compute for all the binary values then write it sequentially to the DAC. We would also recommend to use  a lower voltage like ±5V for VREFP and VREFN for you to maximize the resolution.

    4. If you are not running the example code, is the output fixed or does the sine wave still exist? If yes, it might have nothing to do with the code and may be due to a noisy power supply (VDD,VSS).

    Where are you measuring exactly? is it on the VOUT or VOUT_BUF? is LK11 connected?

    Best regards,


  • Rainier,

    Thanks for answering. I am aware of the formula in the datasheet.  I'm checking to make sure the command _SetDacValue takes raw binary (or unicode?). I will have to write a conversion module then.  I am testing both the AD5780 drivers and the Ad57XX ones with AD5780 specified, but one or the other might be better.

    void AD5780_SetDacValue(unsigned long value)

    I think the sine wave does come from a noisy power supply.

    I will edit this answer in the morning, but it might be the LK11 pin that I'm an idiot and forgot. I need to disconnect it if I am connected to VOUT instead of VOUT_BUF correct? I already have moved LK1 to Position B since I am powering this externally. Are there any others I should check?

  • 0
    •  Analog Employees 
    on Mar 26, 2019 3:43 AM over 1 year ago in reply to andrewkhardy


    SetDacValue should take raw binary, hex or decimal values.

    LK11 should be inserted whether you are measuring at VOUT or VOUT_BUF. It is not recommended to leave the input of the amplifier to be floating. If you have followed the default link options (Table 1 on UG-256) then it should all be fine (except for LK1 since you are using external digital supply).