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.

ADS122C04EVM: ADS122C04EVM

Part Number: ADS122C04EVM

Hi,

Thanks for the help with setup of the board. I'm now trying to use the EVM to read a load cell output to a microcontroller. Mine is an arduino uno. I made the connection as you explained, but I'm having trouble finding code that can support simple reading of the ADC. I can't find sample code with addresses etc. If you know of such, that would be very helpful. 

Thanks

  • Hi Eitan,

    There should be some base I2C Arduino code examples that you can use from within the community.  Below is some code that perhaps can get you started:

    #include <Wire.h>
    
    Wire.begin();                                   // join i2c bus (address optional for master)
      Wire.beginTransmission(device);                 // start communcation with device (48...4B)
      Wire.write(0B00000001);
      Wire.write(highByte(setupdevice));              // Set I2C address to device (48...4B)
      Wire.write(lowByte(setupdevice));
      Wire.endTransmission();
    
      Wire.beginTransmission(device);                /// start communcation with device (48...4B)
      Wire.write(0B00000000);
      Wire.endTransmission();
    
      Wire.requestFrom(device, 2);                  // request 2 bytes from slave device #2
       byte a = Wire.read();
       byte b = Wire.read();
       word code=(a*256)+b;

    Best regards,

    Bob B