ADS1256 no data read

Hello Everyone,

I have interfaced ADS1256 high precision AD/DA board with Arduino Uno.
Before I was able to read data from ADS1256 but suddenly I am receiving continuously 0 i am not able to figure out the actual issue. Below I am attaching code with this query.

I checked SPI signals on oscilloscope all signals are coming properly. Please guide me as i am bit new to external ADC interfacing.

Actually my requirement is to get minimum 100 Samples per second, I was getting data but not so accurately.

//https://forum.arduino.cc/index.php?topic=441637.0
//while (digitalRead(rdy)) {}  // wait for ready_line to go low

#include<SPI.h>
#define ADS_SPISPEED 16000000

#define ADS_RST_PIN    8 //ADS1256 reset pin
#define ADS_RDY_PIN    9 //ADS1256 data ready
#define ADS_CS_PIN    10 //ADS1256 chip select
// 11, 12 and 13 are taken by the SPI

byte Command = 0x00;
byte mux_reg = 0x01;
byte status_reg = 0x00;  // address (datasheet p. 30)
byte status_data = 0x01;//0x01 //status: Most Significant Bit First, Auto-Calibration Disabled, Analog Input Buffer Disabled
byte adcon_reg = 0x02; //A/D Control Register (Address 02h)
byte adcon_data = 0x24; // 0 01 00 000 => Clock Out Frequency = fCLKIN, Sensor Detect OFF, gain 1
byte drate_reg = 0x03; // Choosing Data Rate register = third register.
byte drate_data = 0b10000010;//=1000SPS//10000010=100 SPS // 11000000 = 3,750SPS

void setup()
{
  SPI.begin();
  SPI.beginTransaction(SPISettings(ADS_SPISPEED, MSBFIRST, SPI_MODE1));
  SPI.setClockDivider(SPI_CLOCK_DIV8);
  Serial.begin(115200);
  
  pinMode(ADS_CS_PIN, OUTPUT);
  pinMode(ADS_RDY_PIN, INPUT);
  pinMode(ADS_RST_PIN, OUTPUT);
  
  digitalWrite(ADS_RST_PIN, LOW);
  delayMicroseconds(100); // LOW at least 4 clock cycles of onboard clock. 100 microsecons is enough
  digitalWrite(ADS_RST_PIN, HIGH); // now reset to deafult values
  digitalWrite(ADS_RDY_PIN,LOW);
  
  Write_Register(status_reg, status_data);
  Write_Register(adcon_reg, adcon_data);
  Write_Register(drate_reg, drate_data);

}
void Write_Register(byte Address, byte data)
{
  digitalWrite(ADS_CS_PIN, LOW); 
  SPI.transfer(0x50|Address);
  SPI.transfer(Command);//cmd
  SPI.transfer(data); 
  SPI.endTransaction();
  digitalWrite(ADS_CS_PIN,HIGH); 
  delayMicroseconds(20);//20//2.5
}
void loop()
{
 uint32_t adc_val[8] = {0,0,0,0,0,0,0,0}; // unsigned long is on 32 bits //unsigned long
 digitalWrite(ADS_CS_PIN, LOW);
  for(int i=0; i<8; i++)
  {
     // while (digitalRead(ADS_RDY_PIN)) {} ;
      byte Channel = i;
      Write_Register(mux_reg, (Channel << 4) | (1 << 3));
      SPI.transfer(0xFC);
      delayMicroseconds(20);//10
      SPI.transfer(0x00);
      delayMicroseconds(20);//20
      SPI.transfer(0x03); // Read Data Continuously 0000  0011 (03h)
      delayMicroseconds(20);//20
    
      adc_val[i] = SPI.transfer(0);
      adc_val[i] <<= 8; //shift to left
      adc_val[i] |= SPI.transfer(0);
      adc_val[i] <<= 8;
      adc_val[i] |= SPI.transfer(0);

      if (adc_val[i] > 0x7fffff)
      { 
        adc_val[i] = 16777216 - adc_val[i]; //do 2's complement, discard sign
      }
      Serial.print(adc_val[i]);
      Serial.print("\t");
      SPI.endTransaction();
      digitalWrite(ADS_CS_PIN, HIGH);
      delay(1);

  }
  Serial.println();
}

If that used to work and you did not change the code, verify that your wires are properly set.

Double check also your power - are you within range or have you exceeded limits ? (If I remember correctly on the RPI board you can set the board to 3.3 or 5V and set the reference voltage as well and there are also bare boards at 5V but The measured voltage should be 2V below the supply voltage, so The module is only suitable for measuring analog voltages within 3V)

From the top of my head you can go quite fast with this component - something like 30,000 samples per second - so you 100 target should be well within range

Hello,

I would like to thank you for your reply, So far I have checked the connectivity with the multimeter of the connected wires like CS, DRDY, MOSI, MISO and CLK pins including power supply and ground they are proper.

Vref and Vcc both are set to 5Volts using jumpers and AINCOM is shorted with AGND using jUmper.

I have not understood totally like, How settling time concept in ADS1256 works exactly? I can increase the Samples per second but the concept of increasing the sampling rate is still unclear to me.

But at present getting reading result is the priority.

Regards
Anurag