ZHCSHW6B October 2017 – October 2018 ADS122C04
PRODUCTION DATA.
The following list shows a pseudo code sequence with the required steps to set up the device and the microcontroller that interfaces to the ADC in order to take subsequent readings from the ADS122C04 in continuous conversion mode. The DRDY pin is used to indicate availability of new conversion data. The default configuration register settings are changed to gain = 16, continuous conversion mode.
Power-up;
Delay to allow power supplies to settle and power-on reset to complete; minimum of 500 µs;
Configure the I2C interface of the microcontroller;
Configure the microcontroller GPIO connected to the DRDY pin as a falling edge triggered interrupt input;
Send the RESET command (06h) to make sure the device is properly reset after power-up;
Write the respective register configurations with the WREG command (40h, 08h, 42h, 08h);
As an optional sanity check, read back all configuration registers with the RREG command (2xh);
Send the START/SYNC command (08h) to start converting in continuous conversion mode;
Loop
{
Wait for DRDY to transition low;
Send the RDATA command (10h) to read 3 bytes of conversion data;
}
Send the POWERDOWN command (02h) to stop conversions and put the device in power-down mode;
TI recommends running an offset calibration before performing any measurements or when changing the gain of the PGA. The internal offset of the device can, for example, be measured by shorting the inputs to mid-supply (MUX[3:0] = 1110). The microcontroller then takes multiple readings from the device with the inputs shorted and stores the average value in the microcontroller memory. When measuring the sensor signal, the microcontroller then subtracts the stored offset value from each device reading to obtain an offset compensated result; the offset can be either positive or negative in value.