Team, would you be able to help debug the below?
Reference system. We have AVDD @ 5V, AVSS @ ground, AINCOM @ 2.5V, Vrefp @ 2.5V and Vrefn @ ground.
We are reading voltages in pulse convert mode sequentially from 0 to 15 (single ended)
Three things are confusing me.
- Readings are not linear throughout the range
- Readbacks are flipped (ie 0V in reads highest positive number 0x7FFFFF)
- I was not able to read the ID register correct when the Start pin was held high. I would read back 0xFC not the expected 0x8B.
Configuration registers:
_ads1258_reg.CONFIG0 = 0x1A;
_ads1258_reg.CONFIG1 = 0xF0;
_ads1258_reg.MUXSCH = 0x00;
_ads1258_reg.MUXDIF = 0x00;
_ads1258_reg.MUXSG0 = 0x03; //Channel 0 and 1 Selected
_ads1258_reg.MUXSG1 = 0x00;
_ads1258_reg.SYSRED = 0x00;
Anything you see that is incorrect? Have you seen this error before?