We are using AD5724/TSSOP24 in one of our project. We have configured the DAC as per the requirements, and able to write and read data from DAC registers. But still we are not getting any outputs in DAC channels, it is showing 0.6V always.
Below is the code snippet to set 10V in DAC channel A, similar way we tried other channels also.
SendData(0x190004); //config = CTRL address| Clamp Enable
SendData(0x080002); // Setting dacA for 10.8V
SendData(0x10000f); //setting the power
//Here 10us time delay is taken care
SetVoltage(0x00ED00); //setting 10V in channel A
void SetVoltage(unsigned long voltage)
unsigned long output;
output = voltage;
//ClearDAC(); // we tried uncommenting this also – (0x1C0000)
//LoadDAC(); // we tried uncommenting this also – (0x1D0000)
void SendData(unsigned long data)
unsigned char p;
LATBbits.LATB5 = 0; //CS enable
p = data >> 16;
p = data >> 8;
p = data;
LATBbits.LATB5 = 1; //CS disable
SPI Write screen shot is attached, reading also working fine.
Channel 4 – CS
Channel 5 – MISO
Channel 6 – MOSI
Channel 7 – Clock