SPI Load cell chip ADS1231

to my understanding the ADS1231 is not using the SPI standart protocol at all. In the datasheet the pulsing sequence is defined.

At the moment I'm also working on a project using the ADS1231 and therefore implemented a little library for communication with it. It is not ready for fullscale usage yet, just a beta version, but its working on all my tests and I think it may help you. An example is included.
Similar to the servo lib you can attach multiple instances of the ADS1231 (in the ADS1231.h it is limited to 6 units, but thats only an arbitrary number and can be increased with only RAM and pin limitations). Actualy the writing was basend on the servo lib XD makes live easier.

known issues:

  • not fully validated yet
  • no usage of speedpin
  • communication results in jiberish data if the communication is at the same time, a sample is finished. The output buffer of the ADS1231 changes immediatly after sample without respect to maybe running communications
  • the lib is compatible for ADS1232 and ADS1234, but dont use the input multiplexer and the gain scaling yet
  • a read process takes approx 500us at the moment. This is mainly due to the shift/or operation of the build up of read data. Maybe i find a solution to speed it up. However it already should be fast enough for most applications. Also maybe the ram usage might be improved in future.
  • ...

ADS1231_beta.zip (3.32 KB)