Thermometer with PIC Microcontroller

In the last tutorial we learn about the multiplexing technique used with seven segment displays. We learnt how it saves i/o line by using persistence of vision. Only one digit is lit at a time, but to a human eye it is too fast to catch, so we see all four digit lit the same time. In this tutorial we will make a practical use of multiplexed seven segment displays. We will use them to show current room temperature using a LM35 temperature sensor.

Before reading further make sure you know the following concepts

Schematic for PIC Thermometer

Please note that this schematic is slightly different from our previous schematic on multiplexed seven segment display. The display select i/o pins were RA0,RA1,RA2,RA3 on that schematic. But in this schematic the display lines are RA1,RA2,RA3,RA4 this is because RA0 is used as analog input channel for LM35′s output.

PIC Thermometer using LM35

Multiplexed Seven Segment wiring

We use our PIC Development Board for making the above demo project. The PIC Development Board has all the core circuitry to sustain the MCU while the project specific part is developed on the expansion board.

Multiplexed Seven Segment Display SetupThermometer with PIC Microcontroller schematich

HI-TECH C Code for Thermometer Project

Simple Program to connect with LM temperature sensor using the
internal ADC of PIC MCU.
The program displays the current environment temperature on
LED Module.
MCU: PIC18FXXXX Series from Microchip.
Compiler: HI-TECH C Compiler for PIC18 MCUs (
Copyrights 2008-2011 Avinash Gupta
eXtreme Electronics, India
For More Info visit
Mail: [email protected]
#include <htc.h>
#include <math.h>
#include "types.h"
#define _XTAL_FREQ 20000000ul
//Chip Settings


READ  Digital Count Down Timer using PIC Microcontroller

For more detail: Thermometer with PIC Microcontroller

Current Project / Post can also be found using:

  • thermometer microcontroler]

Leave a Comment

= 5 + 2

Read previous post:
Multiple Servomotors
Multiple Servomotors

Using a modified version of the last program, we can control as many servomotors as we have I/O lines on...

Scroll to top