Anyone used the ADS7865 with a microcontroller? Having trouble writing the Configuration Register for the device. Although the CSn and WRn seem correct, and the data on the bus seems correct, the values do not get moved to the device. Tried updating the DAC as a way of testing another aspect of the interface, and the DAC output never changes. The test configuration sequence is as follows:
0x0105 = Reset
0x0103 = Prepare for DAC read-back
0x0800 = DAC Value read-back
0x0127 = Configuration
0x0104 = Prepare Sequence write
0x0F24 = Sequencer written
0x0106 = Prepare Sequence read
0x0800 = Sequencer read-back 1
0x0106 = Prepare Sequence read
0x0800 = Sequencer read-back 2
0x0106 = Prepare Sequence read
0x0800 = Sequencer read-back 3
The attempt to write a DAC value also fails:
0x0101 = Prepare for DAC write
0x0FFF = DAC Value Written
ADC ADS7865 DAC Value:0x0800
No change is seen on the REFout , device pin 2.
The code sequence to write to the ADS7865 is as follows:
AD_CSn = 1; // Disable ADC chip
AD_WRn = 1; // Start with ADC control write disabled
AD_RDn = 1; // ADC read disabled
Conv_n = 1; // Ensure initialized to deasserted
ADC_LSB_Tris = 0x00; // Make Data[3..0] outputs
ADC_MSB_Tris = 0x00; // Make Data[11..4] outputs
ADC_MSB = Value.MSB; // Upper byte config
ADC_LSB = Value.LSB; // Lower nibble config
AD_CSn = 0; // Enable ADC chip
AD_WRn = 0; // Execute write
Nop();
AD_WRn = 1; // Capture on rising edge
AD_CSn = 1; // Disable ADC chip