EE 319K Introduction to Embedded Systems

Slides:



Advertisements
Similar presentations
11-1 Bard, Gerstlauer, Valvano, Yerraballi EE 319K Introduction to Embedded Systems Lecture 11: Data Acquisition, Numerical Fixed-Point Calculations, Lab.
Advertisements

13-1 Bard, Gerstlauer, Valvano, Erez, Telang, Yerraballi EE 319K Introduction to Embedded Systems Lecture 13: 2-D Arrays, Bitmaps, Sprites, Structs, Lab.
14-1 Bard, Gerstlauer, Valvano, Yerraballi EE 319K Introduction to Embedded Systems Lecture 14: Gaming Engines, Coding Style, Floating Point.
4-1 EE 319K Introduction to Embedded Systems Lecture 4: Arithmetic overflow, Branches, Control Structures, Abstraction & Refinement Bard, Erez, Gerstlauer,
1-1 Bard, Gerstlauer, Valvano, Yerraballi EE 319K Introduction to Microcontrollers Lecture 1: Introduction, Embedded Systems, Product Life-Cycle, ARM Programming.
2009 Spring Errors & Source of Errors SpringBIL108E Errors in Computing Several causes for malfunction in computer systems. –Hardware fails –Critical.
Analog-to-Digital Converter (ADC) And
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.
12-1 EE 319K Introduction to Microcontrollers Lecture 12: A/D Conversion and Lab 8 Read Book Sections 10.2 and 11.4.
10-1 Bard, Tiwari, Telang, Janapa Reddi, Gerstlauer, Valvano, Yerraballi EE 319K Introduction to Embedded Systems Lecture 10: Sampling, Analog-to-Digital.
Data Acquisition Concepts Data Translation, Inc. Basics of Data Acquisition.
Digital Systems: Introductory Concepts Wen-Hung Liao, Ph.D.
5/4/2006BAE Analog to Digital (A/D) Conversion An overview of A/D techniques.
Instrumentation - Introduction 10/9/2013Ohio University - Dr. Cyders1 Engineering measurements are usually taken by some form of transducer. A transducer.
Lecture 9: D/A and A/D Converters
Interfacing with the Analog World Wen-Hung Liao, Ph.D.
Introduction to Data Conversion
EET 252 Unit 7 Digital-to-Analog Conversion
Railway Foundation Electronic, Electrical and Processor Engineering.
11-1 Bard, Tiwari, Telang, Janapa Reddi, Gerstlauer, Valvano, Yerraballi EE 319K Introduction to Embedded Systems Lecture 11: Data Acquisition, Numerical.
6-1 EE 319K Introduction to Embedded Systems Lecture 6: SysTick Timer, Exam 1 Review Bard, Erez, Gerstlauer, Valvano, Yerraballi, Telang, Janapa Reddi,
Data Acquisition. Data Acquisition System Analog Signal Signal Conditioner ADC Digital Processing Communication.
EE 319K Introduction to Embedded Systems
11 Lecture Slides ME 3222 Kinematics and Control Lab Lab 2 AD DA and Sampling Theory By Dr. Debao Zhou.
Computer Based Data Acquisition Basics. Outline Basics of data acquisition Analog to Digital Conversion –Quantization –Aliasing.
Digital to Analog Converters (DAC) 1
DATA ACQUISITION Today’s Topics Define DAQ and DAQ systems Signals (digital and analogue types) Transducers Signal Conditioning - Importance of grounding.
Digital to Analogue Converter
Data Acquisition Systems
Analog to Digital Converters (ADC) Ben Lester, Mike Steele, Quinn Morrison.
Instrumentation (AMME2700) 1 Instrumentation Dr. Xiaofeng Wu.
Other Chapters From the text by Valvano: Introduction to Embedded Systems: Interfacing to the Freescale 9S12.
Quick and Easy Binary to dB Conversion George Weistroffer, Jeremy Cooper, and Jerry Tucker Electrical and Computer Engineering Virginia Commonwealth University.
Representing Numerical Data Analog Any signal that varies continuously over time Mechanical Pneumatic Hydraulic Electrical Digital Quantities are represented.
8-1 EE 319K Introduction to Microcontrollers Lecture 8:Fixed Point Numbers, Local Variables, Binding, Allocation, Access, Deallocation.
IT-101 Section 001 Lecture #9 Introduction to Information Technology.
Water Flow GROUP A. Analogue input voltage results: Motor Input voltage( V) pin 12 Analogue input voltage (V) Display number
Digital Control CSE 421.
ECE 2799 Electrical and Computer Engineering Design ANALOG to DIGITAL CONVERSION Prof. Bitar Last Update:
Ch. 10 Numerical Calculations From Valvano’s text Introduction to Embedded Systems.
Chem. 133 – 2/4 Lecture. Announcements Quiz 1 today HW Set 1.1 due today Lab –Supposed to be finishing electronics lab today (will see where you are at.
Embedded Systems February 10, Serial Interface - SPI  Serial Peripheral Interface  Synchronous communications  Clock supplied by the Master.
Closed Loop Temperature Control Circuit with LCD Display Mike Wooldridge ECE 4330 Embedded Systems.
EE 319K Introduction to Embedded Systems
Networked Embedded Systems Sachin Katti & Pengyu Zhang EE107 Spring 2016 Lecture 13 Interfacing with the Analog World.
Fundamentals of Computer Science
Machine arithmetic and associated errors Introduction to error analysis Class II.
Objectives Today: P4 Data Types – Floating Points P4 Variable Quiz P3 Iteration and Selection Practical Are you logged on? Then come around the table Unit.
MECH 373 Instrumentation and Measurements
Chapter 3 Data Representation
Topic: Binary Encoding – Part 1
EET 2259 Unit 12 Data Acquisition
Digital Control CSE 421.
Chem. 133 – 2/7 Lecture.
The Selection Structure
Principles & Applications
Introduction to data converters
Introduction to data converters
6: Processor-based Control Systems
EET 2259 Unit 12 Data Acquisition
Chem. 133 – 2/2 Lecture.
Digital Acquisition of Analog Signals – A Practical Guide
Digital Systems: Introductory Concepts
Fundamentals of Programming I Number Systems
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.
Universiti Malaysia Perlis
Digital Control Systems Waseem Gulsher
Data Acquisition (DAQ)
Data Representation and Organization
Presentation transcript:

EE 319K Introduction to Embedded Systems Lecture 11: Data Acquisition, Numerical Fixed-Point Calculations, Lab 8 Bard, Tiwari, Telang, Janapa Reddi, Gerstlauer, Valvano, Yerraballi

Agenda Recap Agenda Sampling, Nyquist Analog to Digital Conversion Data acquisition Numerical fixed-point calculations Lab 8 Bard, Tiwari, Telang, Janapa Reddi, Gerstlauer, Valvano, Yerraballi

Data Acquisition System (Lab 8) Hardware Transducer Electronics ADC Software ADC device driver Timer routines Output compare interrupts LCD driver Measurement system How fast to update Fixed-point number system Algorithm to convert ADC into position Bard, Tiwari, Telang, Janapa Reddi, Gerstlauer, Valvano, Yerraballi

Analog Input Device Transducer – A device actuated by power from one system that supplies power in the same or other form to another system. Bard, Tiwari, Telang, Janapa Reddi, Gerstlauer, Valvano, Yerraballi

Transducer Circuit Position to voltage Bard, Tiwari, Telang, Janapa Reddi, Gerstlauer, Valvano, Yerraballi

Data Acquisition System Data flow graph ST7735 P o s i t n S e r V l a g + 3.3V A D C h d w v m p 4 9 5 y T c k I R L F x - 2 . M b Bard, Tiwari, Telang, Janapa Reddi, Gerstlauer, Valvano, Yerraballi

Data Acquisition System Call graph ST7735 Bard, Tiwari, Telang, Janapa Reddi, Gerstlauer, Valvano, Yerraballi

Thread Synchronization in Lab 8 Background thread Foreground thread SysTick ISR Sample ADC Store in ADCmail Set ADCstatus Main loop Wait for ADCstatus Read ADCmail Clear ADCstatus Convert to distance Display on LCD Bard, Tiwari, Telang, Janapa Reddi, Gerstlauer, Valvano, Yerraballi

Sampling Jitter Definition of time-jitter, δt: Let nΔt be the time a task is scheduled to be run and tn the time the task is actually run Then δtn= tn – nΔt Real time systems with periodic tasks, must have an upper bound, k, on the time-jitter -k ≤ δtn ≤ +k for all n Bard, Tiwari, Telang, Janapa Reddi, Gerstlauer, Valvano, Yerraballi

Measurement Resolution: Limiting factors Accuracy: Limiting factors Transducer noise Electrical noise ADC precision Software errors Accuracy: Limiting factors Resolution Calibration Transducer stability Average accuracy (with units of x) = Bard, Tiwari, Telang, Janapa Reddi, Gerstlauer, Valvano, Yerraballi

Fixed-Point Revisited Why: express non-integer values no floating point hardware support (want it to run fast) When: range of values is known range of values is small How: 1) variable integer, called I. may be signed or unsigned may be 8, 16 or 32 bits (precision) 2) fixed constant, called  (resolution) value is fixed, and can not be changed not stored in memory specify this fixed content using comments value  integer •  Bard, Tiwari, Telang, Janapa Reddi, Gerstlauer, Valvano, Yerraballi

Fixed-Point Numbers The value of the fixed-point number: Fixed-point number  I• Smallest value = Imin • D, where Imin is the smallest integer Largest value = Imax • D, where Imax is the largest integer Decimal fixed-point, =10m Decimal fixed-point number = I • 10m Nice for human input/output Binary fixed-point, =2m Binary fixed-point number = I • 2m Easier for computers to perform calculations Bard, Tiwari, Telang, Janapa Reddi, Gerstlauer, Valvano, Yerraballi

Fixed-Point Math Example Consider the following calculation. C = 2**R The variables C, and R are integers 2p ≈ 6.283 C = (6283*R)/1000 Bard, Tiwari, Telang, Janapa Reddi, Gerstlauer, Valvano, Yerraballi

Fixed-Point Math Example Calculate the volume of a cylinder V = *R2 * L The variables are binary fixed-point R = I*2-4 cm L = J*2-4 cm V = K*2-8 cm3 2p ≈ 201*2-5 K = (201*I*I*J)>>9 Bard, Tiwari, Telang, Janapa Reddi, Gerstlauer, Valvano, Yerraballi

Make a Voltmeter with ADC Vin (V) Analog in N Digital out I (1 mV) Variable part LCD 0.000 0.75 1024 750 0.750 1.5 2048 1500 1.500 2.25 3072 2250 2.250 3 4096 3000 3.000 =0.001 V Vin = 3•N/4096 how ADC works Vin = I • 0.001 definition of fixed point I = (3000*N)/4096 substitution I = (m•N+b)/ 4096 calibrate to get m and b Bard, Tiwari, Telang, Janapa Reddi, Gerstlauer, Valvano, Yerraballi

Lab 8 Calibration Bard, Tiwari, Telang, Janapa Reddi, Gerstlauer, Valvano, Yerraballi