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.

ADS1254: looking for sample code

Part Number: ADS1254

Hi Team,

Good day! Do we have any available sample code for our customer to start with? Thank you in advance for the support. 

Best regards,

Jonathan

  • Hi Jonathan,

    Unfortunately we do not have example code for the ADS1254.  Part of the reason is there are no register settings for the device and it is pin controlled making it a rather simple part as compared to some of our more complex devices.  Operation of the device would be to use GPIO to control the mux pins for CHSEL0 and CHSEL1 when selecting the desired  input channels.

    When using a microcontroller, it is easiest to connect the DOUT/DRDY pin to an interrupt capable GPIO pin and trigger an interrupt on the falling edge of DOUT/DRDY.  The interrupt routine can then send three bytes of dummy data to the TX buffer for the micro (even though it is not used for the ADS1254).  The placing of data in the TX buffer will initiate the required SCLKs to read the conversion result.  For each byte placed in the TX buffer there will be data in the RX buffer that must be retrieved and reassembled to make the 24-bit conversion word.  The conversion result is in binary 2's complement and must be properly sign-extended when placing into a 32-bit signed long integer in C.

    Best regards,

    Bob B