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.

Data swap on ADS1256

Other Parts Discussed in Thread: ADS1256

Hi,

   We are using ADS 1256 to convert the thermistor input into temperature readings. The ADC settings during initialization are as shown below

  • send Reset 
  • send SDATAC
  • set STATUS =  0x02
  • set MUX = 0x01
  • set ADCON = 0x05( gain = 32)
  • set DATA RATE  = 0x23 (10 sps)
  • ADS1256 Master clock = 6.25MHz
  • SPI clock = ADS1256 master clock/4 = 1.56MHz

 DRDY pin is tied to External IRQ. In the ISR, Read Data is used to read 24 bit raw temperature reading.

The issue that we are facing is that in the ISR after Read Data cmd(0x01) is sent out , the 3 bytes we are reading are not in the correct order. It looks like the LSB comes first, followed by MSB and then center byte. 

Below is the scope trace for your reference.

The expected data is: 0xFFF53A instead of 0x3AFFF5.

What am I missing? Need help.

Thanks - Sushma

  • Hi Sushma,

    Welcome to the TI E2E Forums!

    Your SPI command sequence looks okay; However, I'm not sure about the SPI mode you're using. The ADS1256 uses SPI mode 1 (SCLK clock that is active low and reads on falling edge). You have an active high clock, but I cannot tell which edge is reading data. You could be using the wrong clock edge when you flip the clock polarity!

    Also, in the STATUS register there is a bit which sets the data order (MSB or LSB first). It is possible that you are accidentally setting this bit high. I recommend probing your WREG sequence to verify.

    Check these two things out and let me know if that corrects the issue!


    Best Regards,
    Chris