ECE 265 – LECTURE 14 Analog Signal Acquisition The A/D converters 5/14/2015 1 ECE265.

Slides:



Advertisements
Similar presentations
Interfacing to the Analog World
Advertisements

Interfacing to the Analog World
Chapter 12: Analog Converter Subsystem
Analog-to-Digital Converter (ADC) And
Analogue to Digital Conversion By Cap’n Tim Johnson, PE Prepared 11/12/2013.
EET 2261 Unit 14 INCOMPLETE Analog-to-Digital Conversion (ADC) & Digital-to-Analog Conversion (DAC)  Read.  Homework #13 and Lab #13 due next week. 
Lecture 17: Analog to Digital Converters Lecturers: Professor John Devlin Mr Robert Ross.
Sensors Interfacing.
Data Acquisition ET 228 Chapter
Announcements Assignment 8 posted –Due Friday Dec 2 nd. A bit longer than others. Project progress? Dates –Thursday 12/1 review lecture –Tuesday 12/6 project.
Analog to Digital Conversion. Introduction  An analog-to-digital converter (ADC, A/D, or A to D) is a device that converts continuous signals to discrete.
Data Acquisition Concepts Data Translation, Inc. Basics of Data Acquisition.
Khaled A. Al-Utaibi  Digital Vs Analog Signals  Converting an Analog Signal to a Digital One  Reading Analog Sensors with the.
Lecture 9: D/A and A/D Converters
Analogue to Digital Conversion
68HC11 Analog I/O Chapter 12.
Interfacing Analog and Digital Circuits
Unit 4 Sensors and Actuators
Data acquisition and manipulation
Explain the introduction to ADC, ADC characteristics, Programming ADC using PIC18, Introduction to DAC and DAC interfacing with PIC18.
Interfacing with the Analog World Wen-Hung Liao, Ph.D.
Analogue to Digital Conversion
Introduction to Data Conversion
Analog to Digital Converters (ADC)
EET 252 Unit 7 Digital-to-Analog Conversion
H. Huang Transparency No.11-1 The 68HC11 Microcontroller Chapter 11: 68HC11 Analog to Digital Converter The 68HC11 Microcontroller Han-Way Huang Minnesota.
Engineering 4862 Microprocessors Lecture 26 Cheng Li EN-4012
ECE 265 – LECTURE 16 Complete System Example A Weight Measurement System 8/13/ ECE265.
Week #7 Data Acquisition System, Part (A)
Computer Based Data Acquisition Basics. Outline Basics of data acquisition Analog to Digital Conversion –Quantization –Aliasing.
Digital to Analog Converters (DAC) 1
Engineering 1040: Mechanisms & Electric Circuits Winter 2015 Analog & Digital Signals Analog to Digital Conversion (ADC)
Data Converters ELEC 330 Digital Systems Engineering Dr. Ron Hayne
ACOE2551 Microprocessors Data Converters Analog to Digital Converters (ADC) –Convert an analog quantity (voltage, current) into a digital code Digital.
Wireless Intelligent Sensor Modules for Home Monitoring and Control Presented by: BUI, Phuong Nhung, 裴芳绒 António M. Silva1, Alexandre Correia1, António.
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.
Data Acquisition Systems
ELN5622 Embedded Systems Class 7 Spring, 2003 Aaron Itskovich
Instrumentation (AMME2700) 1 Instrumentation Dr. Xiaofeng Wu.
Revised: Aug 1, ECE 263 Embedded System Design Lessons HC12 Analog-to-Digital (ATD) Converter System.
Lecture 15: Digital to Analog Converters Lecturers: Professor John Devlin Mr Robert Ross.
Representing Numerical Data Analog Any signal that varies continuously over time Mechanical Pneumatic Hydraulic Electrical Digital Quantities are represented.
Suleyman Demirel University CSS340 Microprocessor Systems – Lecture 2 ATMEGA328P ARCHITECTURE ANALOG INPUTS.
ECE 353 Introduction to Microprocessor Systems Michael G. Morrow, P.E. Module #7 Assessment Quiz.
Analog Capture- Port E. Digital to Analog and Analog to Digital Conversion D/A or DAC and A/D or ADC.
Data Acquisition System
ECE 2799 Electrical and Computer Engineering Design ANALOG to DIGITAL CONVERSION Prof. Bitar Last Update:
Analog to Digital Converter (ADC)
ECE 447: Lecture 2 Internal Input/Output Devices A/D Converter.
Digital-to-Analog Analog-to-Digital Week 10. Data Handling Systems  Both data about the physical world and control signals sent to interact with the.
Lecture Notes / PPT UNIT III
1 Summary Lecture: Part 1 Sensor Readout Electronics and Data Conversion Discovering Sensor Networks: Applications in Structural Health Monitoring.
Analog-Digital Conversion. Other types of ADC i. Dual Slope ADCs use a capacitor connected to a reference voltage. the capacitor voltage starts at zero.
Networked Embedded Systems Sachin Katti & Pengyu Zhang EE107 Spring 2016 Lecture 13 Interfacing with the Analog World.
Residential Audio & Video Systems Copyright © 2005 Heathkit Company, Inc. All Rights Reserved Presentation 15 – Digital Audio and Video.
Digital to analog converter [DAC]
MECH 373 Instrumentation and Measurements
Data Acquisition ET 228 Chapter
Chapter 12: Analog-to-Digital Converter
ECE265 ECE 265 Final Exam Review 9/14/2018.
Engineering 4862 Microprocessors Lecture 25
Lesson 8: Analog Signal Conversion
PIC18F458 Analog-to-Digital
EET 2261 Unit 14 INCOMPLETE Analog-to-Digital Conversion (ADC) & Digital-to-Analog Conversion (DAC) Read. Homework #13 and Lab #13 due next week. Quiz.
Lecture 13 A/D Converter & D/A Converter
Conversation between Analogue and Digital System
ADC and DAC Data Converter
ADC and DAC Data Converter
 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:

ECE 265 – LECTURE 14 Analog Signal Acquisition The A/D converters 5/14/ ECE265

Lecture Overview  Analog signal acquistion  The A/D Converters on the 68HC11  REF: Chapters 7 and 8 plus the 68HC11 reference manual. 5/14/ ECE265

Analog signals  Analog output is typical of most transducers and sensors.  Need to convert these analog signals into a digital representation so the microcontroller can use it.  Some characteristics of analog signals. 5/14/2015ECE265 3

Analog signals  Analog output is typical of most transducers and sensors.  Need to convert these analog signals into a digital representation so the microcontroller can use it.  Some characteristics of analog signals.  Maximum and minimum voltages 5/14/2015ECE265 4

Analog signals  Analog output is typical of most transducers and sensors.  Need to convert these analog signals into a digital representation so the microcontroller can use it.  Some characteristics of analog signals.  Maximum and minimum voltages  Precise continuous signals 5/14/2015ECE265 5

Analog signals  Analog output is typical of most transducers and sensors.  Need to convert these analog signals into a digital representation so the microcontroller can use it.  Some characteristics of analog signals.  Maximum and minimum voltages  Precise continuous signals  Rate of voltage change 5/14/2015ECE265 6

Analog signals  Analog output is typical of most transducers and sensors.  Need to convert these analog signals into a digital representation so the microcontroller can use it.  Some characteristics of analog signals.  Maximum and minimum voltages  Precise continuous signals  Rate of voltage change  Frequency if not a steady state signal 5/14/2015ECE265 7

Analog-to-Digital Converters  The ideal transfer function of a 3-bit ADC  Full-scale (input voltage) range (FSR)  Analog signal is continuous  Digital – finite and discrete  In general n-bit converter  Total of 2 n output codes 5/14/2015ECE265 8

Quantization Error and FS  The smallest input change that can be detected.  In the 3 bit example it would be 1 Volt and defines the converters LSB accuracy.  Another term – Full Scale input – the largest analog voltage that a converter can detect. Voltages greater than the FS input will result in a converted value of  Similarly inputs less than the minimum input voltage result in /14/2015ECE265 9

Quantization Error of the 68HC11  Graphical view  Note how discrete  values represent  the analog signal 5/14/2015ECE265 10

The 68HC11  The 68HC11 has an 8 bit A/D converter which results in 256 possible digital output values.  The resolution = FSR/256  The FSR of the 68HC11 is 0 to 5.12V so the resolution is 20mV/1bit  5.12V/256 = V/bit = 20.3 mV/bit  Meaning – input change of 20mV changes LSB 5/14/2015ECE265 11

68HC11 ADRs  68HC11 has 4 A-to-D conversion registers  When a conversion is done, result is placed in one of the ADRx registers, where x is 1 to 4. 5/14/2015ECE265 12

Math Conversion equation  The output-input characteristic equation of an ADC  D = (1/resolution)V m  Where D is the decimal value of the output word and V m is the measured voltage.  Example (from Ex 7.3)  The input voltage is 2.56V – what is the converted digital value?  Output D = (1bit/20mV)2560mV = 128 Converting to binary gives which will be stored in one of the 4 result registers. 5/14/2015ECE265 13

Port E and ADR addresses  When using Port E as a digital port the port is accessed through address $100A  The A/D control register, ADCTL, is at address $1030  The ADR registers are at addresses – these are read only registers.  ADR1 - $1031  ADR2 - $1032  ADR3 - $1033  ADR4 - $1034 5/14/2015ECE265 14

ADCTL register  To use the A/D converter on the 68HC11 the users only needs to write to ADCTL for the CPU to read results from the register. There are 8 A/D channels but only 4 results from one of the two groups of 4 can be stored at any one time.  Could also use the 4 registers to save 4 conversions from one input pin  ADCTL register – controls how the A/D converter works and how the registers are used. 5/14/2015ECE265 15

The bits in the control register  Bit 7 – Conversion complete – a read only bit  Cleared any time the control register written to  Set when the A/D completes the 4 th conversion and results stored in registers.  Conversion starts immediately after a write to this register. If a conversion was in progress it is aborted to allow the initiation of the new conversion.  When set up for continuous conversion results are updated automatically. 5/14/2015ECE265 16

Control register continued  Bit 6 – unused  Bit 5 – SCAN  Value of 0 – single conversion mode – conversion takes place after a write to the register.  Value of 1 – continuous conversion mode – conversions take place in round robin mode on the enabled analog input pins.  Bit 4 – Multiple/Single Channel Control (MULT)  Value of 0 – Single channel – Consecutive conversions results are stored in consecutive ADRx registers  Value of 1 – each pin in the group is converted and the result stored in the ADR register. 5/14/2015ECE265 17

More on control register  Bits 3,2,1,0 – Channel select bits  For the 48-pin package – only 4 A/D inputs  How the CD, CC, CB, CA control bits work  The MULT bit says  1 channel or all 4  Table lists specific group  and pin(s) 5/14/2015ECE265 18

Example of interface setup  What configuration is needed in the ADCTL register for the A/D to convert continuously group 0?  Solution: Bits 7 and 6 are don’t cares  Bit 5 = 1 convert continuously  Bit 4 = 1 group of 4 channels  Bits 3 and 2 = 00 group 0, PE0-3  Bits 1 and 0 are not used.  Value of xx11 00xx or could store  $30 5/14/2015ECE265 19

Setup example 2  What value needs to be written to the ADCTL register to have continuous conversions of pin PE0? What assembler language instructions would you use to set up this?  Set ADCTL as follows:  Bits 7 and 6 – don’t cares  Bit 5 – 1 convert continuously val –  Bit 4 – 0 single channel  Bit 3,2,1,0 – 0000 the value for PE0  The assembler code (assumes A accumulator is free)  LDAA #$20  STAA $1030 5/14/2015ECE265 20

 Stopped here Monday Feb 20 5/14/2015ECE265 21

Example 3  Your system has 2 analog sensors. You only need to acquire the value of a given sensor at certain points. How would this be set up.  Probably through subroutines.  Specifications of the problem  Sensor 1 – on pin PE0-ADR1  Sensor 2 – on pin PE1-ADR2  The valx values for the code  val1 –  val2 –  How is the A/D being set up for conversion?  Could also be done with and /14/2015ECE265 22

Signal setup for A/D use  The 68HC11 needs 2 reference input voltages.  A low voltage reference – V RL – pin 51  A high voltage reference – V RH – pin 52  To prevent damage the analog input signals must be current limited.  Input current should not exceed 25mA  Connect signal through a resistor of value 1k  to 10k  5/14/2015ECE265 23

Input sensors  Transducers, such as pressure, temperature, and acceleration, covert the physical quantity being monitored into and output of voltage, current, or resistance.  To get the signal to the 68HC11 the signal needs to be a voltage.  A simple connection for the LM335 temperature sensor can be accomplished.  Application circuit from Jameco page. 5/14/2015ECE265 24

Lecture summary 5/14/2015ECE  Use of the 68HC11 A to D converter  Basic setup of use  The A/D configurations  Software setup  Interfacing signals

Assignment 5/14/2015ECE  None