While writing DAC Data to DAC3, no change in voltage is obtained measuring the DAC 3 outlet.
Prior to this operation, the readback of the "Readback and LDAC" register gave no response on the SPI MISO.
The initialization of the SPI is shown below.
Is there something wring or missing in the initialization or SPI session ?
Initialization:===============SOFTWARE_RESET_REG: 0b0111.1101.1010.1100GENERAL_PURPOSE_CONTROL_REG: 0b0001.1000.0011.0000DAC_PIN_CONFIG_REG: 0b0010.1000.0000.1000 // Select DAC3ADC_PIN_CONFIG_REG: 0b0010.0000.1111.0100GPIO_READ_CONFIG_REG: 0b0101.0000.0000.0010
SPI session: Setting of analog output with Readback of DAC register:====================================================================READBACK_AND_LDAC_MODE_REG: 0b0011.1000.0100.0100 = 0x3844 // D11-D14: Adress Register, // D6: Enable Readback, // D2-D5: Select DAC-Reg Readback // D0-D1: Immediate copy to DAC-Reg and DAC Output
DAC_WRITE_REG: 0b1011.0001.1001.1001 = 0xB199 // DAC Write Reg.+ DAC Data
Bit D9 has to be 1 in the Power Down/Reference Control Register to enable internal reference.
Are you using an external reference?
I am using an internal VREF: 2V5.
You need to enable the internal reference. I do not see any command step in your previous post which enables the internal reference.
Thanks for your answer.
Although I first wrongly had chosen to set bit D9 to "1", I tried to set it to "0" which should be OK for internal reference. But unfortunately the DAC output gave still no result.So, at the moment I'm kind of stuck here.
// D9=0: Internal Vref. D3=1: DAC Power Down. const UInt16 CONFIGURE_PWR_DOWN_AND_REF_CTRL_REG = 0x5808; // Bin: 0101.1000.0000.1000