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.

ADS1271

Other Parts Discussed in Thread: ADS1271

Hi !

I am using Arduino Due to control ADS1271.

SPI format  mode and high resolution mode.

I am not sure how to read data from ADS1271EVM , isn't   DOUT?

According to the timing chart, the program can read DRDY pin state. when DEDY is found in the low level state
I can Read data from DOUT, isn't it ?

Here is my code:

///////////////////////////////////////////////////////////////////////////////

#define MODE1 4
#define FSDIR 5
#define DRDY 6
#define CLKRMODE 7
#define DOUT 8
#define CLKXMODE 9


unsigned int i = 0;
unsigned int data = 0;
unsigned int x;

void setup()
{

Serial.begin(115200);

pinMode(DRDY, INPUT);
pinMode(DOUT,INPUT);
pinMode(MODE1,OUTPUT);
pinMode(FSDIR ,OUTPUT);
pinMode(CLKRMODE, OUTPUT);
pinMode(CLKXMODE,OUTPUT);

digitalWrite(MODE1, HIGH);
digitalWrite(FSDIR, LOW);
digitalWrite(CLKRMODE, LOW);
digitalWrite(CLKXMODE, LOW);

}

void loop()
{
while(1)
{


if(digitalRead(DRDY)==LOW)
{
for(i=23;i>=0;i--)

{

x=digitalRead(DOUT);
data = (data | (x<<i) ); 



}

Serial.println(data);


data=0;

}

}//end while

}//end loop

/////////////////////////////////////////////////////////////////////////////////////

But I can't  read anything data and DRDY is always high.

How can I modify my code?

  • Hello Tien,

    Thank you for your question. What is the status of the /SYNC//PWDN pin? When this pin is low, the ADS1271 is not converting and /DRDY will remain high. You must configure the GPIO on your microprocessor to set /SYNC//PWDN high. Once you do this, the ADS1271 will begin converting and /DRDY will transition low after tNDR has passed (delay time for new data to be ready).

    Also, verify that all SPI signals are operating as expected per the timing specs on page 6.

    Best Regards,
  • Hi Ryan!

    The ADS1271 does not have a CS. Can SYNC(J2.1) be as CS? If it can't ,what should I do about CS ?

    Moreover, I already set SYNC pin high with microcontroller before I read my data , but the DRDY still remain high.

    My code:

    while(1) {
    digitalWrite(SYNC,HIGH);

    //Serial.println(digitalRead(DRDY));
    delay(1);
    while(digitalRead(DRDY)==0)

    {
    for(i=23;i>=0;i--)

    {

    x=digitalRead(MISO);

    data = (data | (x<<=i) );

    Serial.println(data);

    }
    }
    }
  • Hi Tien,

    Have you solved this issue yet? Below are a few more suggestions to try:

    • Verify that the clock signal is valid on the CLK pin.
    • Check the MODE and FORMAT pins configurations. What settings are you trying to use?
    • Verify that the device pins are not driven until the analog and digital supplies are established.
    • Verify that the SYNC pin voltage is high to ensure the microcontroller GPIO is working properly.

    The SPI on the ADS1271 does not use a /CS. You will be able to read data on DOUT by sending SCLKs after each /DRDY.

    Best Regards,