hello
I have a PIC18F4220 running @ 20MHz and using C18 compiler.
I have a 20x2 LCD module connected to my PIC and i can successfully display my characters & strings etc out on to the LCD. The LCD is configured for 8bit mode operation....no nibbling!
I now have a temperature sensor module connected to an ADC input on the PIC and wish to display the current temperature reading out on the LCD screen. However, my problem and confusion in displaying the temperature on the LCD is based on how to prepare the software algorithm for displaying. The area of my obstcale and confusion is as follows...
1) "My ADC input (temperature reading) is saved in a 16bit int variable (10bit ADC). The LCD is sent byte size information from the PIC to display the relavent data. So how to transfer the tempurature saved in 16bit ADC variable out on to the LCD?"
2) "Also how to convert the 16bit ADC value (temperature reading) into the relavent scaled tempurature output for LCD display? The temperature reading can be anything such as... '23.4' or '18.0' degrees celcius etc"
Can anyone please suggest an algorithm and if possible show me some web link where such examples have been carried out before?
thank you
Haseeb
I have a PIC18F4220 running @ 20MHz and using C18 compiler.
I have a 20x2 LCD module connected to my PIC and i can successfully display my characters & strings etc out on to the LCD. The LCD is configured for 8bit mode operation....no nibbling!
I now have a temperature sensor module connected to an ADC input on the PIC and wish to display the current temperature reading out on the LCD screen. However, my problem and confusion in displaying the temperature on the LCD is based on how to prepare the software algorithm for displaying. The area of my obstcale and confusion is as follows...
1) "My ADC input (temperature reading) is saved in a 16bit int variable (10bit ADC). The LCD is sent byte size information from the PIC to display the relavent data. So how to transfer the tempurature saved in 16bit ADC variable out on to the LCD?"
2) "Also how to convert the 16bit ADC value (temperature reading) into the relavent scaled tempurature output for LCD display? The temperature reading can be anything such as... '23.4' or '18.0' degrees celcius etc"
Can anyone please suggest an algorithm and if possible show me some web link where such examples have been carried out before?
thank you
Haseeb