Hi,
In a similar post I saw this answer for converting output code of ADS129X to voltage:
"The most straightforward way to convert your output codes back into input voltage is to AND the data with 0x800000 and test the MSB (most-significant bit). If the MSB equals 0, simply multiply the decimal equivalent by the LSB size. If the MSB = 1, you must first subtract 2^n from the decimal equivalent, then multiply by the LSB size. "
I have a few questions.
1. So if my ADS output code from channel 1 is, let's say '0xD70A3D'. I should AND this code with 0x800000 as shown below:
A = 0xD70A3D & 0x800000
2. He says to test the MSB, that is I need to check the MSB of 'A' right?
3. Now, if the MSB is 0, I have to multiply the decimal equivalent by LSB
My question here is, should I multiply the code (0xD70A3D) or the result of AND (A) with the LSB to get the voltage?
Thank you