Part Number: DAC80508EVM
Hi Everyone,
Trying to get some form of comms to this DAC (DAC80508M)
The following is my SPI setup:
The MCU is an stm32f7.
The clock polarity is low and the clock phase is set to 2nd edge.
I have tried a range of clock speeds, but it's currently set to 3.375MBit/s.
The MSB is sent first.
According to the standalone operation section from the datasheet this configuration seems correct?
The DAC:
The internal reference is used and the SDO/ALRM pin has a 10k pullup on it.
The code:
I think my issue would relate to the order that I'm updating or accessing the DAC registers.
Here's the steps I follow:
I setup my first payload as the following:
1) I initially update the config register
Read/write = 0x0
Address = 0x3
Data = 0x3200
uint32_t payload = (0x0 << 20) | (0x3<< 16) | 0x3200;
Therefore, all the dacs and reference is powered up. The pin is set as an alam pin.
2)Then I update the Gain register
According to this the gain setting needs to be set to x2 and div setting needs to be set to /2 to get 0V to VREF operation.
Read/write = 0x0
Address = 0x4
Data = 0x01FF
uint32_t payload = (0x0 << 20) | (0x4 << 16) | 0x01FF;
Finally I write to the sync register to ensure that the data register it updated immediately after a write to the dac data register.
Read/write = 0x0
Address = 0x2
Data = 0x0000
uint32_t payload = (0x0 << 20) | (0x2 << 16) | 0x0000;
After this in my opinion a write to a dac data register should show a change in the output voltage. Yet the voltage remains at the midscale voltage.
For instance the following should update dac channel 0 to a voltage value of 0V
Read/write = 0x0
Address = 0x8
Data = 0x0000
uint32_t payload = (0x0 << 20) | (0x8 << 16) | 0x0000;
Any chance anyone knows what I'm doing incorrectly?
Thanks in advance for any help!