The Silicon Laboratories C8051F020

Slides:



Advertisements
Similar presentations
Analog to digital converter
Advertisements

ECE/CS-352: Embedded Microcontroller Systems The Silicon Laboratories C8051F020 Enhanced 8051 Part 5 Other Subsystems.
Jordan Barry Victor Brzeski
Analog to Digital Conversion (ADC)
Data Acquisition ET 228 Chapter
Analog to Digital Conversion
Digital to Analog and Analog to Digital Conversion
Lecture 11 Digital-to-Analog Converters and Analog Comparators.
Analog to Digital Conversion. 12 bit vs 16 bit A/D Card Input Volts = A/D 12 bit 2 12 = Volts = Volts = 2048 −10 Volts = 0 Input Volts.
Kuliah Mikrokontroler AVR Comparator AVR Eru©September 2009 PENS.
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.
ADC and DAC. Reason for Signal Conversion digital AD2 DA1.
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.
Introduction of Holtek HT-46 series MCU
ECE 371 – Unit 15 Data Acquisition Systems A/Ds in MC9S12DPS56B Microcontroller.
EET260: A/D and D/A converters
Analogue Input/Output
Timers and Interrupts Shivendu Bhushan Summer Camp ‘13.
Digital to Analog and Analog to Digital Conversion
Digital to Analog Converters
DEEPAK.P MICROPROCESSORS AND APPLICATIONS Mr. DEEPAK P. Associate Professor ECE Department SNGCE 1.
1 Timing System Timing System Applications. 2 Timing System components Counting mechanisms Input capture mechanisms Output capture mechanisms.
Analog to Digital Converters (ADC) 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
Analog to Digital conversion. Introduction  The process of converting an analog signal into an equivalent digital signal is known as Analog to Digital.
Data Acquisition Systems
ELN5622 Embedded Systems Class 7 Spring, 2003 Aaron Itskovich
ELE2MIC Lecture 21 The AVR Sleep Modes ATMEGA128’s Analog to Digital Converter –Features –Block Diagram –Clock Source –Input Sources –Interrupts –BandGap.
遙控車程式 B 陳慶哲 通訊二甲. Outline: Main ( ) : 主程式 System_Initial ( ) : 系統初始化 A2D( ) : ADC PPM( ) : 輸出 PPM 訊號 Output_high ( ) : 輸出 PPM 訊號的 high Output_low.
Lecture 2 Silicon Labs C8051F020 System Overview.
1 LHO 13 The 8051CF020 and the University Daughter Card.
Data Acquisition ET 228 Chapter 15 Subjects Covered Analog to Digital Converter Characteristics Integrating ADCs Successive Approximation ADCs Flash ADCs.
ECE/CS-352: Embedded Microcontroller Systems The Silicon Laboratories C8051F020 Enhanced 8051 Part 4 Timer3, Temperature Sensor, AD0WINT.
Alexei SemenovGeneric Digitizer Generic Digitizer 10MHZ 16 bit 6U VME Board.
CHAPTER 19 Data Conversion. Objectives Describe and Analyze: Analog vs. Digital Signals Resolution Digital-to-Analog Conversion Analog-to Digital Conversion.
Analog Capture- Port E. Digital to Analog and Analog to Digital Conversion D/A or DAC and A/D or ADC.
Microcontroller based system design Asst. Prof. Dr. Alper ŞİŞMAN.
Analog/Digital Conversion
The Silicon Laboratories C8051F020
通訊三甲 B 湯智瑋 通訊實驗 - 遙控車程式 ( 三 ). Outline Main ( ) : 主程式 System_Initial ( ) : 系統初始化 A2D( ) : ADC PPM( ) : 輸出 PPM 訊號 Output_high ( ) : 輸出 PPM 訊號的.
ECE 2799 Electrical and Computer Engineering Design ANALOG to DIGITAL CONVERSION Prof. Bitar Last Update:
Analog to Digital Converter (ADC)
Embedded Systems Design 1 Lecture Set C Interfacing the MCS-51 to: –D/A Converter –A/D Converter.
Analog to Digital Conversion - ADC Mark Neil - Microprocessor Course 1 Device Drivers – Measuring Voltages.
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.
Renesas Electronics Europe GmbH A © 2010 Renesas Electronics Corporation. All rights reserved. RL78 AD converter.
By: Shivanshi pandya(30) Ayushi chourasia (3) Pranavi chhikniwala(6)
 Mini-Computer ◦ Microprocessor  The Brains  Arithmetic Logic Unit (ALU)  Control Unit  Program/ Data Storage  Peripherals (Input/Output)  Low-Cost.
Digital to analog converter [DAC]
SAR ADC Tao Chen.
Analog-Digital Conversion
Analog Comparator An analog comparator is available on pins PE2(AIN0), PE3(AIN1) The comparator operates like any other comparator. -when (+) exceeds (-)
EI205 Lecture 13 Dianguang Ma Fall 2008.
ADC,DAC and sensor interface
ADC, DAC, and Sensor Interfacing
Created by Luis Chioye Presented by Cynthia Sosa
Simple ADC structures.
Simple ADC structures.
ADC, DAC, and Sensor Interfacing
8051 Timers / Counters It has two timers Timer 0 and Timer 1.
Lesson 8: Analog Signal Conversion
PIC18F458 Analog-to-Digital
ADC and DAC Programming in AVR
ADC and DAC Data Converter
MSP432™ MCUs Training Part 6: Analog Peripherals
Prof. Chung-Ta King Department of Computer Science
Chapter 7 Converters.
 Both data about the physical world and control signals sent to interact with the physical world are typically "analog" or continuously varying quantities.
Presentation transcript:

The Silicon Laboratories C8051F020 Enhanced 8051 Part 4 Analog to Digital Conversion (ADC) ECE/CS-352: Embedded Microcontroller Systems

Analog to Digital Conversion Digital value 01111110 10110000 10111110 01111100 01111110 11111110 11101110 11111110 01110000 time time Analog A/D Converter Digital (8-bit) GND ECE/CS-352: Embedded Microcontroller Systems

Analog to Digital Conversion DAC n Basic idea is to compare analog input to value produced by DAC and use logic to adjust the digital output so that it properly represents the analog input. A/D converters classified based on what logic is used. ECE/CS-352: Embedded Microcontroller Systems

ECE/CS-352: Embedded Microcontroller Systems Counting Converter DAC n Count from 0 to 2n, when DAC output is higher than Input, then flag changes. ECE/CS-352: Embedded Microcontroller Systems

Successive Approximation DAC n Starting at MSB, set each bit to 1, and if it trips the comparator, reset to 0. If not, hold at 1. Repeat for all bits. 100000000000 110000000000 101000000000 ..... Example... first 3 bits 110000000000 analog 101000000000 100000000000 ECE/CS-352: Embedded Microcontroller Systems

Analog to Digital Conversion Precision A/D Converter n Analog Digital Analog 0.00 0.25 0.50 0.75 1.00 1.25 1.50 1.75 2.00 2.25 2.50 2.75 3.00 3.25 3.50 3.75 4.00 Digital 0000 0001 0010 0011 0100 0101 0110 0111 1000 1001 1010 1011 1100 1101 1110 1111 Examples: Analog Range: 0V-4V Digital: n=4 Precision: 4 Volts 16 values .25 V/bit ECE/CS-352: Embedded Microcontroller Systems

ECE/CS-352: Embedded Microcontroller Systems C8051F020 A/D Converters ADC0 12-bit Successive Approximation (SAR) 100ksps (kilo-samples per second) ADC1 8-bit SAR 500ksps ECE/CS-352: Embedded Microcontroller Systems

ECE/CS-352: Embedded Microcontroller Systems ADC0 Analog source options SFRs Reference voltage options Conversion sync options ECE/CS-352: Embedded Microcontroller Systems

AMX0CF – AMUX0 Configuration Register Differential pair inputs: + - V V can be positive or negative 0 – single-ended analog inputs 1 – differential pairs AMX0CF ECE/CS-352: Embedded Microcontroller Systems

AMX0SL – AMUX0 Channel Select Register AMUX0 address bits What is MUXed in depends on AMUX0CF AMX0SL ECE/CS-352: Embedded Microcontroller Systems

ECE/CS-352: Embedded Microcontroller Systems AMUX0SL Possibilities ECE/CS-352: Embedded Microcontroller Systems

ADC0CF – ADC0 Configuration Register Bit7-Bit3: SAR Conversion Clock Period Bits Bit2-Bit0: Internal Amplifier Gain 000: Gain = 1 001: Gain = 2 010: Gain = 4 011: Gain = 8 10x: Gain = 16 11x: Gain = 0.5 ADC0CF ECE/CS-352: Embedded Microcontroller Systems

ADC0CN – ADC0 Control Register AD0EN 0 = disabled 1 = enabled AD0TM Track mode bit (low power mode) AD0INT (must be cleared by software) 0 = conversion not completed 1 = conversion has been completed AD0BUSY 0 = conversion not in progress 1 = conversion in progress ADC0CN ECE/CS-352: Embedded Microcontroller Systems

ADC0CN – ADC0 Control Register Bit3-2: ADC0 Start of Conversion Mode Select. If AD0TM = 0 (tracking mode on): 00: ADC0 conversion initiated on every write of ‘1’ to AD0BUSY. 01: ADC0 conversion initiated on overflow of Timer 3. 10: ADC0 conversion initiated on rising edge of external CNVSTR. 11: ADC0 conversion initiated on overflow of Timer 2. If AD0TM = 1: Same as above except conversion takes 3 SAR clock cycles longer Bit1: ADC0 Window Compare Interrupt Flag. This bit must be cleared by software. 0: ADC0 Window Comparison Data match has not occurred since this flag was last cleared. 1: ADC0 Window Comparison Data match has occurred. Bit0: ADC0 Left Justify Select. 0: Data in ADC0H:ADC0L registers are right-justified. 1: Data in ADC0H:ADC0L registers are left-justified. ECE/CS-352: Embedded Microcontroller Systems

ECE/CS-352: Embedded Microcontroller Systems Selecting VREF, Gain Maximum VREF = 3.3V (Vdd) Suppose analog range is about 0-3V No Gain needed External VREF of 3V 0r Gain = .5 (so analog range becomes 0-1.5V) VREF from DAC0 of 1.5V Suppose analog range is low: 0-0.01V Use max gain of 16 (so range is 0-0.16V) VREF from DAC0 or external, 0.16V) ECE/CS-352: Embedded Microcontroller Systems

ECE/CS-352: Embedded Microcontroller Systems ADC0 Example + - Vin 2.0V Differential input (can be negative or positive) on AIN0 and AIN1 (channel select AIN0) Convert on timer 2 overflow Amplify by 4 Right justified data Interrupt each conversion External Vref = 2.0V ECE/CS-352: Embedded Microcontroller Systems

ECE/CS-352: Embedded Microcontroller Systems ADC0 Example Data Conversion: Gain = 4 VREF = 2.0V Note: Vin limited to range of -.5V to +.5V Vin ADC0H: ADC0L +.5V 07FFh 00000111:11111111 +.25V 0400h 00000100:00000000 0000h 00000000:00000000 -.25V FC00h 11111100:00000000 -.5V F800h 11111000:00000000 n = 12 for single-ended inputs, n = 11 for differential Values are sign-extended. ECE/CS-352: Embedded Microcontroller Systems

Conversion Calculations analog range Vref – 1 lsb 000h digital range FFFh (4095) There are 4096 different digital values corresponding to 0-Vref. Find the voltage per least significant bit: Now find analog value corresponding to some digital value Xd ECE/CS-352: Embedded Microcontroller Systems

ECE/CS-352: Embedded Microcontroller Systems Become AD Converts.... ECE/CS-352: Embedded Microcontroller Systems