CuriousScientist0 / ADS1256

An Arduino-compatible library for the ADS1256 24-bit analog-to-digital converter.
MIT License
31 stars 11 forks source link

Reading incorrect values from register (ESP32) #10

Open sam-hud opened 6 months ago

sam-hud commented 6 months ago

Using the ESP32-S3 and the ADS1256_Example.ino project, the value read from the register after setting it (for example, DRATE) does not match. It appears that the value read from the register is inconsistent or random.

sam-hud commented 6 months ago

This can be fixed by changing delayMicroseconds in the readRegister() method from 5 to 7.

This value was obtained from the ADS1255-ADS1256 library which defines the read delay as t6 delay = 4tCLKIN 500.13 = 6.5 us

CuriousScientist0 commented 6 months ago

Hi! Just to double-check. Have you tested this, or you are just comparing it with someone else's code? I am asking because I tested the code with an ESP32-WROOM-32 and I haven't noticed any issues (and the same applies to the 8 other MCUs). I will take another look at it because I will soon be able to test the code with a WEMOS D1. Thanks!

sam-hud commented 6 months ago

Hi,This was tested specifically on the Sparkfun Thing Plus ESP32-S3. Though I believe it was also a problem on the Thing Plus ESP32-WROOM (I will have to check this again). Thanks!

arun-krishnan-k commented 1 month ago

Hi, I am facing the same issue in writing/reading the register values like DRATE, PGA, MUX etc. I am using Teensy 4.1

CuriousScientist0 commented 1 month ago

Hi, How is your circuit assembled? Is it on a breadboard, or is it soldered?

arun-krishnan-k commented 1 month ago

Thanks for the reply. It is soldered with a custom pcb