ADS1298: cannot read the registers content

Part Number: ADS1298

Hi,

In our project, we are piloting payload boards featuring ADS1298 (4 ADCs in all) via an AT91SAM7S microcontroler. In order to make sure the ADCs follow the instructions during the development phase, we are trying to retrieve all the 26 registers content via the SPI bus but only get zero's. Here is the code used to read the registers :

uint8_t adcRegistersContent[26] = {0};   // array to store the registers

SPI_Transfer(ads1298_1.spi.cs, SDATAC, SPI_LAST);  // send Stop Reading Data Continuously instruction
       
SPI_Transfer(ads1298_1.spi.cs, RREG | 0x00, SPI_CONTINUE);   // send Read Register instruction with register 0 as first to be read
SPI_Transfer(ads1298_1.spi.cs, 25, SPI_CONTINUE); // ask to read 25 + 1 register
for(uint8_t i = 0; i < 26; i++)
        adcRegistersContent[i] = (uint8_t) SPI_Transfer(ads1298_1.spi.cs, 0x00, i==25 ? SPI_LAST : SPI_CONTINUE);   // try to retrieve the content of each register
        
SPI_Transfer(ads1298_1.spi.cs, RDATAC, SPI_LAST);  // send Read Data Continuously instruction

The function
uint16_t SPI_Transfer(uint8_t componentChipSelect, uint16_t dataToSend, uint8_t spiMode)
returns the data recieved by the SPI bus, spiMode determines whether the chipSelect is to stay active (SPI_CONTINUE) or not (SPI_LAST).

The communication between the AT91SAM7S and the ADS1298's via SPI works at a speed of 2MHz, and is configured accordingly to the datasheet (sclk, miso and mosi phase), the ADS1298 uses an external clock at 2.048MHz and is configured for 500 samples per second at 24 bits resolution. We are able to read data in continuous mode and operate the GPIO (with some inconsistancies in the GPIO readings form the status word), but we can't retrieve the content of the register.

A Scope reading on the SPI clk, cs, miso and mosi tells us that the instruction sent by the AT91SAM7S are what they are expected to be and that the MISO (Dout) stays at 0 when it is supposed to something.

The start-up sequence we use for the ADS1298's is as follow :
They are installed by group of two on independantly powered payload boards and isolated via tri-state gates.
-Power up a board, the tri-state gates are opened as long as the board is open and we receive power-good signal from the main supply and the payload board supply,
  at this time, the precision clock is fed to the ADS1298;
-Wait 300 ms;
-Send a 2 ms pulse on the reset pin of the ADS1298;
-Send SDATAC instructions via SPI
-Send via SPI the configuration for registers CONFIG1-4, GPIO and CH1-8SET;
-Set the Start Measure pin to High so that we don't recieve the data ready signal when unneeded.

The instruction RDATAC (via SPI) and START (via pin Start Measure to Low) are set later on when measures are needed

Do you see if something could explain why we are not able to read the content of the ADS1298's registers ?
I'll gladly provide more info need it be.

2 Replies

  • Hello Julien,

    Thank your for your post and welcome to our forum!

    Julien Amand

    -Set the Start Measure pin to High so that we don't recieve the data ready signal when unneeded.

    The instruction RDATAC (via SPI) and START (via pin Start Measure to Low) are set later on when measures are needed

    Can you please clarify what you meant by this? START is not an active-low signal. Therefore, START should be set high when you want the ADC to convert and low when you want to stop conversions. However, this should have no effect on reading registers. As long as you are in SDATAC mode, the register contents can be read.

    Are the 4 ADS1298 devices configured in a Daisy-Chain or Cascaded configuration? Or are you communicating with only one of them to read the register contents?

    Please try reading the register contents back before you configure the device. Just send SDATAC followed by 0x20 0x19 and read the default contents of all 26 registers. Alternatively, try reading one register at a time by sending 0x2n 0x00 and increment 'n' after you receive each register setting.

    Best Regards,


    Ryan Andrews

    Precision ΔΣ ADCs

  • In reply to Ryan Andrews:

    Ryan Andrews

    -Set the Start Measure pin to High so that we don't recieve the data ready signal when unneeded.


    My bad, we use a hardware inverter on the START pin and I was reading the code from the µC side, whence my lapsus. So to clarify, I set the ADC input pin START to low to inhibit the DRDY signal and then I set it to high when we want the measures.

    The 4 ADCs are in a Cascaded configuration, in the sample code provided here, I only try to read one ADS1298 but the same code is used to read each individual ADC.

    I will implement what you suggested and come back later with the results

    Best Regards,