Microcontroller PIC16F877 Video 46 How To Display Temperature Using ADC Module and LM35 Using Mikro

Опубликовано: 05 Май 2026
на канале: Star Technology 5G
1,862
36

Analog-to-Digital Converter (A/D) Module

An analog-to-digital converter (A/D) is another important peripheral component of a microcontroller. The A/D converts an analog input voltage into a digital number so it can be processed by a microcontroller or any other digital system. Because the ADC is widely used in data acquisition, in recent years an increasing numbers of microcontroller have an on-chip ADC peripheral. An on-chip ADC eliminates the need for an external ADC connection, which leaves more pins for other input output activities. The PIC16F877 contains 8 analog inputs. They enable the microcontroller to recognize not only whether a pin is driven to logic zero or one (0 or +5V), but to precisely measure its voltage and convert it into numerical value, digital format.

Registers used for ADC

The ADC module has four registers. These registers are:
• ADC Control Register 0 (ADCON0)
• ADC Control Register 1 (ADCON1)
• ADC Result High Register (ADRESH)
• ADC Result Low Register (ADRESL)

ADRESH and ADRESL Registers

The result obtained after converting an analog value into digital is a10-bit number that is to be stored in the ADRESH and ADRESL registers. There are two ways of handling it, left and right justification.


Project: How to Display Temperature Using PIC ADC Module

In this project, we will connect LM35 analog temperature sensor with AN5 pin of PIC16F877 microcontroller. We will interface LCD with PORTC of the PIC16F877 microcontroller. The temperature will display every 2 seconds on LCD.

Facebook Page   / star-technology-5g-114217917006898  
Twitter   / startechnolog18  
Blogger https://www.blogger.com/blog/posts/34...
Tumblr   / startechnology5g  
Pinterest   / startechnology5g  
Linkedin   / star-technology-5g-0779661b2  
reddit   / startechnology5g  
MIX https://mix.com/startechnology5g

#microcontroller #clanguage #clanguageprogramming #electronicscreators #microcontroller_lab