By: Shivanshi pandya(30) Ayushi chourasia (3) Pranavi chhikniwala(6)

Slides:



Advertisements
Similar presentations
Analog to digital converter
Advertisements

Mark Neil - Microprocessor Course 1 Device Drivers – Digital Voltmeter.
Programmable Keyboard/ Display Interface: 8279
Analog to Digital Conversion
Kuliah Mikrokontroler AVR Comparator AVR Eru©September 2009 PENS.
Analog/Digital Subsystem
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.
Oscilloscope Watch Teardown. Agenda History and General overview Hardware design: – Block diagram and general overview – Choice of the microcontroller.
-Done By Haresh Miriyala
Analog to Digital Converter
Lecture 12 Analog to Digital Converters. 2  What is an ADC?  Output vs. input  Input range  Single-ended vs. differential inputs  Output coding:
Kuliah Mikrokontroler AVR ADC AVR Eru©September 2009 PENS.
Microprocessor based Design for Biomedical Applications MBE 3 – MDBA IV : The ATmega8 Basic Features (3)
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.
ECE 371 – Unit 15 Data Acquisition Systems A/Ds in MC9S12DPS56B Microcontroller.
Analog to Digital Converters (ADC)
HT46 A/D Type MCU Series Data Memory (Byte) Program Memory HT46R22 (OTP) HT46C22 (Mask) 2Kx Kx16 4Kx HT46R23 (OTP) HT46C23 (Mask) HT46R24.
Engineering 4862 Microprocessors Lecture 26 Cheng Li EN-4012
DEEPAK.P MICROPROCESSORS AND APPLICATIONS Mr. DEEPAK P. Associate Professor ECE Department SNGCE 1.
Embedded System Design Laboratory October 11, 2002Stanford University - EE281 Lecture #4#1 Lecture #4 Outline Announcements Project Proposal AVR Processor.
Digital to Analogue Converter
ELE2MIC Lecture 21 The AVR Sleep Modes ATMEGA128’s Analog to Digital Converter –Features –Block Diagram –Clock Source –Input Sources –Interrupts –BandGap.
SIGMA-DELTA ADC SD16_A Sigma-Delta ADC Shruthi Sujendra.
Advanced uC Session Speaker : Chiraag Juvekar Jan 13, 2011 Speaker : Chiraag Juvekar Jan 13, 2011.
CHAPTER HARDWARE CONNECTION. Pin Description 8051 family members ◦ e.g., 8751, 89C51, 89C52, DS89C4x0) ◦ Have 40 pins dedicated for various functions.
Atmel Atmega128 Overview ALU Particulars RISC Architecture 133, Mostly single cycle instructions 2 Address instructions (opcode, Rs, Rd, offset) 32x8 Register.
Renesas Electronics Corporation © 2010 Renesas Electronics America Inc. All rights reserved. RX 12 Bit Analog-to-Digital Converter A Rev /1/10.
Suleyman Demirel University CSS340 Microprocessor Systems – Lecture 2 ATMEGA328P ARCHITECTURE ANALOG INPUTS.
The Silicon Laboratories C8051F020
INTRODUCTION TO PIC MICROCONTROLLER. Overview and Features The term PIC stands for Peripheral Interface Controller. Microchip Technology, USA. Basically.
Analog Capture- Port E. Digital to Analog and Analog to Digital Conversion D/A or DAC and A/D or ADC.
Analog to Digital Converter (ADC). Analog to Digital Converters  Microcontroller understands only digital language.  To convert the analog output from.
Microcontroller based system design Asst. Prof. Dr. Alper ŞİŞMAN.
Lab 3: ADC.
ECE 2799 Electrical and Computer Engineering Design ANALOG to DIGITAL CONVERSION Prof. Bitar Last Update:
Analog to Digital Converter (ADC)
Analog to Digital Conversion - ADC Mark Neil - Microprocessor Course 1 Device Drivers – Measuring Voltages.
Chapter Microcontroller
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.
NAM S.B MDLAB. Electronic Engineering, Kangwon National University 1.
DEPARTMENT OF ELECTRONICS ENGINEERING V-SEMESTER MICROPROCESSOR & MICROCONTROLLER 1 CHAPTER NO microcontroller & programming.
Sensing Algorithm using IR Sensor and ADC Soong-sil University. Robotics 기 정 두 원.
1 Lab 4: D/A Converter Lab 4: D/A Converter This is a simple resistive network for a D/A converter Port 1, Port 0 are digital inputs ==> 00 (minimum),
Renesas Electronics Europe GmbH A © 2010 Renesas Electronics Corporation. All rights reserved. RL78 AD converter.
WATER LEVEL INDICATOR AND AUTOMATIC MOTOR SWITCHING SYSTEM
 Mini-Computer ◦ Microprocessor  The Brains  Arithmetic Logic Unit (ALU)  Control Unit  Program/ Data Storage  Peripherals (Input/Output)  Low-Cost.
Environment Temperature Monitor
AVR ATMEGA 8 MICRO-CONTROLLER
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
COMP2121: Microprocessors and Interfacing
ADC, DAC, and Sensor Interfacing
Keyboard/Display Controller INTEL 8279
ADC, DAC, and Sensor Interfacing
ECE 354 Computer Systems Lab II
I/O Ports in AVR Sepehr Naimi
ADC, DAC, and Sensor Interfacing
PIC18F458 Analog-to-Digital
Lecture 13 A/D Converter & D/A Converter
I/O Ports in AVR Sepehr Naimi
ADC and DAC Programming in AVR
ADC and DAC Data Converter
MSP432™ MCUs Training Part 6: Analog Peripherals
AVR – ATmega103(ATMEL) Architecture & Summary
CHAPTER HARDWARE CONNECTION.
Device Drivers – Digital Voltmeter
ADC and DAC Data Converter
PIC Microcontroller ADC interfacing Prof. Ashvini Kulkarni
Presentation transcript:

By: Shivanshi pandya(30) Ayushi chourasia (3) Pranavi chhikniwala(6)

Introduction In this chapter we will describe ADCs(Analog-to-Digital Converters) and interfacing of Sensors in AVR. In section 1, we describe ADCs(Analog-to-Digital Converters) chip. In section 2, we will program the ADC portion of th AVR chip. In section 3, we show the interfacing of the sensors.

Microcontroller connection to sensor via ADC

do Analog Input Start Conversation Vin D0 D7 Binary Data Output Vref An 8-bit ADC block diagram ATmega32 ADC features It is a 10-bit ADC. It has 8 Analog, 7 Differential, and 2 Differential INPUTS. The converted OUTPUT binary data is held by two special function registers. We have the option of making either the upper or lower 6-bits unused. Also we have three options for choosing Vref. The conversion time is detected by crystal frequency connected to XTAL pin.

PROGRAMMING of ADC in AVR In the AVR microcontroller 5 major registers are associated with the ADC that we deal in this topic. 1.ADCH(High data) 2.ADCL(Low data) 3.ADCSRA(ADC control and status register) 4.ADMUX(ADC Multiplexer Selection register) 5.SPIOR(Special Function I/O register)

REFS1 REFS0ADLARMUX4MUX3MUX2 MUX1MUX0 ADMUX(ADC MULTIPLEXER SELECTION) Register REF1:0 Bit 7:6 Reference Selection Bits These bits select the reference voltage for ADC ADLAR Bit 5 ADC Left Adjust Results This bit dictates either the left bits or the right bit bits of the result register ADCH:ADCL that are used to store the result. MUX4:0 Bit 4:0 Analog Channel and Gain Selection Bits The value of these bits selects the gain for the differential channels and also selects which combination of analog inputs are connected to the ADC.

REFS1REFS0Vref 00AREF pinSet Externally 01AVCC pinSame as VCC 10Reserved……… 11Internal 2.56 VFixed regardless of VCC

ADCL(A/D Result Low) and ADCH(A/D Result High) The converted output data is held by two special function registers call ADCL and ADCH. ADCH:ADCL registers gives us 16 bits and ADC data out is only 10 bits wide, 6 bits of the 16 are unused. We have the option of making either the upper 6 or the lower 6 bits unused. D9D8D7D6D5D4D3D2 D7D6D5D4D3D2D1D0 UNUSEDD9D8 D1D0UNUSED ADLAR=1 ADLAR=0 Left justified Right justified ADCH ADCL

MUX 4…0 MUX combination are used to choose the input channel i.e. select single-ended or differential input. We can also select the Op-amp gain. MUX4…0Single-ended input 00000ADC ADC ADC ADC ADC ADC ADC ADC7

ADCSRA register ADEN ADSCADATEADIFADIEADSP2 ADSP1ADSP0 ADEN Bit 7 ADC Enable This bit enable or disables the ADC. Setting this bit to one will enable the ADC, and clearing this bit to zero will Disable it even while a conversation is in progress. ADSC Bit 6 ADC Start Conversion To start each conversion you have to set this bit to one. ADATE Bit 5 ADC Auto Trigger Enable Auto Trigger ing of the ADC is enabled when you set this bit to one. ADIF Bit 4 ADC Interrupt Flag This bit is set when an ADC conversion completed and data registers are updated. ADIE Bit 3 ADC Interrupt Enable Setting this bit to one enables the ADC conversion complete interrupt. ADSP2:0 Bit2:0 ADC Prescaler Select Bits These bits Determine the division factor between the XTAL frequency and the input clock to the ADC.

ADPS2:0 (A/D conversion time) According to combination of this 3 bit we can select the conversion time with the different prescalers of crystal Frequency(Fosc) connected to AVR chip. ADPS2ADPS1ADPS0ADC Clock 000Reserve d 001Ck/2 010Ck/4 011Ck/8 100Ck/16 101Ck/32 110Ck/64 111Ck/128 7 Bit ADC Prescaler Ck/2 Ck/4 Ck/8 Ck/16 Ck/32 Ck/64 Ck/128 ADPS0 ADPS1 ADPS2 ADC Clock Source

Moving forward to the awaited moment…… programming in AVR.. Task : write a program to glow the leds connected on port B and port D according to the reading of temperature sensor.

.INCLUDE”M32DEF.INC”; LDI R16,0XFF; OUT DDRD,R16; SBI DDRA,0; LDI R16,0X87; OUT ADCSRA,R16; LDI R16,E0; OUT ADMUX,R16; READ_DATA: SBI ADCSRA,ADSC; CHECK_INTERRUPT: SBIS ADCSRS,ADIF; JMP CHECK_INTERRUPT; SBI ADCSRA,ADIF; IN R16,ADCL; OUT DDRD,R16; IN R16,ADCH; OUT DDRB,R16; JMP READ_DATA;

THANK YOU…