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.

ADS1262: no response on SPI commands

Part Number: ADS1262

Hello,

i am trying to communicate (read the INTERFACE Register of the ADS1262 but i only get random values (maybe the content of Data Register).

by reading the INTERFACE Register i expect a value of 0x05h but i get toggeling radom values.

here my code:

#define INTERFACE (0x02)

ADS126xReadRegister(INTERFACE, 1, &VALUE);

void ADS126xReadRegister(int StartAddress, int NumRegs, unsigned char *pdata)
{
    set_adc_CS(0);
    ADS126xXferByte(0x20 + StartAddress);
    ADS126xXferByte(NumRegs - 1);
    for(int i=0;i<NumRegs;i++)
    {
        pdata[i] = ADS126xXferByte(0x00);
    }
    set_adc_CS(1);
}

unsigned char ADS126xXferByte(unsigned char cData)
{    _BYTE tempValAdc;
    tempValAdc=SPI_SendReceiveByte(_HWDEFS_AD7190_SPI, cData);
    return tempValAdc;
}

void set_adc_CS(_BYTE state)
{
    if (0 == state)
    {
        ADS1262_SELECT0;
        for (_BYTE i=0;i<8;i++){
                ;
            }

    }
    else if (1 == state)
    {
        for (_BYTE i=0;i<8;i++){
                        ;
                    }
        ADS1262_SELECT1;

    }

PIC 1: CS vs SCLK

PIC 2: MOSI(DIN) VS SCLK

PIC 3: MISO (DOUT) VS SCLK

  • Hi Thomas,

    First, welcome to the TI E2E Forums!

    What microcontroller are you using to communicate with the ADS1262?

    From your oscilloscope screenshots I'm not seeing any issues. There is some ringing on the SCLK signal, which might affect the RREG result, but its hard to say for sure. You could try adding a 50 Ohm series resistor to the SCLK signal to help reduce this ringing. Are you by chance probing right at the ADC pins? It's possible that the location of where you probe could make a difference...probing at the MCU might show valid data, but on the other end there may be signal integrity issues (or perhaps a series resistors on a SPI trace that is not properly soldered).

    When sending and receiving data, do you make sure that the SPI peripheral buffer is cleared out and that you allow for SPI TX and RX interupts to occur before reading the buffer? It could be that you've accumulated some junk in the SPI buffer (even though you appear to read the buffer with each TX operation) or that the timing is off, such that you are not returning the data byte associated with the register data. Does the "random" result appear to correlate to any of the DOUT bytes you observe on the oscilloscope?

    You should also double check that your MCU is using SPI mode 1 (CPOL=0; CPHA=1).

    Also, I would recommend applying a known input signal (shorted inputs for example) to see if the RREG operation is actually returning the conversion data result. If so, then you know that the "0x22 0x00 0x00" command is not being decoded by the ADS1262.

    Best regards,
    Chris