Good afternoon,
We are trying to use an ADS1100 and are having trouble with the configuration register, it does not seem to update based upon our commands. I was not able to find any documentation regarding the number of the configuration register, so I've just been doing simple 'write' commands across the I2C. I have been successfully reading from register 0x00.
Here is the behavior, regardless of what byte we send, the configuration register does not change.
upon start-up we perform a read, the 3rd byte is '128'
we send 0x00 and then perform a read, the 3rd byte is '128' as expected, but that doesn't tell me I actually did anything
we send 0x04 and then perform a read, the 3rd byte is '128'
we send 0x08 and then perform a read, the 3rd byte is '128'
we send 0x0C and then perform a read, the 3rd byte is '128'
Below is our console output, followed by our test script.
Any assistance is appreciated
Thanks
Read register: 3 95 128
Trying to set register to 0
Read register: 3 95 128
Trying to set register to 4
Read register: 13 123 128
Trying to set register to 8
Read register: 26 232 128
Trying to set register to C
Read register: 53 218 128
from smbus2 import SMBus
import time
# Get I2C bus
bus = SMBus(2)
# ADS1100 address, 0x48(72)
# Select configuration register
# 0x0C(12) Continuous conversion mode, 8 SPS, 1 PGA
time.sleep(0.5)
data = bus.read_i2c_block_data(0x48, 0x00, 3)
print("Read register: %d %d %d" %(data[0], data[1], data[2]))
print("Trying to set register to 0")
bus.write_byte(0x48, 0x00)
time.sleep(0.5)
data = bus.read_i2c_block_data(0x48, 0x00, 3)
print("Read register: %d %d %d" %(data[0], data[1], data[2]))
time.sleep(0.5)
print("Trying to set register to 4")
bus.write_byte(0x48, 0x04)
time.sleep(0.5)
data = bus.read_i2c_block_data(0x48, 0x00, 3)
print("Read register: %d %d %d" %(data[0], data[1], data[2]))
time.sleep(0.5)
print("Trying to set register to 8")
bus.write_byte(0x48, 0x08)
time.sleep(0.5)
data = bus.read_i2c_block_data(0x48, 0x00, 3)
print("Read register: %d %d %d" %(data[0], data[1], data[2]))
time.sleep(0.5)
print("Trying to set register to C")
bus.write_byte(0x48, 0x0C)
time.sleep(0.5)
data = bus.read_i2c_block_data(0x48, 0x00, 3)
print("Read register: %d %d %d" %(data[0], data[1], data[2]))