Project Name: LM35 Temperature Sensor with Fixed Voltage Reference for the PIC16F1826
Author/Designer: Y H
Project Description: With the fixed voltage reference in the newer PIC16F microcontrollers, users may now not worry about drifting voltage references and wrong temperature readings. Plus, calculations are easier and no floating point calculations are involved.
Photo/Picture/Figure/Diagram/Flowchart:
Compiler: MPLAB X 1.10 and Hi-tech C v.9.83 (Don't ask why I don't use the XC8 - it's messing up on me for that time I wrote it!)
MikroC and XC8 versions coming soon.
Source code: "pic16f1826-thermometer.X.zip"
Schematics:
Important Note: If the UIC00B/PICKit 2 cannot recognize the PIC16F1826, you may need to upgrade the device file in PICKit 2 before you upload the program into the microcontroller. Grab the latest device file from this link: http://ww1.microchip.com/downloads/en/D ... -62-14.zip
When you have it, unzip it to “C:\Program Files\Microchip\PICkit 2 v2\” and overwrite the file. Then try uploading it again.
On MPLAB X, project files are not used anymore – it is referred to the folder instead. The MPLAB X, with that project does not support PICKit 2 for some strange reason but you still can automatically upload your program after you compile it. Here’s how to do it:
1.) In the PICKit 2 program, click on the “Auto Import Hex + Write Device”. You will be directed to a browse window.
2.) Afterwards, find the project folder you have just downloaded it. It is called “pic16f1826-thermometer.X”.
3.) Then click on the “dist”, and then “default” and “production”.
4.) You will find “pic16f1826-thermometer.X.production.hex” inside. Select it and click “open”.
Go back to the MPLAB X, (modify and) compile the project. The program will auto-upload every time you compile. The program will not be uploaded if you have a compilation error.