Trying to use all four channels with an ADC0838 and having issues with software.
Turnbull2112
Posts: 65
I have been reading other threads about using the ADC0838 and I am having trouble getting all four differential inputs to work. I would rather use this instead of three or four ADC0831's to conserve I/O and also to keep costs down. Any ideas??
Thanks
-Rob
Thanks
-Rob
Comments
Here is my test program so far. What I gather from other threads is that I need to tell the ADC0838 to return information from each differential input (1,2,3,4) with a binary string but I am not getting any results. The datasheet shows instructions to be sent for address, polarity of each input, etc. My experience is limited to the ADC083. What I am trying to do is to read three analog inputs with one ADC0838. I would like to have three subroutines that control this and return the three readings. Is this possible?
DO
GOSUB read_channel1
GOSUB read_channel2
GOSUB read_channel3
LOOP
read_channel1:
read ADC0838 differential input 1,2
RETURN
read_channel2:
read ADC0838 differential input 3,4
RETURN
read_channel3:
read ADC0838 differential input 4,5
RETURN
Does this help?