本帖最后由 xyz549040622 于 2019-12-23 21:04 编辑
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. |