Let me try to explain
my problem by describing what I am doing.
I have configured the
ADS1115 to 860SPS (~1.2ms samples) and single shot mode.
Then I have done the
following sequence:
- Write config to
select AIN0
- wait 2ms
- Read AIN 0 data
- Write config to
select AIN1
- Read AIN1 data
- Write config to
select AIN0
- wait 2 ms
- Read AIN0 data
etc
So I am expecting
that when I read AIN0, the data for AIN 0 should appear. However, I notice that
sometimes the data for AIN 0 shows the data for AIN 1 but sometimes it is
correct (shows AIN0). (randomly)
I found that if I
extended the delay (wait 2 ms) to more than 8ms the device starts behaving
normally.
My concern is what is
causing this delay when switching mux inputs. If I don't switch mux inputs the
data can be read at ~1.2ms with no problem.
What is the delay
time after writing to the config register before a conversion begins?
Note: by examining
the rdy pin, the rdy is active sporadically when the wait is set to 2ms, I
would expect the rdy pin to be consistent.
-David