I'm trying to use the AMC7836 DAC controlled via SPI with an Mbed. Some SPI commandsa are working fine but the DAC commands are not working at all. I am able to write to the GPIO register and the Interface Configuration register but I have not been able to write to the DAC range register or the DAC data registers. I have SPI polarity set to 1 and phase set to 0 as specified in the datasheet.
Here is a GPIO command that is working fine:
daq_cs = 0;
spi.write(0x00);
spi.write(0x7A);
spi.write(0x00);
daq_cs = 1;
Here is a DAC command that is not doing anything:
// set DAC ranges to 0V-5V
daq_cs = 0;
spi.write(0x00);
spi.write(0x1E);
spi.write(0x77);
daq_cs = 1;
// update DAC registers
daq_cs = 0;
spi.write(0x00);
spi.write(0x0F);
spi.write(0x01);
daq_cs = 1;
Assume that the SPI commands are successfully being written on the bus. I've checked the signals with a logic analyzer (plus the GPIO commands are working). Am I missing a step to successfully write to the DAC regsiters?