I am using LTC2497. I am trying to get the ADC conversion reading, could anyone explain how does the conversion of 2's compliment to decimal works on this ADC? I tried many times and it does not seem to be working.
Thanks for the promopt response. I tried the conversion...I still didnt get the result..did i missed anything?
After the conversion, it is necessary to send the read address which the LTC2497 should ACK and then read out the data. It sounds like the ADC is not acknowledging the read address you are providing. Can…
The LTC2497 is 16 Bits + Sign. B22-B6 are in two's complement format. For example Code 1010 0000 0000 0000 0000 0000
B23 and B22 are 10. This indicates the output code is greater than or equal to 0 and less than full scale . Bits 22-6 are 0 1000 0000 0000 0000. This is equal to decimal +32768.
A negative code example would be 0111 1111 1111 1111 1111 1111. B23 and B22 are 01. This indicates the output code is less than 0 and reater than or equal to -FS. Bits 22-6 are 1 1111 1111 1111 1111. this is equal to decimal -1.
Yup, I tried and the conversion is correct when my ADC voltage is less than 2.5V.
The problem I am facing is the ADC not responding to the request to change channel. I have no issues reading a single channel but when i try to change the channel, the ADC feeds the value of CH 0 only.
This is the scope photo. What I coded,
1. For loop to increment the channel address
2. Write I2C addres
3. Write channel address
4. Read data
5. loop back to step 1
This is where the problem lies, the code runs for 1 cycle and keep repeating the same channel address without increment...On the serial monitor, i did a printout to check, the channel address is increasing but the scope is not showing it / ADC not responding to the change in channel address...
I tried the code and it reflects the change of ADC Channel address correctly. Would you be able to test changing the channel on your end to prove that it is not the fault of the ADC?
Based on my scope result above, we can only conclude that the input and data out from 1 channel is correct, we are not able to confirm the problem lies with my code because it is showing that I coded on the serial monitor.
The scope photo that you provided does not show the address to the ADC changing. Until there is a scope photo showing that you are changing the ADC channel but the ADC is not responding, I'm not sure why you would think the problem could be the ADC.