Analog to digital converter

Slides:



Advertisements
Similar presentations
Electronics Design Lab TUTORIAL PIC Microcontrollers Francesco Tenore 2/10/2006.
Advertisements

Jordan Barry Victor Brzeski
Mark Neil - Microprocessor Course 1 Device Drivers – Digital Voltmeter.
Microcontroller based system design Asst. Prof. Dr. Alper ŞİŞMAN.
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.
Analog to Digital Conversion
ECE 265 – LECTURE 14 Analog Signal Acquisition The A/D converters 5/14/ ECE265.
Kuliah Mikrokontroler AVR Comparator AVR Eru©September 2009 PENS.
Analog/Digital Subsystem
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.
Lecture 5: PIC32 development board, Timers ADC and interrupts,
Kuliah Mikrokontroler AVR ADC AVR Eru©September 2009 PENS.
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.
1 Analog-to-Digital Converter (ADC). 2 ADC Features (1/3) ADC conversion rate 1 MHz and 12-bit resolution – 1µs conversion time at 56 MHz – 1.17µs conversion.
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.
Analogue Input/Output
Smart-grid Interface with Photovoltaic Installation – Phase 2 PP-01 Team members: Matt Koresh Ivan Mills Matt Martin Advisor: Dr. Aliprantis.
DEEPAK.P MICROPROCESSORS AND APPLICATIONS Mr. DEEPAK P. Associate Professor ECE Department SNGCE 1.
Data Converters ELEC 330 Digital Systems Engineering Dr. Ron Hayne
Digital to Analogue Converter
Lecture 13 A/D Converter & D/A Converter. Outline Basic Operation Single Scan Mode Continuous Scan Mode Group Scan Mode Interrupt Sources Registers D/A.
One of the most important feature of the microcontroller is a number of input/output pins used for connection with peripherals. In the case of PIC 167CX,
ELE2MIC Lecture 21 The AVR Sleep Modes ATMEGA128’s Analog to Digital Converter –Features –Block Diagram –Clock Source –Input Sources –Interrupts –BandGap.
Universal Asynchronous Receiver/Transmitter (UART)
RS232 #use rs232(baud=9600,xmit=PIN_C6,rcv=PIN_C7
dsPIC DSC –Modul A/D Conversia A/D Registre programare
8279 KEYBOARD AND DISPLAY INTERFACING
Renesas Electronics Corporation © 2010 Renesas Electronics America Inc. All rights reserved. RX 12 Bit Analog-to-Digital Converter A Rev /1/10.
ATtiny23131 A SEMINAR ON AVR MICROCONTROLLER ATtiny2313.
The Silicon Laboratories C8051F020
Analog Capture- Port E. Digital to Analog and Analog to Digital Conversion D/A or DAC and A/D or ADC.
By James Cockrell and Justin Loveless
I NTRODUCTION TO PIC PROGRAMMING By : S HERIF H ARHASH.
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.
Analog to Digital Converter (ADC)
Analog to Digital Conversion - ADC Mark Neil - Microprocessor Course 1 Device Drivers – Measuring Voltages.
Microcontrollers session. What is Microcontroller? Microcontroller is composed of microprocessor,ram, flash memory,EEPROM and some modules like timers,
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.
ADC 1 Analog to Digital Converter. ADC 2 ADC Features n General Features -Supports 8 or 10-bit resolution Modes, -Track period fully programmable up to.
EE 319K Introduction to Embedded Systems
By: Shivanshi pandya(30) Ayushi chourasia (3) Pranavi chhikniwala(6)
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.
Digital-to-Analog Analog-to-Digital
Chapter 12: Analog-to-Digital Converter
Workshop 3. Digital-to-analog and analog-to digital conversion
Analog Comparator An analog comparator is available on pins PE2(AIN0), PE3(AIN1) The comparator operates like any other comparator. -when (+) exceeds (-)
ADC,DAC and sensor interface
EECE.3170 Microprocessor Systems Design I
Programming Microcontroller ADC – Analog Digital Converter
ECE 354 Computer Systems Lab II
PIC18F458 Analog-to-Digital
Lecture 13 A/D Converter & D/A Converter
ADC and DAC Programming in AVR
ADC and DAC Data Converter
MSP432™ MCUs Training Part 6: Analog Peripherals
Pondicherry Engineering College
Device Drivers – Digital Voltmeter
ADC and DAC Data Converter
PIC Microcontroller ADC interfacing Prof. Ashvini Kulkarni
Presentation transcript:

Analog to digital converter

ADC features The converter generates a 10-bit binary result using the method of successive approximation and stores the conversion results into the ADC registers (ADRESL and ADRESH). There are 14 separate analog inputs. The A/D converter allows conversion of an analog input signal to a 10-bit binary representation of that signal and By selecting voltage references Vref- and Vref+, the minimal resolution or quality of conversion may be adjusted to various needs.

ADC MODE AND REGISTERS

REGISTERS ADRESH - Contains high byte of conversion result. ADRESL - Contains low byte of conversion result. ADCON0 - Control register 0 and ADCON1 Control register 1.

ADRESH AND ADRESL

ADCON0 **ADCS1, ADCS0 - A/D Conversion Clock Select bits select clock frequency used for internal synchronization of A/D converter. It also affects duration of conversion. **CHS3-CHS0 - Analog Channel Select bits select a pin or an analog channel for conversion, i.e. voltage measurement **GO/DONE - A/D Conversion Status bit determines current status of conversion: 1 - A/D conversion is in progress; and 0 - A/D conversion is complete. This bit is automatically cleared by hardware when the A/D conversion is completed. **ADON - A/D On bit enables A/D converter. 1 - A/D converter is enabled; and 0 - A/D converter is disabled.

ADCON1 **ADFM - A/D Result Format Select bit 1 - Conversion result right justified. Six most significant bits of the ADRESLH are not used; and 0 - Conversion result left justified. Six least significant bits of the ADRESL are not used. **VCFG1 - Voltage Reference bit selects negative voltage reference source needed for A/D converter operating. 1 - Negative voltage reference is applied on the Vref- pin; and 0 - Voltage power supply Vss is used as negative voltage reference source. **VCFG0 - Voltage Reference bit selects positive voltage reference source needed for A/D converter operating. 1 - Positive voltage reference is applied on the Vref+ pin; and 0 - Voltage power supply Vdd is used as positive voltage reference source.

USING ADC Step 1 - Configuring port: Write logic one (1) to the corresponding bit of the TRIS register to configure it as input; and Write logic one (1) to the corresponding bit of the ANSEL register to configure it as analog input. Step 2 - Configuring ADC module: Configure voltage reference in the ADCON1 register; Select ADC conversion clock in the ADCON0 register; Select one of input channels CH0-CH13 of the ADCON0 register; Select data format using the ADFM bit of the ADCON1 register; and Enable A/D converter by setting the ADON bit of the ADCON0 register.

USING ADC CONTI.. Step 3 - Configuring ADC interrupt (optionally): Clear the ADIF bit; and Set the ADIE, PEIE and GIE bits. Step 4 - Wait for the required acquisition time (approximately 20uS) to pass. Step 5 - Start conversion by setting the GO/DONE bit of the ADCON0 register. Step 6 - Wait for ADC conversion to complete. It is necessary to check in program loop whether the GO/DONE pin is cleared or wait for an A/D interrupt (must be previously enabled). Step 7 - Read ADC results: Read the ADRESH and ADRESL registers.