# Temperature sensor with LCD

Discussion in 'The Projects Forum' started by Elvi Dalla Marta, Jun 2, 2015.

Jun 2, 2015
9
0
2. ### blocco a spirale AAC Fanatic!

Jun 18, 2008
1,535
412
Do you know how to write text to the LCD?

Elvi Dalla Marta likes this.
3. ### Elvi Dalla Marta Thread Starter New Member

Jun 2, 2015
9
0
Yes, there is a function... but i don't know how to write the adc value from RA0.
Can you help me? Thx

Feb 19, 2010
4,625
732
5. ### Elvi Dalla Marta Thread Starter New Member

Jun 2, 2015
9
0
Can somone write the code to convert the voltalge in RA0 to a temperature to display in lcd? 0V=-20°C 5V=50°C
Thanks so much

Jul 18, 2013
17,953
5,494
If you look at the 18F sample files that are supplied with the Picdem-Demo boards, ver 1 and 2 you will find routines for all the components on the board, analogue, LCD, math, etc available on the Pic site.
They take the module inputs from different devices on board and display on the LCD.
One is a thermal sensor.
The earlier version is in Assy, the ver2 is in C and Assy.
Max.

Last edited: Jun 3, 2015
7. ### Elvi Dalla Marta Thread Starter New Member

Jun 2, 2015
9
0
Another question, for have an output range of 0-5V, someone can explain me how to createa a conditionation circuit ? Using 12 V and lm324

8. ### shteii01 AAC Fanatic!

Feb 19, 2010
4,625
732
Why do you need conditioning circuit?

Feb 19, 2010
4,625
732
10. ### korchoi Member

Jun 5, 2015
59
6
basically you are making a 3-step thermometer.
step 1: convert temperature to voltage.
step 2:Convert the voltage level representing temperature into a digital value.This is done through the use of the built in ADC.
step 3:Output an image that differs depending on the value of that digital variable.
How to do step 2? read the microcontroller's datasheet on its built in ADC and how to use it.
How to do step 3? Well, it's up to you. There are so many ways to do it because this is the software side.
But i will show you a string you can pull: display images according to the value obtained eg. if 0v = -20ºC, display minus 20 on lcd.
-convert voltage to digital value.
-drive lcd display.
-associate lcd's state to digital value's state.In other words, the Digital representation of the temperature will indirectly control the LCD.

11. ### Dodgydave AAC Fanatic!

Jun 22, 2012
8,012
1,363
I have sent you an asm file that i used to make a fridge freezer using a TMP36 sensor,.

12. ### Elvi Dalla Marta Thread Starter New Member

Jun 2, 2015
9
0
Thanks for the support, now i print the temperature in the lcd, but i have a little problem: What should i do to print the degrees simbol "°" on lcd??

Jul 18, 2013
17,953
5,494
You will find the codes here.
mil.ufl.edu/4744/docs/LCD_Notes_4-bit.pdf

Max.

14. ### Elvi Dalla Marta Thread Starter New Member

Jun 2, 2015
9
0
I write printf(%c,223) Now it's work