SlideShare a Scribd company logo
1 of 14
1
PIC Microcontroller
Prof. Ashvini Kulkarni
Assistant Professor
Department of Electronics & Telecommunication
Hope Foundation’s
International Institute of Information Technology, I²IT
www.isquareit.edu.in
 Characteristics of ADC
 PIC 18 ADC features
 PIC 18 ADC control registers
Hope Foundation’s International Institute of Information Technology, I²IT, P-14 Rajiv Gandhi Infotech Park, Hinjawadi, Pune - 411 057
Tel - +91 20 22933441 / 2 / 3 | Website - www.isquareit.edu.in ; Email - info@isquareit.edu.in
2
 Analog signal is converted into a digital data that
can be processed using a digital computer.
 Types of ADC:
 Slope and double-slope type
 Flash type
 Successive approximation
Hope Foundation’s International Institute of Information Technology, I²IT, P-14 Rajiv Gandhi Infotech Park, Hinjawadi, Pune - 411 057
Tel - +91 20 22933441 / 2 / 3 | Website - www.isquareit.edu.in ; Email - info@isquareit.edu.in
3
 Characteristics of ADC[2]:
1. Resolution:
 ADC has n- bit resolution(where n=8,10,12,16,24
bits)
 Higher the resolution smaller the step size
 If ADC has 8 bit resolution means 2^8= 256(No. of
steps)
 Applied voltage is Vref=5v then 5/256=19.53 mv
(step size)
2. Conversion time:
 The time it takes for the converting analog input to
digital output Vref:It is input voltage used for the
reference voltage
 Vref/no. of steps(Vref is responsible for step size)
Hope Foundation’s International Institute of Information Technology, I²IT, P-14 Rajiv Gandhi Infotech Park, Hinjawadi, Pune - 411 057
Tel - +91 20 22933441 / 2 / 3 | Website - www.isquareit.edu.in ; Email - info@isquareit.edu.in
4
 Characteristics of ADC:
3. Digital data output:
 8 bit ADC, we have 8bit digital data output of D0
–D7
 Dout=Vin/step size[2]
Hope Foundation’s International Institute of Information Technology, I²IT, P-14 Rajiv Gandhi Infotech Park, Hinjawadi, Pune - 411 057
Tel - +91 20 22933441 / 2 / 3 | Website - www.isquareit.edu.in ; Email - info@isquareit.edu.in
5
 Features of ADC
1) The ADC in PIC18F4550 is a successive
approximation ADC with a resolution of 10 bits.
2) It has 10 input channels.
Hope Foundation’s International Institute of Information Technology, I²IT, P-14 Rajiv Gandhi Infotech Park, Hinjawadi, Pune - 411 057
Tel - +91 20 22933441 / 2 / 3 | Website - www.isquareit.edu.in ; Email - info@isquareit.edu.in
6
Configuring Registers
Hope Foundation’s International Institute of Information Technology, I²IT, P-14 Rajiv Gandhi Infotech Park, Hinjawadi, Pune - 411 057
Tel - +91 20 22933441 / 2 / 3 | Website - www.isquareit.edu.in ; Email - info@isquareit.edu.in7
The PIC18 Microcontroller
- The A/D converter has the following
registers[1]:
• A/D Control Register 0 (ADCON0)
• A/D Control Register 1 (ADCON1)
• A/D Control Register 2 (ADCON2)
• A/D Result High Register (ADRESH)
• A/D Result Low Register (ADRESL)
Hope Foundation’s International Institute of Information Technology, I²IT, P-14 Rajiv Gandhi Infotech Park, Hinjawadi, Pune - 411 057
Tel - +91 20 22933441 / 2 / 3 | Website - www.isquareit.edu.in ; Email - info@isquareit.edu.in
8
Figure No. 1: Block diagram of ADC in PIC18f4550[1]
 Each port pin associated with the A/D
converter can be configured as an
analog input or as a digital I/O.
 When the A/D conversion is complete,
the result is loaded into the
ADRESH:ADRESL registers,
 the GO/DONE bit (ADCON0 register) is
cleared and A/D Interrupt Flag bit,
ADIF, is set.
Hope Foundation’s International Institute of Information Technology, I²IT, P-14 Rajiv Gandhi Infotech Park, Hinjawadi, Pune - 411 057
Tel - +91 20 22933441 / 2 / 3 | Website - www.isquareit.edu.in ; Email - info@isquareit.edu.in
9
 The analog reference voltage is
software selectable to either the
device’s positive and negative supply
voltage (VDD and VSS) or the voltage
level on the RA3/AN3/VREF+ and
RA2/AN2/VREF-/CVREF pins.
Hope Foundation’s International Institute of Information Technology, I²IT, P-14 Rajiv Gandhi Infotech Park, Hinjawadi, Pune - 411 057
Tel - +91 20 22933441 / 2 / 3 | Website - www.isquareit.edu.in ; Email - info@isquareit.edu.in
10
1. Configure the A/D module: Configure analog pins,
voltage reference and digital I/O (ADCON1)
 Select A/D input channel (ADCON0)
 Select A/D acquisition time (ADCON2)
 Select A/D conversion clock (ADCON2)
 Turn on A/D module (ADCON0)
2. Configure A/D interrupt (if desired):
 Clear ADIF bit
 Set ADIE bit
 Set GIE bit
3. Wait the required acquisition time (if required).
 Start conversion
 Set GO/DONE=1 bit in (ADCON0 register)
Hope Foundation’s International Institute of Information Technology, I²IT, P-14 Rajiv Gandhi Infotech Park, Hinjawadi, Pune - 411 057
Tel - +91 20 22933441 / 2 / 3 | Website - www.isquareit.edu.in ; Email - info@isquareit.edu.in
11
5. Wait for A/D conversion to complete, by either:
 Polling for the GO/DONE bit to be cleared OR Waiting
for the A/D interrupt
6. Read A/D Result registers (ADRESH:ADRESL);
 clear bit ADIF, if interrupt bit is set.
7. For next conversion, go to step 1 or step 2, as
required.
Hope Foundation’s International Institute of Information Technology, I²IT, P-14 Rajiv Gandhi Infotech Park, Hinjawadi, Pune - 411 057
Tel - +91 20 22933441 / 2 / 3 | Website - www.isquareit.edu.in ; Email - info@isquareit.edu.in
12
[1] Microchip datasheet of PIC18F2455/2550/4455/4550
[2] Muhamad Ali Mazidi,Rolind D Mckinly,”PIC
microcontroller and embedded systems”Pearson
publication.
Hope Foundation’s International Institute of Information Technology, I²IT, P-14 Rajiv Gandhi Infotech Park, Hinjawadi, Pune - 411 057
Tel - +91 20 22933441 / 2 / 3 | Website - www.isquareit.edu.in ; Email - info@isquareit.edu.in
13
For further information please contact
Ashvini Kulkarni
Department of Electronics & Telecommunication
Hope Foundation’s International Institute of
Information Technology, I²IT
Hinjawadi, Pune – 411 057
Phone - +91 20 22933441
www.isquareit.edu.in | ashvinik@isquareit.edu.in
| info@isquareit.edu.in
14

More Related Content

What's hot

PLC ARCHITECTURE AND HARDWARE COMPONENTS
PLC ARCHITECTURE AND HARDWARE COMPONENTSPLC ARCHITECTURE AND HARDWARE COMPONENTS
PLC ARCHITECTURE AND HARDWARE COMPONENTSAkshay Dhole
 
Subroutine in 8051 microcontroller
Subroutine in 8051 microcontrollerSubroutine in 8051 microcontroller
Subroutine in 8051 microcontrollerbhadresh savani
 
EDLC-EMBEDDED PRODUCT DEVELOPMENT LIFE CYCLE
EDLC-EMBEDDED PRODUCT DEVELOPMENT LIFE CYCLEEDLC-EMBEDDED PRODUCT DEVELOPMENT LIFE CYCLE
EDLC-EMBEDDED PRODUCT DEVELOPMENT LIFE CYCLESabeel Irshad
 
Embedded system in washing machine
Embedded system in washing machineEmbedded system in washing machine
Embedded system in washing machineVignesh Suresh
 
8051 experiments1
8051 experiments18051 experiments1
8051 experiments1tt_aljobory
 
Arm programmer's model
Arm programmer's modelArm programmer's model
Arm programmer's modelv Kalairajan
 
M ary psk modulation
M ary psk modulationM ary psk modulation
M ary psk modulationAhmed Diaa
 
EC8791 consumer electronics-platform level performance analysis
EC8791 consumer electronics-platform level performance analysisEC8791 consumer electronics-platform level performance analysis
EC8791 consumer electronics-platform level performance analysisRajalakshmiSermadurai
 
Introduction to embedded systems
Introduction  to embedded systemsIntroduction  to embedded systems
Introduction to embedded systemsRAMPRAKASHT1
 
ADC Interfacing with pic Microcontrollert
ADC Interfacing with pic MicrocontrollertADC Interfacing with pic Microcontrollert
ADC Interfacing with pic Microcontrollertleapshare007
 
Design challenges in embedded systems
Design challenges in embedded systemsDesign challenges in embedded systems
Design challenges in embedded systemsmahalakshmimalini
 
Ch 1 introduction to Embedded Systems (AY:2018-2019--> First Semester)
Ch 1 introduction to Embedded Systems (AY:2018-2019--> First Semester)Ch 1 introduction to Embedded Systems (AY:2018-2019--> First Semester)
Ch 1 introduction to Embedded Systems (AY:2018-2019--> First Semester)Moe Moe Myint
 
VLSI subsystem design processes and illustration
VLSI subsystem design processes and illustrationVLSI subsystem design processes and illustration
VLSI subsystem design processes and illustrationVishal kakade
 

What's hot (20)

PLC ARCHITECTURE AND HARDWARE COMPONENTS
PLC ARCHITECTURE AND HARDWARE COMPONENTSPLC ARCHITECTURE AND HARDWARE COMPONENTS
PLC ARCHITECTURE AND HARDWARE COMPONENTS
 
Interrupts in 8051
Interrupts in 8051Interrupts in 8051
Interrupts in 8051
 
Subroutine in 8051 microcontroller
Subroutine in 8051 microcontrollerSubroutine in 8051 microcontroller
Subroutine in 8051 microcontroller
 
EDLC-EMBEDDED PRODUCT DEVELOPMENT LIFE CYCLE
EDLC-EMBEDDED PRODUCT DEVELOPMENT LIFE CYCLEEDLC-EMBEDDED PRODUCT DEVELOPMENT LIFE CYCLE
EDLC-EMBEDDED PRODUCT DEVELOPMENT LIFE CYCLE
 
LCD Interacing with 8051
LCD Interacing with 8051LCD Interacing with 8051
LCD Interacing with 8051
 
Embedded system in washing machine
Embedded system in washing machineEmbedded system in washing machine
Embedded system in washing machine
 
Adc interfacing
Adc interfacingAdc interfacing
Adc interfacing
 
8051 experiments1
8051 experiments18051 experiments1
8051 experiments1
 
Arm programmer's model
Arm programmer's modelArm programmer's model
Arm programmer's model
 
M ary psk modulation
M ary psk modulationM ary psk modulation
M ary psk modulation
 
MicroC/OS-II
MicroC/OS-IIMicroC/OS-II
MicroC/OS-II
 
EC8791 consumer electronics-platform level performance analysis
EC8791 consumer electronics-platform level performance analysisEC8791 consumer electronics-platform level performance analysis
EC8791 consumer electronics-platform level performance analysis
 
Introduction to embedded systems
Introduction  to embedded systemsIntroduction  to embedded systems
Introduction to embedded systems
 
RS 232
RS 232RS 232
RS 232
 
ADC Interfacing with pic Microcontrollert
ADC Interfacing with pic MicrocontrollertADC Interfacing with pic Microcontrollert
ADC Interfacing with pic Microcontrollert
 
Design challenges in embedded systems
Design challenges in embedded systemsDesign challenges in embedded systems
Design challenges in embedded systems
 
Ch 1 introduction to Embedded Systems (AY:2018-2019--> First Semester)
Ch 1 introduction to Embedded Systems (AY:2018-2019--> First Semester)Ch 1 introduction to Embedded Systems (AY:2018-2019--> First Semester)
Ch 1 introduction to Embedded Systems (AY:2018-2019--> First Semester)
 
VLSI subsystem design processes and illustration
VLSI subsystem design processes and illustrationVLSI subsystem design processes and illustration
VLSI subsystem design processes and illustration
 
EC8791 UML-model train controller
EC8791 UML-model train controllerEC8791 UML-model train controller
EC8791 UML-model train controller
 
Case study of digital camera
Case study of digital cameraCase study of digital camera
Case study of digital camera
 

Similar to PIC Microcontroller | ADC Interfacing

IoT based Smart board for Displaying and Forwarding notices using Raspberry Pi
IoT based Smart board for Displaying and Forwarding notices using Raspberry PiIoT based Smart board for Displaying and Forwarding notices using Raspberry Pi
IoT based Smart board for Displaying and Forwarding notices using Raspberry PiSinthana Sambandam
 
IRJET- Students Smart Card using RFID
IRJET-  	  Students Smart Card using RFIDIRJET-  	  Students Smart Card using RFID
IRJET- Students Smart Card using RFIDIRJET Journal
 
Smart Vending Machine System Using IOT
Smart Vending Machine System Using IOTSmart Vending Machine System Using IOT
Smart Vending Machine System Using IOTIRJET Journal
 
IRJET- College Bus Fee Payment System
IRJET- College Bus Fee Payment SystemIRJET- College Bus Fee Payment System
IRJET- College Bus Fee Payment SystemIRJET Journal
 
IRJET- Braille Oriented Classroom
IRJET-  	  Braille Oriented ClassroomIRJET-  	  Braille Oriented Classroom
IRJET- Braille Oriented ClassroomIRJET Journal
 
Rachit 20 March 2015
Rachit 20 March 2015Rachit 20 March 2015
Rachit 20 March 2015Rachit Kapoor
 
IOT Virtual Doctor Robot for Online Doctor Consultation of Patient Healthcare...
IOT Virtual Doctor Robot for Online Doctor Consultation of Patient Healthcare...IOT Virtual Doctor Robot for Online Doctor Consultation of Patient Healthcare...
IOT Virtual Doctor Robot for Online Doctor Consultation of Patient Healthcare...IRJET Journal
 
Raspberry Pi Traffic Light
Raspberry Pi Traffic LightRaspberry Pi Traffic Light
Raspberry Pi Traffic LightMANJUTRIPATHI7
 
IRJET - Pick and Place Surveillance Robot
IRJET -  	  Pick and Place Surveillance RobotIRJET -  	  Pick and Place Surveillance Robot
IRJET - Pick and Place Surveillance RobotIRJET Journal
 
IRJET- Design and Implementation of PID Controller using HDL on FPGA
IRJET- 	  Design and Implementation of PID Controller using HDL on FPGAIRJET- 	  Design and Implementation of PID Controller using HDL on FPGA
IRJET- Design and Implementation of PID Controller using HDL on FPGAIRJET Journal
 

Similar to PIC Microcontroller | ADC Interfacing (20)

Basics of Computer Graphics
Basics of Computer GraphicsBasics of Computer Graphics
Basics of Computer Graphics
 
Introduction To Assembly Language Programming
Introduction To Assembly Language ProgrammingIntroduction To Assembly Language Programming
Introduction To Assembly Language Programming
 
Interfacing of LCD with LPC2148
Interfacing of LCD with LPC2148Interfacing of LCD with LPC2148
Interfacing of LCD with LPC2148
 
IoT based Smart board for Displaying and Forwarding notices using Raspberry Pi
IoT based Smart board for Displaying and Forwarding notices using Raspberry PiIoT based Smart board for Displaying and Forwarding notices using Raspberry Pi
IoT based Smart board for Displaying and Forwarding notices using Raspberry Pi
 
Industrial Internet of Things (IIoT)
Industrial Internet of Things (IIoT)Industrial Internet of Things (IIoT)
Industrial Internet of Things (IIoT)
 
DAA Introduction to Algorithms & Application
DAA Introduction to Algorithms & ApplicationDAA Introduction to Algorithms & Application
DAA Introduction to Algorithms & Application
 
Interrupt Handling with LPC2148
Interrupt Handling with LPC2148Interrupt Handling with LPC2148
Interrupt Handling with LPC2148
 
Fundamentals of Computer Networks
Fundamentals of Computer NetworksFundamentals of Computer Networks
Fundamentals of Computer Networks
 
IRJET- Students Smart Card using RFID
IRJET-  	  Students Smart Card using RFIDIRJET-  	  Students Smart Card using RFID
IRJET- Students Smart Card using RFID
 
Smart Vending Machine System Using IOT
Smart Vending Machine System Using IOTSmart Vending Machine System Using IOT
Smart Vending Machine System Using IOT
 
IRJET- College Bus Fee Payment System
IRJET- College Bus Fee Payment SystemIRJET- College Bus Fee Payment System
IRJET- College Bus Fee Payment System
 
IRJET- Braille Oriented Classroom
IRJET-  	  Braille Oriented ClassroomIRJET-  	  Braille Oriented Classroom
IRJET- Braille Oriented Classroom
 
Introduction To Fog Computing
Introduction To Fog ComputingIntroduction To Fog Computing
Introduction To Fog Computing
 
Rachit 20 March 2015
Rachit 20 March 2015Rachit 20 March 2015
Rachit 20 March 2015
 
IOT Virtual Doctor Robot for Online Doctor Consultation of Patient Healthcare...
IOT Virtual Doctor Robot for Online Doctor Consultation of Patient Healthcare...IOT Virtual Doctor Robot for Online Doctor Consultation of Patient Healthcare...
IOT Virtual Doctor Robot for Online Doctor Consultation of Patient Healthcare...
 
SMART LATHE MACHINE
SMART LATHE MACHINESMART LATHE MACHINE
SMART LATHE MACHINE
 
Raspberry Pi Traffic Light
Raspberry Pi Traffic LightRaspberry Pi Traffic Light
Raspberry Pi Traffic Light
 
IRJET - Pick and Place Surveillance Robot
IRJET -  	  Pick and Place Surveillance RobotIRJET -  	  Pick and Place Surveillance Robot
IRJET - Pick and Place Surveillance Robot
 
Introduction to TCP Protocol Suite
Introduction to TCP Protocol SuiteIntroduction to TCP Protocol Suite
Introduction to TCP Protocol Suite
 
IRJET- Design and Implementation of PID Controller using HDL on FPGA
IRJET- 	  Design and Implementation of PID Controller using HDL on FPGAIRJET- 	  Design and Implementation of PID Controller using HDL on FPGA
IRJET- Design and Implementation of PID Controller using HDL on FPGA
 

More from International Institute of Information Technology (I²IT)

More from International Institute of Information Technology (I²IT) (20)

Minimization of DFA
Minimization of DFAMinimization of DFA
Minimization of DFA
 
Understanding Natural Language Processing
Understanding Natural Language ProcessingUnderstanding Natural Language Processing
Understanding Natural Language Processing
 
What Is Smart Computing?
What Is Smart Computing?What Is Smart Computing?
What Is Smart Computing?
 
Professional Ethics & Etiquette: What Are They & How Do I Get Them?
Professional Ethics & Etiquette: What Are They & How Do I Get Them?Professional Ethics & Etiquette: What Are They & How Do I Get Them?
Professional Ethics & Etiquette: What Are They & How Do I Get Them?
 
Writing Skills: Importance of Writing Skills
Writing Skills: Importance of Writing SkillsWriting Skills: Importance of Writing Skills
Writing Skills: Importance of Writing Skills
 
Professional Communication | Introducing Oneself
Professional Communication | Introducing Oneself Professional Communication | Introducing Oneself
Professional Communication | Introducing Oneself
 
Servlet: A Server-side Technology
Servlet: A Server-side TechnologyServlet: A Server-side Technology
Servlet: A Server-side Technology
 
What Is Jenkins? Features and How It Works
What Is Jenkins? Features and How It WorksWhat Is Jenkins? Features and How It Works
What Is Jenkins? Features and How It Works
 
Cloud Computing
Cloud ComputingCloud Computing
Cloud Computing
 
Hypothesis-Testing
Hypothesis-TestingHypothesis-Testing
Hypothesis-Testing
 
Data Science, Big Data, Data Analytics
Data Science, Big Data, Data AnalyticsData Science, Big Data, Data Analytics
Data Science, Big Data, Data Analytics
 
Types of Artificial Intelligence
Types of Artificial Intelligence Types of Artificial Intelligence
Types of Artificial Intelligence
 
Difference Between AI(Artificial Intelligence), ML(Machine Learning), DL (Dee...
Difference Between AI(Artificial Intelligence), ML(Machine Learning), DL (Dee...Difference Between AI(Artificial Intelligence), ML(Machine Learning), DL (Dee...
Difference Between AI(Artificial Intelligence), ML(Machine Learning), DL (Dee...
 
Sentiment Analysis in Machine Learning
Sentiment Analysis in  Machine LearningSentiment Analysis in  Machine Learning
Sentiment Analysis in Machine Learning
 
What Is Cloud Computing?
What Is Cloud Computing?What Is Cloud Computing?
What Is Cloud Computing?
 
Introduction To Design Pattern
Introduction To Design PatternIntroduction To Design Pattern
Introduction To Design Pattern
 
Importance of Theory of Computations
Importance of Theory of ComputationsImportance of Theory of Computations
Importance of Theory of Computations
 
Java as Object Oriented Programming Language
Java as Object Oriented Programming LanguageJava as Object Oriented Programming Language
Java as Object Oriented Programming Language
 
What Is High Performance-Computing?
What Is High Performance-Computing?What Is High Performance-Computing?
What Is High Performance-Computing?
 
Data Visualization - How to connect Microsoft Forms to Power BI
Data Visualization - How to connect Microsoft Forms to Power BIData Visualization - How to connect Microsoft Forms to Power BI
Data Visualization - How to connect Microsoft Forms to Power BI
 

Recently uploaded

complete construction, environmental and economics information of biomass com...
complete construction, environmental and economics information of biomass com...complete construction, environmental and economics information of biomass com...
complete construction, environmental and economics information of biomass com...asadnawaz62
 
Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024hassan khalil
 
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSAPPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSKurinjimalarL3
 
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube ExchangerStudy on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube ExchangerAnamika Sarkar
 
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETEINFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETEroselinkalist12
 
Electronically Controlled suspensions system .pdf
Electronically Controlled suspensions system .pdfElectronically Controlled suspensions system .pdf
Electronically Controlled suspensions system .pdfme23b1001
 
Call Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile serviceCall Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile servicerehmti665
 
GDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentationGDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentationGDSCAESB
 
Internship report on mechanical engineering
Internship report on mechanical engineeringInternship report on mechanical engineering
Internship report on mechanical engineeringmalavadedarshan25
 
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...Soham Mondal
 
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)dollysharma2066
 
Current Transformer Drawing and GTP for MSETCL
Current Transformer Drawing and GTP for MSETCLCurrent Transformer Drawing and GTP for MSETCL
Current Transformer Drawing and GTP for MSETCLDeelipZope
 
Sachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective IntroductionSachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective IntroductionDr.Costas Sachpazis
 
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdfCCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdfAsst.prof M.Gokilavani
 
Introduction-To-Agricultural-Surveillance-Rover.pptx
Introduction-To-Agricultural-Surveillance-Rover.pptxIntroduction-To-Agricultural-Surveillance-Rover.pptx
Introduction-To-Agricultural-Surveillance-Rover.pptxk795866
 
Introduction to Microprocesso programming and interfacing.pptx
Introduction to Microprocesso programming and interfacing.pptxIntroduction to Microprocesso programming and interfacing.pptx
Introduction to Microprocesso programming and interfacing.pptxvipinkmenon1
 

Recently uploaded (20)

complete construction, environmental and economics information of biomass com...
complete construction, environmental and economics information of biomass com...complete construction, environmental and economics information of biomass com...
complete construction, environmental and economics information of biomass com...
 
Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024
 
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSAPPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
 
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube ExchangerStudy on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
 
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETEINFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
 
Electronically Controlled suspensions system .pdf
Electronically Controlled suspensions system .pdfElectronically Controlled suspensions system .pdf
Electronically Controlled suspensions system .pdf
 
Call Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile serviceCall Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile service
 
GDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentationGDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentation
 
Internship report on mechanical engineering
Internship report on mechanical engineeringInternship report on mechanical engineering
Internship report on mechanical engineering
 
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
 
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
 
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
 
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)
 
Current Transformer Drawing and GTP for MSETCL
Current Transformer Drawing and GTP for MSETCLCurrent Transformer Drawing and GTP for MSETCL
Current Transformer Drawing and GTP for MSETCL
 
Sachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective IntroductionSachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
 
POWER SYSTEMS-1 Complete notes examples
POWER SYSTEMS-1 Complete notes  examplesPOWER SYSTEMS-1 Complete notes  examples
POWER SYSTEMS-1 Complete notes examples
 
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdfCCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
 
Introduction-To-Agricultural-Surveillance-Rover.pptx
Introduction-To-Agricultural-Surveillance-Rover.pptxIntroduction-To-Agricultural-Surveillance-Rover.pptx
Introduction-To-Agricultural-Surveillance-Rover.pptx
 
Introduction to Microprocesso programming and interfacing.pptx
Introduction to Microprocesso programming and interfacing.pptxIntroduction to Microprocesso programming and interfacing.pptx
Introduction to Microprocesso programming and interfacing.pptx
 
young call girls in Green Park🔝 9953056974 🔝 escort Service
young call girls in Green Park🔝 9953056974 🔝 escort Serviceyoung call girls in Green Park🔝 9953056974 🔝 escort Service
young call girls in Green Park🔝 9953056974 🔝 escort Service
 

PIC Microcontroller | ADC Interfacing

  • 1. 1 PIC Microcontroller Prof. Ashvini Kulkarni Assistant Professor Department of Electronics & Telecommunication Hope Foundation’s International Institute of Information Technology, I²IT www.isquareit.edu.in
  • 2.  Characteristics of ADC  PIC 18 ADC features  PIC 18 ADC control registers Hope Foundation’s International Institute of Information Technology, I²IT, P-14 Rajiv Gandhi Infotech Park, Hinjawadi, Pune - 411 057 Tel - +91 20 22933441 / 2 / 3 | Website - www.isquareit.edu.in ; Email - info@isquareit.edu.in 2
  • 3.  Analog signal is converted into a digital data that can be processed using a digital computer.  Types of ADC:  Slope and double-slope type  Flash type  Successive approximation Hope Foundation’s International Institute of Information Technology, I²IT, P-14 Rajiv Gandhi Infotech Park, Hinjawadi, Pune - 411 057 Tel - +91 20 22933441 / 2 / 3 | Website - www.isquareit.edu.in ; Email - info@isquareit.edu.in 3
  • 4.  Characteristics of ADC[2]: 1. Resolution:  ADC has n- bit resolution(where n=8,10,12,16,24 bits)  Higher the resolution smaller the step size  If ADC has 8 bit resolution means 2^8= 256(No. of steps)  Applied voltage is Vref=5v then 5/256=19.53 mv (step size) 2. Conversion time:  The time it takes for the converting analog input to digital output Vref:It is input voltage used for the reference voltage  Vref/no. of steps(Vref is responsible for step size) Hope Foundation’s International Institute of Information Technology, I²IT, P-14 Rajiv Gandhi Infotech Park, Hinjawadi, Pune - 411 057 Tel - +91 20 22933441 / 2 / 3 | Website - www.isquareit.edu.in ; Email - info@isquareit.edu.in 4
  • 5.  Characteristics of ADC: 3. Digital data output:  8 bit ADC, we have 8bit digital data output of D0 –D7  Dout=Vin/step size[2] Hope Foundation’s International Institute of Information Technology, I²IT, P-14 Rajiv Gandhi Infotech Park, Hinjawadi, Pune - 411 057 Tel - +91 20 22933441 / 2 / 3 | Website - www.isquareit.edu.in ; Email - info@isquareit.edu.in 5
  • 6.  Features of ADC 1) The ADC in PIC18F4550 is a successive approximation ADC with a resolution of 10 bits. 2) It has 10 input channels. Hope Foundation’s International Institute of Information Technology, I²IT, P-14 Rajiv Gandhi Infotech Park, Hinjawadi, Pune - 411 057 Tel - +91 20 22933441 / 2 / 3 | Website - www.isquareit.edu.in ; Email - info@isquareit.edu.in 6
  • 7. Configuring Registers Hope Foundation’s International Institute of Information Technology, I²IT, P-14 Rajiv Gandhi Infotech Park, Hinjawadi, Pune - 411 057 Tel - +91 20 22933441 / 2 / 3 | Website - www.isquareit.edu.in ; Email - info@isquareit.edu.in7 The PIC18 Microcontroller - The A/D converter has the following registers[1]: • A/D Control Register 0 (ADCON0) • A/D Control Register 1 (ADCON1) • A/D Control Register 2 (ADCON2) • A/D Result High Register (ADRESH) • A/D Result Low Register (ADRESL)
  • 8. Hope Foundation’s International Institute of Information Technology, I²IT, P-14 Rajiv Gandhi Infotech Park, Hinjawadi, Pune - 411 057 Tel - +91 20 22933441 / 2 / 3 | Website - www.isquareit.edu.in ; Email - info@isquareit.edu.in 8 Figure No. 1: Block diagram of ADC in PIC18f4550[1]
  • 9.  Each port pin associated with the A/D converter can be configured as an analog input or as a digital I/O.  When the A/D conversion is complete, the result is loaded into the ADRESH:ADRESL registers,  the GO/DONE bit (ADCON0 register) is cleared and A/D Interrupt Flag bit, ADIF, is set. Hope Foundation’s International Institute of Information Technology, I²IT, P-14 Rajiv Gandhi Infotech Park, Hinjawadi, Pune - 411 057 Tel - +91 20 22933441 / 2 / 3 | Website - www.isquareit.edu.in ; Email - info@isquareit.edu.in 9
  • 10.  The analog reference voltage is software selectable to either the device’s positive and negative supply voltage (VDD and VSS) or the voltage level on the RA3/AN3/VREF+ and RA2/AN2/VREF-/CVREF pins. Hope Foundation’s International Institute of Information Technology, I²IT, P-14 Rajiv Gandhi Infotech Park, Hinjawadi, Pune - 411 057 Tel - +91 20 22933441 / 2 / 3 | Website - www.isquareit.edu.in ; Email - info@isquareit.edu.in 10
  • 11. 1. Configure the A/D module: Configure analog pins, voltage reference and digital I/O (ADCON1)  Select A/D input channel (ADCON0)  Select A/D acquisition time (ADCON2)  Select A/D conversion clock (ADCON2)  Turn on A/D module (ADCON0) 2. Configure A/D interrupt (if desired):  Clear ADIF bit  Set ADIE bit  Set GIE bit 3. Wait the required acquisition time (if required).  Start conversion  Set GO/DONE=1 bit in (ADCON0 register) Hope Foundation’s International Institute of Information Technology, I²IT, P-14 Rajiv Gandhi Infotech Park, Hinjawadi, Pune - 411 057 Tel - +91 20 22933441 / 2 / 3 | Website - www.isquareit.edu.in ; Email - info@isquareit.edu.in 11
  • 12. 5. Wait for A/D conversion to complete, by either:  Polling for the GO/DONE bit to be cleared OR Waiting for the A/D interrupt 6. Read A/D Result registers (ADRESH:ADRESL);  clear bit ADIF, if interrupt bit is set. 7. For next conversion, go to step 1 or step 2, as required. Hope Foundation’s International Institute of Information Technology, I²IT, P-14 Rajiv Gandhi Infotech Park, Hinjawadi, Pune - 411 057 Tel - +91 20 22933441 / 2 / 3 | Website - www.isquareit.edu.in ; Email - info@isquareit.edu.in 12
  • 13. [1] Microchip datasheet of PIC18F2455/2550/4455/4550 [2] Muhamad Ali Mazidi,Rolind D Mckinly,”PIC microcontroller and embedded systems”Pearson publication. Hope Foundation’s International Institute of Information Technology, I²IT, P-14 Rajiv Gandhi Infotech Park, Hinjawadi, Pune - 411 057 Tel - +91 20 22933441 / 2 / 3 | Website - www.isquareit.edu.in ; Email - info@isquareit.edu.in 13
  • 14. For further information please contact Ashvini Kulkarni Department of Electronics & Telecommunication Hope Foundation’s International Institute of Information Technology, I²IT Hinjawadi, Pune – 411 057 Phone - +91 20 22933441 www.isquareit.edu.in | ashvinik@isquareit.edu.in | info@isquareit.edu.in 14