Hi!
I am doing a project where a temperature sensor signal is A/D converted by a pic, which then sends the result via the USART to a PC.
The A/D converter on the pic is 10 bit and the result is configured as Left Justified.
5V is equivalent to the digital value 1000. The USART is set to 8 bit asynchronous mode.
After the conversion I send the contents of the register ADRESH to the USART.
So my problem:
Hyper terminal shows the character 'm' (decimal 109), while the measurement of the analog signal gives 2.168 V.
The digital value of 2.168 V should be:
(1000 / 5) * 2.168 = 433.6
I know this is not possible to represent with a byte, but my question then is what does the pic do with the number? It sends 109, is this somehow a truncated value of 433?
regards / Christian
I am doing a project where a temperature sensor signal is A/D converted by a pic, which then sends the result via the USART to a PC.
The A/D converter on the pic is 10 bit and the result is configured as Left Justified.
5V is equivalent to the digital value 1000. The USART is set to 8 bit asynchronous mode.
After the conversion I send the contents of the register ADRESH to the USART.
So my problem:
Hyper terminal shows the character 'm' (decimal 109), while the measurement of the analog signal gives 2.168 V.
The digital value of 2.168 V should be:
(1000 / 5) * 2.168 = 433.6
I know this is not possible to represent with a byte, but my question then is what does the pic do with the number? It sends 109, is this somehow a truncated value of 433?
regards / Christian