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
Thanks in advance for all the help.
This is my updated scope reading
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
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?
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?
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).