I am trying to build a Digital Thermometer using a LM34 temperature sensor, PIC16F917, couple resistors, seven segment display and a couple transistors that act as switches for the seven segment display. I am using the program MPLAB IDE so i need a C code to make my thermometer work. I am just wondering if anyone has a C code to make a digital thermometer in my case where it will display the degrees on my seven segment display.
If the application of uC is not a constraint, you can use the 7106 or 7107 IC.
These A/D provides direct driving control do display with no need to program any code.
The only work required to you is connect the sensor to input ( oviously regarding proper voltage range scaling ).
You need to write code for the the following functions :
Read the analogue LM34 voltage (A2D)
Convert the reading to temperature
Convert the temperature value to BCD ( 2 digits)
Convert the BCD to 7 segment code
Refresh the 7 segment displays
Re do the loop
Your school require you to write the code to demonstrate that you have the necessary skills to past your course