PIC Microcontroller ADC interfacing Prof. Ashvini Kulkarni

Slides:



Advertisements
Similar presentations
Analog to digital converter
Advertisements

Electronics Design Lab TUTORIAL PIC Microcontrollers Francesco Tenore 2/10/2006.
Sistemi Elettronici Programmabili13-1 MULTI OSC + CLOCK FILTER LVD POWER SUPPLY CONTROL 8 BIT CORE ALU PROGRAM MEMORY RAM I2CI2C PORT A SPI PORT B 16-BIT.
Microprocessor Systems Design I Instructor: Dr. Michael Geiger Spring 2014 Lecture 32: PIC example programs: Analog to digital conversion.
Analog to Digital Convertor MTT48 V1.0 ADC - 1 ANALOG TO DIGITAL CONVERTOR (ADC)
Analog Comparator Positive input chooses bet. PB2 and Bandgap Reference. Negative input chooses bet. PB3 and the 8 inputs of the A/D. ACME= Analog Comparator.
PIC16F bit 8-channel Analog-to-Digital Converter.
Slides created by: Professor Ian G. Harris Inputs and Outputs PIC Vcc RA3 RA4 RA5  Make an LED toggle state when button is pressed  Need to read RA3,
Data acquisition and manipulation
Explain the introduction to ADC, ADC characteristics, Programming ADC using PIC18, Introduction to DAC and DAC interfacing with PIC18.
ECT 357 Ch 10 Analog to Digital COnversion. Today’s Quote: It’s better to die with a good name than to live with a bad one. It’s better to die with a.
Interfacing ADC to 8051.
Analog to Digital Converters (ADC)
S4525A Peripherals & Enhanced FLASH 1 © 1999 Microchip Technology Incorporated. All Rights Reserved. S4525A Peripherals & Enhanced FLASH 1 Peripherals.
Analog-to-Digital Converters
Analogue Input/Output
Engineering 1040: Mechanisms & Electric Circuits Fall 2011 Introduction to Embedded Systems.
Smart-grid Interface with Photovoltaic Installation – Phase 2 PP-01 Team members: Matt Koresh Ivan Mills Matt Martin Advisor: Dr. Aliprantis.
PIC microcontrollers. PIC microcontrollers come in a wide range of packages from small chips with only 8 pins and 512 words of memory all the way up to.
Data Converters ELEC 330 Digital Systems Engineering Dr. Ron Hayne
Teachers Name : Suman Sarker Telecommunication Technology Subject Name : Microcontroller & Embedded System Subject Code : 6871 Semester : 7th Department.
Digital to Analogue Converter
dsPIC DSC –Modul A/D Conversia A/D Registre programare
Lecture 11: Liquid Level Control System: A Case Study 1.
Microcontroller based system design Asst. Prof. Dr. Alper ŞİŞMAN.
Chapter 11 Data Acquisition and Manipulation The aims of this chapter are to introduce: the main features of a data acquisition system; the characteristics.
ECE 2799 Electrical and Computer Engineering Design ANALOG to DIGITAL CONVERSION Prof. Bitar Last Update:
Department of Electronic & Electrical Engineering Further work? Simple Voltmeter. ● Analogue to Digital converter (MCP3001 SPI ) ● Analogue → 10bit binary.
Analog to Digital Converter (ADC)
D ATA A CQUISITION AND M ANIPULATION. A NALOG V S. D IGITAL Q UANTITIES 2.
0808/0809 ADC. Block Diagram ADC ADC0808/ADC Bit μP Compatible A/D Converters with 8-Channel Multiplexer The 8-bit A/D converter uses successive.
A Quick Start Guide to PIC16F877 microcontroller And Microchip Development Environment A Quick Start Guide to PIC16F877 microcontroller And Microchip Development.
CEng3361 CENG 336 INT. TO EMBEDDED SYSTEMS DEVELOPMENT Spring 2011 Recitation 06.
Microcontrollers Part II BME 201. Overview ADC Serial.
 Mini-Computer ◦ Microprocessor  The Brains  Arithmetic Logic Unit (ALU)  Control Unit  Program/ Data Storage  Peripherals (Input/Output)  Low-Cost.
EE Embedded Systems Fall 2015
ECE 354 Computer Systems Lab II
PIC18F458 Analog-to-Digital
ADC and DAC Programming in AVR
ADC and DAC Data Converter
DESIGN PATTERNS : State Pattern
Physics of Nanoparticles
Composition & Resolution of Forces
DESIGN PATTERNS : Adapter Pattern
EQUIVALENCE CALCULATIONS UNDER INFLATION
NP-COMPLETE Prof. Manjusha Amritkar Assistant Professor Department of Information Technology Hope Foundation’s International Institute of Information.
International Institute of Information Technology, (I²IT).
Software Design Methodologies and Testing
Pass Structure of Assembler
INTERNATIONAL INSTITUTE OF IFORMATION TECHNOLOGY, (I²IT)
INTERNATIONAL INSTITUTE OF IFORMATION TECHNOLOGY, (I²IT)
ADDITION OF TWO POLYNOMIALS
Newton’s Laws of Motion
By Sandeep Patil, Department of Computer Engineering, I²IT
Differential Equation
BINARY HEAP Prof ajitkumar shitole Assistant Professor Department of computer engineering Hope Foundation’s International Institute of Information.
gyroscope Prof Varsha Degaonkar Assistant Professor
Introduction to TCP/IP protocol Suite
Hope Foundation’s International Institute of Information.
Introduction to Human Computer Interaction
Design procedure for an Integrator
ADC and DAC Data Converter
Prof. Deptii Chaudhari.
Tel Hope Foundation’s International Institute of Information Technology, (I²IT). Tel
INTERNATIONAL INSTITUTE OF IFORMATION TECHNOLOGY, (I²IT)
DAA - Introduction Dr. Sashikala Mishra Associate Professor Department of Computer Engineering Hope Foundation’s INTERNATIONAL INSTITUTE OF INFORMATION.
TIME-BASED HYBRID ANALOG-DIGITAL COMPUTATION
Tel Hope Foundation’s International Institute of Information Technology, (I²IT). Tel
CASCADING STYLE SHEET WEB TECHNOLOGY
Presentation transcript:

PIC Microcontroller ADC interfacing Prof. Ashvini Kulkarni Assistant Professor Department of Electronics & Telecommunication Hope Foundation’s International Institute of Information Technology, I²IT www.isquareit.edu.in

Contents 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

ADC 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

ADC Characteristics of ADC[2]: 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) 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

ADC Characteristics of ADC: 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

ADC in PIC 18 Features of ADC The ADC in PIC18F4550 is a successive approximation ADC with a resolution of 10 bits. 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

Configuring Registers 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

Figure No. 1: Block diagram of ADC in PIC18f4550[1] ADC Block Diagram Figure No. 1: Block diagram of ADC in PIC18f4550[1] 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

ADC Block 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

ADC Block 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

ADC Algorithm[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) 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

ADC Algorithm 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

References [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

THANK YOU 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