Other Parts Discussed in Thread: ADS1115
Hi,
I'm little confused about how to control an ADS1113. I don't know if is a hardware or software issue, so I will start with the circuit.
I tested that the multiplexer was working right, I'm using the S16A & S16B:
Test 1 -> I applied 3.3V to S16B and let S16A floating, the ADC returned me around 22300 counts (~ 2.8V), I tested with the multimeter the voltage on S16B, was 3.3V but when I tested on S16A the voltage was 1.23V How it can be possible?
Test 2 -> I applied 3.3V to S16A and let S16B floating, the ADC returned me around 22300 counts (~ -2.8V) negative, I tested with the multimeter the voltage on S16A, was 3.3V but when I tested on S16B the voltage was 1.23V too
Test 3 -> I applied 3.3V to S16B and GND to S16A , the ADC returned me around 32767 counts (~ 4.096V)
Test 4 -> I applied 3.3V to S16A and GND to S16B , the ADC returned me around 32767 counts (~ -4.096V) Negative
Test 5 -> I floating S16A & S16B and measured voltage each pin AIN0 & AIN1 to GND, and each pin returned me 1.23V
Now, let's talk about the software, first I'm been using the ADS1115 python adafruit library, once I got that readings I'm tried with my own code, I get the same readings
import smbus
import time
bus = smbus.SMBus(1)
bus.write_word_data(0x48, 0x01, 54147)
time.sleep(1)
val_swapped = bus.read_word_data(0x48, 0x00)
val = (val_swapped & 0xFF) << 8 | (val_swapped >> 8)
I don't know what it's going wrong