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.

ADS1216: MSB is always 1 when reading from the Register

Part Number: ADS1216

Hello,

I had already pull high on pins PDWN, DSYNC and RESET. The CS pin is pull low as well throughout the SPI communication.

Clock frequency is correct as well on the XIN pin.

Without doing anything, I read the Setup register (Address 00h), it return 8Eh.

Then I try to read MUX register (address 01h), MISO return 81h.

Do you have any idea why the MSB bit is always set to high?

I then tried to write to the MUX register with value 14h. After performing a read back from MUX register, it return 94h!!!

I am stuck. Please help!

Thank you!!!

Best Regards,

Darren

  • Darren,


    I think it always helps to plot the SPI communications with an oscilloscope or a logic analyzer. Can you please post the a photo showing /CS, DIN, DOUT, and SCLK? I think that would be a good start to debugging the problem.


    Joseph Wu
  • Sure sure! I will try to get this done tomorrow.
    Thank you!
  • I am trying to get the oscilloscope now... but for the oscilloscope signal.. I am afraid I will not be able to get the CS signal.. but rest asure that this CS is kept low right from the start.

    At the mean time, I had capture the SPI signal with "Beagle" SPI sniffer.

    Please see attached. Is this enough?

    Also, when I tried to read 2 register, I got the following. And the value return is in REVERSE order! Am I setting something wrongly?

    I send out 11h then 01h

    I got back 80h and 01h (the default value for MUX Register is 01h and Analog Control Register is 00h

  • Hi Darren,

    The scope shots will help us determine the timing. There are some strict requirements for delays following commands for some actions. See the Timing Characteristics on page 8 of the ADS1216 datasheet. Note in particular t6.

    It also appears that you are attempting a full-duplex type of operation where you are collecting data the same time as sending commands. This device, due to the timing restrictions has some problems doing this. I would suggest sending 0xFF to initiate the SCLKs for reading the data. For example send 0x10 0x00 0xFF to complete the communication cycle for a read single register. Sending 0x55 starts a register write sequence that is never actually completed (first graph data). You need to make sure that any communication that is started is completed.

    Is your micro sending 16-bit transfers? The ADS1216 is expecting byte transfers. 16-bit transfers can be an issue due to the timing mentioned above. If your micro is using 16-bit communication, I would recommend you use 8-bit transfers for the ADS1216. Again, the scope shots will help us understand your communication and timing better.

    Best regards,
    Bob B