Analog to Digital Converter Using PIC16f877A Microcontroller – Beginners Guide using pic microcontoller
What is meant by Analog to Digital Converter (ADC)? An ADC converts analog signal to it’s corresponding digital signal.
How to convert analog signal to digital signal? CircuitsGallery.com has already posted ADC using LM324 IC, in that ADC tutorial I had already explained Analog to Digital Converter how it works.
While dealing with Microcontrollers we may face many situations where we have to use ADCs (Digital voltmeter, ammeter etc.). In such situations it’s difficult to set up a separate ADC hardware circuit for our project.
So How to Use Analog to Digital Converter (ADC module) in PIC microchip microcontroller? PIC microcontrollers have inbuilt ADC module making easy Analog to Digital conversion.
In this article I’m gonna show you how to make use of ADC module in PIC16F877A microcontroller with the help of Mikro C Pro compiler and Proteus 8 simulator.
At the end of this tutorial, I did the video demonstration and simulation about analog to digital conversion using PIC16f877a.
After reading this ADC tutorial, I’m sure that you will be able to program a PIC microcontroller for manipulating the ADC module. Come on let’s start PIC microcontroller programming.
Before going to the circuit diagram and embedded program, let me figure out some details about ADC in PIC and also ADC and inbuilt library functions in Mikro C.
ADC Register in PIC MCU
- ADC (Analog to Digital Converter) module is offered in many of PIC MCU models.
- The Analog-to-Digital (A/D) Converter module has eight inputs for the 40 pin PIC Microcontrollers.
- In PIC16F877A, PORTA is multiplexed with ADC register, Comparator and Digital I/O operations. Due to the availability of ADC, PORTA is also known as Analog port.
- In order to work on ADC we must configure the ADC register in proper way.
- In PIC MCU, the conversion of an analog input signal effects in an equivalent 10-bit digital number (10 bit ADC).
Mikro C ADC Library and Important Library Routines for ADC Module
Micro C Library functions provide comfortable platform for working with ADC module in PIC. The only thing that we should add is the LCD library from the library manager.
For more detail: Analog to Digital Converter Using PIC16f877A Microcontroller
EasyEDA: Ideas for Circuit Design, Innovation for Electronics Access
Free Circuit Design: Schematic – Simulation – PCB Layout – Gerber Viewer
JLCPCB Prototype: Only $2 for 10pcs 10×10cm, 24 hours Quick Turn, DHL Delivery in 3 days
Current Project / Post can also be found using:
- adc in microcontroller
- analog to digital converter sample c program for pic 16f877a
- robotics tutorial for beginners pdf free