Hi. this is my first post. pls, i had been using 8-bit ADC with 255 as maximum meaning that i can use just one register for the result and table is not an issue. BUT now i am using the inbuilt ADC of 16f876a which is 10-bit with maximum of 1023 meaning that i will use 2registers and table is a problem for me in this regard. please, how do i convert the results in the registers to match temperature range of 0 to 100 degree celsius. pls help.
You have to left align the ADC Reading by clearing ADFM bit in ADCON1 register.
Then you can just read the ADC Value in 8 Most Significant bits by reading the ADRESH register.Hope this helps you.
Thanks for ur reply. it gave me hope. But what happens to the remaining 2-bits(LSB) in the ADRESL won't it affect my result?
I will like to know how it affects my result or what to do in my program to compensate for any error as regards using only the ADRESH at left justify.
I am actually using LM35 temperature sensor connected to AN0 of 16F876A and i really want to get reading of ADC and accurately display the temperature. Thanks. Expecting your help