This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

ADS1292: 0x7FFFFF instead of real values

Part Number: ADS1292

Hello. I use the ADC ADS1292 in my project. AVDD = 5V, DVDD = 3.3V, IN2P = 200mV. I configured this ADC first according to the "Quick Start" instruction in the datasheet. I get instead of real values ​​of 0x7FFFFF on both channels, the status bit is correct - 0xС00000. I tried to turn on the calibration - the result is the same. Here is the detailed code for initialization of this ADC in MPLAB x IDE:

#define ADC_REG_DEVID 0x00
#define ADC_REG_CONFIG1 0x01
#define ADC_REG_CONFIG2 0x02
#define ADC_REG_LOFF 0x03
#define ADC_REG_CH1SET 0x04
#define ADC_REG_CH2SET 0x05
#define ADC_REG_RLD_SENS 0x06
#define ADC_REG_LOFF_SENS 0x07
#define ADC_REG_LOFF_STAT 0x08
#define ADC_REG_RESP1 0x09
#define ADC_REG_RESP2 0x0A
#define ADC_REG_GPIO 0x0B

#define ADC_CMD_START 0x08
#define ADC_CMD_RDATAC 0x10
#define ADC_CMD_SDATAC 0x11
#define ADC_CMD_STOP 0x0A
#define ADC_CMD_OFFSETCAL 0x1A
#define ADC_CMD_RREG 0x20
#define ADC_CMD_WREG 0x40



LATBbits.LATB2 = 0;      // pin CS to low
LATBbits.LATB3 = 0;       // pin START to high

ADC_RESET = 0;
Delay10TCYx(9); // delay 8.14 μs
ADC_RESET = 1;
Delay10KTCYx(256); // delay 460 ms
Delay10KTCYx(256);

ADC_Stop();
ADC_SetConfig();
ADC_Start();

void ADC_SetConfig (void) {
// stop continuous read mode
ADC_SendCommand(ADC_CMD_SDATAC);

// set continuous conversion mode
// set sample rate to 125sps
ADC_WriteRegister(ADC_REG_CONFIG1, 0b00000000);

// enable internal reference
// set internal reference to 2.42v
ADC_WriteRegister(ADC_REG_CONFIG2, 0b10100000);

// enable channel 1
// gain x1
// normal electrode input
ADC_WriteRegister(ADC_REG_CH1SET, 0b00010000);

// enable channel 2
// gain x12
// normal electrode input
ADC_WriteRegister(ADC_REG_CH2SET, 0b01100000);

// RLDREF signal (AVDD – AVSS) / 2 generated internally
// calibration on
ADC_WriteRegister(ADC_REG_RESP2, 0x83);

// enable RLD buffer
ADC_WriteRegister(ADC_REG_RLD_SENS, 0x20);

// init the remaining registers with default values
ADC_WriteRegister(ADC_REG_LOFF, 0x10);
ADC_WriteRegister(ADC_REG_LOFF_SENS, 0x00);
ADC_WriteRegister(ADC_REG_LOFF_STAT, 0b00011111);
ADC_WriteRegister(ADC_REG_RESP1, 0x02);
ADC_WriteRegister(ADC_REG_GPIO, 0x00);

ADC_SendCommand(ADC_CMD_OFFSETCAL);

}

void ADC_SendCommand(BYTE command) {

ADC_CS = 0;
spi_send_b(command);
ADC_CS = 1;

}



void ADC_WriteRegister(BYTE address, BYTE value) {

ADC_CS = 0;
// writecode + address
spi_send_b(ADC_CMD_WREG | address);
// write 1 register
spi_send_b(0);
// write register value
spi_send_b(value);
ADC_CS = 1;

}

// Channel data(24 status bits + 24 bits ? 2 channels) = 72 bits

void ADC_UpdateChannelData(void) {

BYTE i, j, tmp;
ADC_CS = 0;
// read 3 byte status register (1100 + LOFF_STAT[4:0] + GPIO[1:0] + 13 '0's)
tmp = spi_rcv_b();
tmp = spi_rcv_b();
tmp = spi_rcv_b();


for(i = 0; i < 2; i++)

{
channelData[i] = 0;
// read 24 bits of channel data in 3 byte chunks
for(j = 0; j < 3; j++)
{
tmp = spi_rcv_b();
channelData[i] = ((channelData[i]) << 8) | tmp;
}
// convert 3 byte 2's complement to 4 byte 2's complement
if((channelData[i] >> 23) == 1)
{
channelData[i] |= 0xFF000000;
}
else
{
channelData[i] &= 0x00FFFFFF;
}
}
ADC_CS = 1;

}

void adc_ready_interrupt (void)
{
     INTCON3bits.INT1IF = 0; // сброс флага прерывания
     ADC_UpdateChannelData();

}


I tried to disable the channels - I got a value of 0 on them, which means that the write commands are executed correctly. I tried to turn on the test mode to get at least some data (in the CH1SET register I chose 0101 = Test signal mode and set 0b10100011 in the CONFIG2 register) - still the same values ​​of 0x7FFFFF. Tell me, please, what could be the problem?

  • Hi Anton,

    Thanks for your post and welcome to the forums!

    7FFFFF is a positive full scale output and can be a result of an issue with one of these places: Analog inputs, PGA gain, reference, or output code conversion.

    What is the value of IN1P? 200mV as well?
    What is IN2N connected to?
    IN1N is left floating?

    On channel 2, assuming that IN2N is GND - a 200mV differential voltage multiplied by a PGA gain of 12 yields 2.4V which is your reference voltage. This would yield 7FFFFF as expected.

    Try increasing the internal reference to 4.033V to see if the extra head room on the ADC helps!

    e2e.ti.com/.../2391901