Read data is 0XF4,0X53,0XFE, how to parse?
help
[edited by: ljln119 at 3:25 AM (GMT 0) on 14 Jan 2020]
LTC2439-1
Production
The LTC2439-1 is a 16-channel (8-differential) micropower 16-bit ?S analog-to-digital converter. It operates from 2.7V to 5.5V and includes an integrated...
Datasheet
LTC2439-1 on Analog.com
Read data is 0XF4,0X53,0XFE, how to parse?
Hi,
EngineerZone (ez.analog.com) offers support for English language inquiries only. Please post your question in English so that all members can read it. If you require assistance in Chinese please visit https://ez.analog.com/cn.
Thanks,
Looking at the timing diagram of Figure 3a, I think there could be something wrong with your communication with the ADC. The first two bits should always be zeros. Can you provide an oscilloscope photo showing CSL, SCK, SDI and SDO? A schematic of your circuit would also be helpful.
Thank you for your reply. This problem has been bothering me for a long time. Could you please provide relevant reading and writing routines for ltc2439-1?
The first two bits should always be zeros,why?
Read channel 0 data, single-end input, single chip sends 0XB0, right
This is a relatively old device. I do not have code examples for you. If you look at some of the newer devices that have Linduino support you can find code examples.
If you look at the timing diagram of Figure 3a you will see that the first two data bits clocked out of SDO (bits 18 and 17) are always zero.
Sending 0XB0 on SDI will configure the ADC to read CH0 with respect to the COM pin.
When B0 is sent, the received data is hexadecimal 88,40, F0.Actual channel B0= 0.260v.When sending B1, the received data is hexadecimal E8,A7,FC, and the actual channel B1=2.495V.The Numbers don't match.Is the received data high or low?How do I parse data?Thank you very much!
This is the waveform that sends B0,
The waveform received after sending B0
Looking at the oscilloscope photo, I decoded 22,03,9F. If you look at SDO at the rising edge of the first two SCK pulses you will see they are both zero. At the next rising edge SDO is high and at the 4th rising edge SDO is again zero. 0010 is a hex 2. Continue decoding in this manner and you will get 22,03,9F.
Next you have to strip out the extra bits. You have 24bits and the ADC only outputs 16 actual data bits. The first 3 bits (EOC DMY and SIG) combined with the MSB (B15) are used to determine over-range. You can look at Table2 of the data sheet and see that 0010 indicates that the data is greater than 0 and less than Vref/2.
Bits 15 through 0 are the data you want. The five 1s after Bit15 can be ignored.
Parsing B15-B0 yields 10,1C in hex. This is 4124 in decimal. 4124/32768 * Vref/2 should equal your input voltage. You haven't stated the reference voltage but I will assume it is 5V which indicates an input voltage of 0.314V. This is close to your stated input voltage of 0.26V but the ADC should be much more accurate than that. Do you have a filter at the analog input? Actually, it would be a good idea if you provided your schematic and even a photo of your circuit if that is possible.