Hello there,
Im struggling a to get the DAC7718 running as i wish it to. I am using it in bipolar mode (+-12V supply, 3.3V Interface, 5V Ref, 4x gain, no correction engine). Power Sequencing for proper initialisation has been added (first 3.3 V, 1.5 sec later +-12V and further 0.5 sec later 5V Ref).
Im getting wrong output values as well as an incorrect offset voltages on REF-A/B. Both are approximately 4V, but according to the configuration it should be 3.333V.
For software communication i am using an SPI with 2x16 Bit transfers. According to the datasheet, if more than 24 Clk Cycles are applied during CS low, the last 24 will be used. So i am transferring 8 dont care bits, followed by the data bits. So this is my setup Routine:
//Initialize DAC Peripherals
GPIOSetDir( 0, 20, 1 ); //LDAC_N
GPIOSetBitValue( 0, 20, 1); //Init high
GPIOSetDir( 0, 2, 1 ); //CLR_N
GPIOSetBitValue( 0, 2, 1); //Init high
GPIOSetDir( 1, 26, 1 ); //RST_N
GPIOSetBitValue( 1, 26, 1); //Init high
GPIOSetBitValue( 1, 23, 1 ); //Set chip select high
// Write to Config Register
GPIOSetBitValue( 1, 23, 0 );//Set Chip Select low
src_addr[0]=0x0000;// 8bit don't care, 1bit Read/Write, 2bit Don't care, 5bit Target Register
SSPSend( (uint16_t *)src_addr, SSP_BUFSIZE);
src_addr[0]=0x8180; // 16bit Configuration
SSPSend( (uint16_t *)src_addr, SSP_BUFSIZE);
GPIOSetBitValue( 1, 23, 1 ); //Set Chip Select high
The following (for example) is used to set a output value
GPIOSetBitValue( 1, 23, 0 ); //Set Chip Select low
src_addr[0]=0x0008; // 8bit don't care, 1bit Read/Write, 2bit Don't care, 5bit Target Register
SSPSend( (uint16_t *)src_addr, SSP_BUFSIZE);
src_addr[0]=0xFFF0; // 12bit Data, 4bit Don't care
SSPSend( (uint16_t *)src_addr, SSP_BUFSIZE);
GPIOSetBitValue( 1, 23, 1 ); //Set Chip Select high
And afterwards a the LDAC_N pin will be dragged low for a short time.
I've added a PDF where you can see how the hardware was implemented (we are using the QFN-48 package, every peripheral with a pull up register can be pulled down by the CPU) as well as a plot of the DAC Output against different input values (represented in decimal values). As you notice, it should go from 0 => -10V up to 4096 => +10 V. But it actually goes down to around -11V, rapidly rises and then saturates around 4.65 V already at 1000 DEC.
Any help would be greatly appreciated,
kind regards
Alain