Hi-
I'm writing code for a new board with an ADS1115 on it. The supply voltage is 3.3V. AIN0, 2, and 3 are measuring voltages generated on the board. AIN1 measures a voltage through a connector, and is pulled to ground through a resistor. Right now, the second board is disconnected, so AIN1 should always read 0V.
AIN0, 2, and 3 reliably (100% of the time) report the same voltage that I measure using a voltmeter. The results from AIN1 are 0x0000 roughly 80% of the time, but the other 20% of the readings give 0xFFFF. I can't figure out why I'm getting inconsistent results on only this channel.
I'm using the following settings: comparitor is disabled, 860 samples/second, single-shot mode, 4.096V range, single-ended conversions. I take samples on one of the four channels every 10 ms, so each channel is serviced every 40ms (i.e. start a read of AIN0, wait 10ms, read AIN0, start a read of AIN1, wait 10ms, etc...). The I2C clock runs at 380 kHz, measured.
Any ideas? Is any additional information required?
Thanks very much,
Alex