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.

CCS/ADS1231: how can i read data from ADS1231

Part Number: ADS1231
Other Parts Discussed in Thread: TM4C123GH6PM,

Tool/software: Code Composer Studio

Dear experts,

Now i am working with Tiva™ TM4C123GH6PM Microcontroller evaluation board for weighing scale and i have doubt to how can i interface ADS1231 with tiva C, it is SPI connection or what?.

If that is SPI Connection How can i read data from ADS1231, if you have any example CCS code for read data from ADS1231 kindly share with me or show the way to read data.

thank you

  • Hi Surya,

    We do not have example code at this time for the ADS1231.  The device is rather simple, and follows SPI Mode 1 protocol.  This device does not have a CS, so the communication interface is always enabled. The ADS1231 is pin controlled using GPIO.  

    To read data from the ADS1231, you monitor the falling edge of the dual function pin DRDY/DOUT (MISO).  You would then send 3 bytes of SCLKs to retrieve the conversion data.  For the Tiva microcontroller, you set up the SSI peripheral for SPI mode, and initiate the SCLKs by writing to the TX buffer (even though there is no input pin for MOSI) and reading the contents of the RX buffer following transmission.  You should find plenty of examples for setting up the SSI peripherals.

    If you connect the DRDY/DOUT pin to 2 inputs on the micro in parallel (MISO input pin and a GPIO pin setup as an input) you can monitor the GPIO input as a falling edge interrupt on the GPIO.  When there is a high to low transition on DRDY/DOUT the ADS1231 has new conversion data available to be read from the device.  The GPIO interrupt should trigger the read from the ADS1231.

    Best regards,

    Bob B