Microcontroller: Timers, ADC

Size: px
Start display at page:

Download "Microcontroller: Timers, ADC"

Transcription

1 Microcontroller: Timers, ADC Amarjeet Singh February 1, 2013

2 Logistics Please share the JTAG and USB cables for your assignment Lecture tomorrow by Nipun 2

3 Revision from last class When servicing an interrupt, how does the timing work? How are interrupt priorities decided? What are the primary blocks in a Timer/Counter? How is Buffer Value (BV) flag decided in both Capture and Compare mode in xmega? 3

4 xmega: Timer/Counter Block Diagram Registers: Counter (CNT), Period (PER), Compare Capture (CCx) Size? Counter compared with 0 or PER to generate BOTTOM/TOP Compared with CCx to generate interrupt, events Waveform generator mode uses CCx to set waveform period and pulse width How to support 32 bit count? 4

5 Single Slope PWM Generation Time period is controlled by PER register (counter counts from BOTTOM to TOP) while CCx register controls the duty cycle New value of CCx Register loaded on UPDATE event WG output is set to 0 on compare match and set to 1 on TOP 5

6 Dual Slope PWM Generation Time period is controlled by PER register (counter counts from BOTTOM to TOP and then TOP to BOTTOM) while CCx register controls the duty cycle WG output is set to 1 on BOTTOM ; 0 on compare match during up count and 1 on compare match during down count New value of CCx updated on UPDATE event 6

7 Timer/Counter 0/1: Associated Registers 7

8 Timer/Counter 0/1: Associated Registers 8

9 xmega: Timer/Counter2 Realized when Timer/Counter 0 is set in split mode A system of 2 8-bit Timer Counters (referred to as Low Byte and High Byte Timer/Counter) with 4 compare channels each Provides 8 configurable PWM channels with individually controlled duty cycle Only the low byte timer/counter can be used to generate compare match interrupts, events Shared clock source and separate period and compare settings At a time can be only used as Timer/Counter 0 or 2 9

10 Timer/Counter2: Block Diagram Counter operation same as Timer/Counter 0 Compare channel operation same as Timer/Counter 0 10

11 xmega Timers: Summary TC-0/1: 16-bits, 32-bits support by cascading TC-2: 2 8-bits Multiple compare or capture (CC) channels for each timer One compare match or input capture interrupt/event per channel Used for count and direction control, capture Waveform generation: Frequency generation Single slope PWM (Only this one available for TC-2) Dual slope PWM Input capture: Frequency capture Pulse-width capture 11

12 Pic24F: Timers and Counters Timer1: 16-bit timer/counter Timer2/3 and Timer4/5: 32-bit timers that can be independently configured as 2 16-bit counters Separate module for Input Capture (on ICx pin) Can capture rising/falling/both edges 12

13 Pic24F: Timers and Counters Separate output compare module to generate output pulses 13

14 AVR32: Timers and Counters 14

15 xmega: Real Time Counter (RTC) 16-bit RTC runs continuously even in the low power sleep mode to keep track of time Can wake up devices from sleep and/or generate interrupt at regular time intervals Reference clock is typically 1.024KHz output from high accuracy crystal of KHz Includes a 10-bit prescaler to scale down the reference clock before it reaches the counter What is the highest resolution with KHz clock? With a resolution of 1 s what is the maximum timeout period? 15

16 xmega: Real Time Counter (RTC) RTC can generate both interrupts and events Compare interrupt Overflow interrupt 16

17 xmega: RTC32 32-bit Real Time Counter Runs continuously even in low power sleep mode External KHz clock must be used as clock reference fed into the prescaler Reference clock: 1 Hz or KHz 17

18 PIC24F: Real Time Clock and Calendar Time (hours, minutes, seconds); Calendar (Weekday, date, month, year): Year range (with leap year correction) Requires external KHz clock crystal Optimized for low power operation 18

19 xmega: Analog Comparators Compares voltage levels on two inputs and gives a digital output based on the comparison Input sources: Analog port pins, several internal signals, 64- level programmable voltage scales the input values on positive pin AIN0 and negative pin AIN1 19

20 Analog Comparator When voltage on first input is greater than that on second input, Analog Comparator Output (ACOUT) is set Output can be set to trigger Timer/Counter Capture operation or can also trigger interrupt specific to analog comparator Interrupt triggering can be enabled on output rise, fall or toggle How can I use both AC0 and AC1 to check if input signal is within a range? Window mode supported internally by the device 20

21 Analog to Digital Converter (ADC) 12-bit resolution (Can also work in faster 8-bit resolution) Up to 2 million samples per second (minimum 3.5 us conversion time) Flexible input selection: Both single ended and differential Up to 16 single-ended input; 4 channels of differential (with/without gain) Built in differential gain: 1/2x 64x Multiple input sources Internal temperature sensor, DAC output etc. 21

22 Analog to Digital Converter (ADC) Pipelined architecture with several stages: Allows high sample rate at low system clock frequency New input can be sampled while older ADC conversions still going on 4 conversion channels with individual input selection: Allow 4 parallel operations 22

23 ADC Voltage Conversion Several sources for reference voltage selection Result is written to corresponding Channel result register (RES) Global setting for signed/unsigned conversion Unsigned for single ended or internal signals Signed for differential signals generating both positive and negative results What will be the TOP value for signed/unsigned conversion? What will be the ADC transfer function in terms of TOP? 23

24 ADC Voltage Conversion: Signed mode Single ended measurement in signed mode: Negative connected to ground ADC transfer function in signed mode 24

25 ADC Voltage Conversion: Signed mode Signed differential input ADC transfer function in signed mode 25

26 ADC Voltage Conversion: Unsigned mode Single ended measurement in unsigned mode: Negative connected to half the reference voltage minus a fixed offset (nominal value 0.05*V REF ) Positive will vary from 0 to V REF Offset to allow calibration when internal ground is higher than external ground ADC transfer function in unsigned mode 26

27 xmega: ADC Compare function: ADC has in-built 12-bit compare function ADC value can be compared with the ADC Compare Register to generate an interrupt/event if the value is above/below the threshold All 4 ADC channels share the same Compare Register Starting a conversion: Select the input source for one or more ADC channels ADC conversion started by application software writing to start conversion bit of the Channel or from any events in the Event System 27

28 xmega ADC Block Diagram 28

29 ADC Clock and Conversion Timing Clocked from Peripheral Clock that can be prescaled to provide ADC Clock Maximum ADC sampling rate given by ADC clock frequency Propagation delay of ADC measurement given by RES: Resolution (8- or 12-bit) Greater than one clock cycle but pipelined architecture implies sampling rate is not limited by propagation delay but by clock frequency 29

30 ADC Clock and Conversion Timing MSB of the result is converted first Rest of the bits are converted in the next 3 (for 8-bit resolution) or 5 (12-bit resolution) clock cycles Converting 1 bit takes half a clock cycle During the last clock cycle, result is prepared before the interrupt flag is set Single conversion without Gain 30

31 ADC Clock and Conversion Timing Single Conversion with Gain 31

32 ADC Clock and Conversion Timing Single Conversion on 2 ADC Channels (both without Gain) Both conversion requests may be placed at the same time Due to pipelined design, second conversion can start in the next clock cycle after the first conversion has started 32

33 ADC Clock and Conversion Timing Single Conversion on 2 ADC Channels (Channel0 with Gain and Channel1 without Gain) 33

34 ADC Clock and Conversion Timing Single Conversion on 2 ADC Channels (Channel0 without Gain and Channel1 with Gain) 34

35 ADC Clock and Conversion Timing Free Running mode (All 4 channels Channel 0 and 1 without gain, Channel 2 and 3 with Gain) 35

36 What did you learn today? On a small sheet of paper, give me a short (2-3 sentences) description of what you learned today You can use it to give any broad comments on the class as well 36

Hello and welcome to this Renesas Interactive Course that provides an overview of the timers found on RL78 MCUs.

Hello and welcome to this Renesas Interactive Course that provides an overview of the timers found on RL78 MCUs. Hello and welcome to this Renesas Interactive Course that provides an overview of the timers found on RL78 MCUs. 1 The purpose of this course is to provide an introduction to the RL78 timer Architecture.

More information

Menu. More on Timer-Counter, this time with INTERRUPTS for output timing

Menu. More on Timer-Counter, this time with INTERRUPTS for output timing Menu More on Timer-Counter, this time with INTERRUPTS for output timing Look into my... See docs/examples on web-site: doc8331 (Sec 14), doc8385 (Sec 16) University of Florida, File 00 1 Clock Source Prescaler

More information

APPLICATION NOTE. AT11009: Migration from ATxmega64D3/128D3/192D3/256D3 Revision E to Revision I. Introduction. Features.

APPLICATION NOTE. AT11009: Migration from ATxmega64D3/128D3/192D3/256D3 Revision E to Revision I. Introduction. Features. APPLICATION NOTE AT11009: Migration from ATxmega64D3/128D3/192D3/256D3 Revision E to Revision I Atmel AVR XMEGA Introduction This application note lists out the differences and changes between Revision

More information

Grundlagen Microcontroller Counter/Timer. Günther Gridling Bettina Weiss

Grundlagen Microcontroller Counter/Timer. Günther Gridling Bettina Weiss Grundlagen Microcontroller Counter/Timer Günther Gridling Bettina Weiss 1 Counter/Timer Lecture Overview Counter Timer Prescaler Input Capture Output Compare PWM 2 important feature of microcontroller

More information

ATmega16A Microcontroller

ATmega16A Microcontroller ATmega16A Microcontroller Timers 1 Timers Timer 0,1,2 8 bits or 16 bits Clock sources: Internal clock, Internal clock with prescaler, External clock (timer 2), Special input pin 2 Features The choice of

More information

Hello, and welcome to this presentation of the STM32 Digital Filter for Sigma-Delta modulators interface. The features of this interface, which

Hello, and welcome to this presentation of the STM32 Digital Filter for Sigma-Delta modulators interface. The features of this interface, which Hello, and welcome to this presentation of the STM32 Digital Filter for Sigma-Delta modulators interface. The features of this interface, which behaves like ADC with external analog part and configurable

More information

Topics Introduction to Microprocessors

Topics Introduction to Microprocessors Topics 2244 Introduction to Microprocessors Chapter 8253 Programmable Interval Timer/Counter Suree Pumrin,, Ph.D. Interfacing with 886/888 Programming Mode 2244 Introduction to Microprocessors 2 8253/54

More information

CprE 288 Introduction to Embedded Systems (Output Compare and PWM) Instructors: Dr. Phillip Jones

CprE 288 Introduction to Embedded Systems (Output Compare and PWM) Instructors: Dr. Phillip Jones CprE 288 Introduction to Embedded Systems (Output Compare and PWM) Instructors: Dr. Phillip Jones 1 Announcements HW8: Due Sunday 10/29 (midnight) Exam 2: In class Thursday 11/9 This object detection lab

More information

Lecture #4 Outline. Announcements Project Proposal. AVR Processor Resources

Lecture #4 Outline. Announcements Project Proposal. AVR Processor Resources October 11, 2002 Stanford University - EE281 Lecture #4 #1 Announcements Project Proposal Lecture #4 Outline AVR Processor Resources A/D Converter (Analog to Digital) Analog Comparator Real-Time clock

More information

Designing with STM32F3x

Designing with STM32F3x Designing with STM32F3x Course Description Designing with STM32F3x is a 3 days ST official course. The course provides all necessary theoretical and practical know-how for start developing platforms based

More information

Course Introduction. Content 20 pages 3 questions. Learning Time 30 minutes

Course Introduction. Content 20 pages 3 questions. Learning Time 30 minutes Purpose The intent of this course is to provide you with information about the main features of the S08 Timer/PWM (TPM) interface module and how to configure and use it in common applications. Objectives

More information

Chapter 6 PROGRAMMING THE TIMERS

Chapter 6 PROGRAMMING THE TIMERS Chapter 6 PROGRAMMING THE TIMERS Force Outputs on Outcompare Input Captures Programmabl e Prescaling Prescaling Internal clock inputs Timer-counter Device Free Running Outcompares Lesson 2 Free Running

More information

Microcontrollers: Lecture 3 Interrupts, Timers. Michele Magno

Microcontrollers: Lecture 3 Interrupts, Timers. Michele Magno Microcontrollers: Lecture 3 Interrupts, Timers Michele Magno 1 Calendar 07.04.2017: Power consumption; Low power States; Buses, Memory, GPIOs 20.04.2017 Serial Communications 21.04.2017 Programming STM32

More information

THE PERFORMANCE TEST OF THE AD CONVERTERS EMBEDDED ON SOME MICROCONTROLLERS

THE PERFORMANCE TEST OF THE AD CONVERTERS EMBEDDED ON SOME MICROCONTROLLERS THE PERFORMANCE TEST OF THE AD CONVERTERS EMBEDDED ON SOME MICROCONTROLLERS R. Holcer Department of Electronics and Telecommunications, Technical University of Košice, Park Komenského 13, SK-04120 Košice,

More information

For reference only Refer to the latest documents for details

For reference only Refer to the latest documents for details STM32F3 Technical Training For reference only Refer to the latest documents for details General Purpose Timers (TIM2/3/4/5 - TIM12/13/14 - TIM15/16/17 - TIM6/7/18) TIM2/5 TIM3/4/19 TIM12 TIM15 TIM13/14

More information

Roland Kammerer. 13. October 2010

Roland Kammerer. 13. October 2010 Peripherals Roland Institute of Computer Engineering Vienna University of Technology 13. October 2010 Overview 1. Analog/Digital Converter (ADC) 2. Pulse Width Modulation (PWM) 3. Serial Peripheral Interface

More information

DASL 120 Introduction to Microcontrollers

DASL 120 Introduction to Microcontrollers DASL 120 Introduction to Microcontrollers Lecture 2 Introduction to 8-bit Microcontrollers Introduction to 8-bit Microcontrollers Introduction to 8-bit Microcontrollers Introduction to Atmel Atmega328

More information

ELCT 912: Advanced Embedded Systems

ELCT 912: Advanced Embedded Systems ELCT 912: Advanced Embedded Systems Lecture 5: PIC Peripherals on Chip Dr. Mohamed Abd El Ghany, Department of Electronics and Electrical Engineering The PIC Family: Peripherals Different PICs have different

More information

Hello, and welcome to this presentation of the STM32L4 comparators. It covers the main features of the ultra-lowpower comparators and some

Hello, and welcome to this presentation of the STM32L4 comparators. It covers the main features of the ultra-lowpower comparators and some Hello, and welcome to this presentation of the STM32L4 comparators. It covers the main features of the ultra-lowpower comparators and some application examples. 1 The two comparators inside STM32 microcontroller

More information

Linear Integrated Circuits

Linear Integrated Circuits Linear Integrated Circuits Single Slope ADC Comparator checks input voltage with integrated reference voltage, V REF At the same time the number of clock cycles is being counted. When the integrator output

More information

Timer A (0 and 1) and PWM EE3376

Timer A (0 and 1) and PWM EE3376 Timer A (0 and 1) and PWM EE3376 General Peripheral Programming Model l l l l Each peripheral has a range of addresses in the memory map peripheral has base address (i.e. 0x00A0) each register used in

More information

Timer/Counter with PWM

Timer/Counter with PWM Timer/Counter with PWM The AVR Microcontroller and Embedded Systems using Assembly and C) by Muhammad Ali Mazidi, Sarmad Naimi, and Sepehr Naimi ATMEL 8-bit AVR Microcontroller with 4/8/16/32K Bytes In-System

More information

8-bit Microcontroller with 512/1024 Bytes In-System Programmable Flash. ATtiny4/5/9/10

8-bit Microcontroller with 512/1024 Bytes In-System Programmable Flash. ATtiny4/5/9/10 Features High Performance, Low Power AVR 8-Bit Microcontroller Advanced RISC Architecture 54 Powerful Instructions Most Single Clock Cycle Execution 16 x 8 General Purpose Working Registers Fully Static

More information

USB4. Encoder Data Acquisition USB Device Page 1 of 8. Description. Features

USB4. Encoder Data Acquisition USB Device Page 1 of 8. Description. Features USB4 Page 1 of 8 The USB4 is a data acquisition device designed to record data from 4 incremental encoders, 8 digital inputs and 4 analog input channels. In addition, the USB4 provides 8 digital outputs

More information

Exercise 3: Sound volume robot

Exercise 3: Sound volume robot ETH Course 40-048-00L: Electronics for Physicists II (Digital) 1: Setup uc tools, introduction : Solder SMD Arduino Nano board 3: Build application around ATmega38P 4: Design your own PCB schematic 5:

More information

Data Converters. Lecture Fall2013 Page 1

Data Converters. Lecture Fall2013 Page 1 Data Converters Lecture Fall2013 Page 1 Lecture Fall2013 Page 2 Representing Real Numbers Limited # of Bits Many physically-based values are best represented with realnumbers as opposed to a discrete number

More information

EE445L Fall 2011 Quiz 2A Page 1 of 6

EE445L Fall 2011 Quiz 2A Page 1 of 6 EE445L Fall 2011 Quiz 2A Page 1 of 6 Jonathan W. Valvano First: Last: November 18, 2011, 2:00pm-2:50pm. Open book, open notes, calculator (no laptops, phones, devices with screens larger than a TI-89 calculator,

More information

ESE 350 Microcontroller Laboratory Lab 5: Sensor-Actuator Lab

ESE 350 Microcontroller Laboratory Lab 5: Sensor-Actuator Lab ESE 350 Microcontroller Laboratory Lab 5: Sensor-Actuator Lab The purpose of this lab is to learn about sensors and use the ADC module to digitize the sensor signals. You will use the digitized signals

More information

uc Crash Course Whats is covered in this lecture Joshua Childs Joshua Hartman A. A. Arroyo 9/7/10

uc Crash Course Whats is covered in this lecture Joshua Childs Joshua Hartman A. A. Arroyo 9/7/10 uc Crash Course Joshua Childs Joshua Hartman A. A. Arroyo Whats is covered in this lecture ESD Choosing A Processor GPIO USARTS o RS232 o SPI Timers o Prescalers o OCR o ICR o PWM ADC Interupts 1 ESD KILLS!

More information

Timer 0 Modes of Operation. Normal Mode Clear Timer on Compare Match (CTC) Fast PWM Mode Phase Corrected PWM Mode

Timer 0 Modes of Operation. Normal Mode Clear Timer on Compare Match (CTC) Fast PWM Mode Phase Corrected PWM Mode Timer 0 Modes of Operation Normal Mode Clear Timer on Compare Match (CTC) Fast PWM Mode Phase Corrected PWM Mode PWM - Introduction Recall: PWM = Pulse Width Modulation We will mostly use it for controlling

More information

Hello, and welcome to this presentation of the FlexTimer or FTM module for Kinetis K series MCUs. In this session, you ll learn about the FTM, its

Hello, and welcome to this presentation of the FlexTimer or FTM module for Kinetis K series MCUs. In this session, you ll learn about the FTM, its Hello, and welcome to this presentation of the FlexTimer or FTM module for Kinetis K series MCUs. In this session, you ll learn about the FTM, its main features and the application benefits of leveraging

More information

AVR1300: Using the Atmel AVR XMEGA ADC. 8-bit Microcontrollers. Application Note. Preliminary. Features. 1 Introduction

AVR1300: Using the Atmel AVR XMEGA ADC. 8-bit Microcontrollers. Application Note. Preliminary. Features. 1 Introduction AVR1300: Using the Atmel AVR XMEGA ADC Features Up to 12 bit resolution Up to 2M samples per second Signed and unsigned mode Selectable gain Pipelined architecture Up to 4 virtual channels Result comparator

More information

DAC A (VCO) Buffer (write) DAC B (AGC) Buffer (write) Pulse Code Buffer (write) Parameter Buffer (write) Figure A.1. Receiver Controller Registers

DAC A (VCO) Buffer (write) DAC B (AGC) Buffer (write) Pulse Code Buffer (write) Parameter Buffer (write) Figure A.1. Receiver Controller Registers Appendix A. Host Computer Interface The host computer interface is contained on a plug-in module designed for the IBM PC/XT/AT bus. It includes the converters, counters, registers and programmed-logic

More information

ATtiny102 / ATtiny104. Introduction. Feature. 8-bit AVR Microcontroller DATASHEET COMPLETE

ATtiny102 / ATtiny104. Introduction. Feature. 8-bit AVR Microcontroller DATASHEET COMPLETE 8-bit AVR Microcontroller ATtiny102 / ATtiny104 DATASHEET COMPLETE Introduction The Atmel ATtiny102/ATtiny104 is a low-power CMOS 8-bit microcontroller based on the AVR enhanced RISC architecture. By executing

More information

Generating DTMF Tones Using Z8 Encore! MCU

Generating DTMF Tones Using Z8 Encore! MCU Application Note Generating DTMF Tones Using Z8 Encore! MCU AN024802-0608 Abstract This Application Note describes how Zilog s Z8 Encore! MCU is used as a Dual-Tone Multi- (DTMF) signal encoder to generate

More information

ME 333 Assignment 7 and 8 PI Control of LED/Phototransistor Pair. Overview

ME 333 Assignment 7 and 8 PI Control of LED/Phototransistor Pair. Overview ME 333 Assignment 7 and 8 PI Control of LED/Phototransistor Pair Overview For this assignment, you will be controlling the light emitted from and received by an LED/phototransistor pair. There are many

More information

AVR42778: Core Independent Brushless DC Fan Control Using Configurable Custom Logic on ATtiny817. Features. Introduction. AVR 8-bit Microcontroller

AVR42778: Core Independent Brushless DC Fan Control Using Configurable Custom Logic on ATtiny817. Features. Introduction. AVR 8-bit Microcontroller AVR 8-bit Microcontroller AVR42778: Core Independent Brushless DC Fan Control Using Configurable Custom Logic on ATtiny817 APPLICATION NOTE Features Base setup for performing core independent brushless

More information

LV-Link 3.0 Software Interface for LabVIEW

LV-Link 3.0 Software Interface for LabVIEW LV-Link 3.0 Software Interface for LabVIEW LV-Link Software Interface for LabVIEW LV-Link is a library of VIs (Virtual Instruments) that enable LabVIEW programmers to access the data acquisition features

More information

Graphical Control Panel User Manual

Graphical Control Panel User Manual Graphical Control Panel User Manual DS-MPE-DAQ0804 PCIe Minicard Data Acquisition Module For Universal Driver Version 7.0.0 and later Revision A.0 March 2015 Revision Date Comment A.0 3/18/2015 Initial

More information

TKT-3500 Microcontroller systems

TKT-3500 Microcontroller systems TKT-3500 Microcontroller systems Lec 4 Timers and other peripherals, pulse-width modulation Ville Kaseva Department of Computer Systems Tampere University of Technology Fall 2010 Sources Original slides

More information

AVR1311: Using the XMEGA Timer/Counter Extensions. 8-bit Microcontrollers. Application Note. Features. 1 Introduction

AVR1311: Using the XMEGA Timer/Counter Extensions. 8-bit Microcontrollers. Application Note. Features. 1 Introduction AVR1311: Using the XMEGA Timer/Counter Extensions Features Advanced Waveform extensions (AWeX) - Dead-time insertion - Pattern generation - Fault protection High Resolution Extension (HiRes) - Increases

More information

L13: (25%), (20%), (5%) ECTE333

L13: (25%), (20%), (5%) ECTE333 ECTE333 s schedule ECTE333 Lecture 1 - Pulse Width Modulator School of Electrical, Computer and Telecommunications Engineering University of Wollongong Australia Week Lecture (2h) Tutorial (1h) Lab (2h)

More information

P a g e 1. Introduction

P a g e 1. Introduction P a g e 1 Introduction 1. Signals in digital form are more convenient than analog form for processing and control operation. 2. Real world signals originated from temperature, pressure, flow rate, force

More information

8-bit Microcontroller with 2K Bytes In-System Programmable Flash. ATtiny20

8-bit Microcontroller with 2K Bytes In-System Programmable Flash. ATtiny20 Features High Performance, Low Power AVR 8-bit Microcontroller Advanced RISC Architecture 112 Powerful Instructions Most Single Clock Cycle Execution 16 x 8 General Purpose Working Registers Fully Static

More information

8-bit Microcontroller with 2/4/8K Bytes In-System Programmable Flash. ATtiny24/44/84. Preliminary

8-bit Microcontroller with 2/4/8K Bytes In-System Programmable Flash. ATtiny24/44/84. Preliminary Features High Performance, Low Power AVR 8-Bit Microcontroller Advanced RISC Architecture 120 Powerful Instructions Most Single Clock Cycle Execution 32 x 8 General Purpose Working Registers Fully Static

More information

MICROCONTROLLER TUTORIAL II TIMERS

MICROCONTROLLER TUTORIAL II TIMERS MICROCONTROLLER TUTORIAL II TIMERS WHAT IS A TIMER? We use timers every day - the simplest one can be found on your wrist A simple clock will time the seconds, minutes and hours elapsed in a given day

More information

AN4062 Application note

AN4062 Application note Application note STM32F0DISCOVERY peripheral firmware examples Introduction This application note describes the peripheral firmware examples provided for the STM32F0DISCOVERY Kit. These ready-to-run examples

More information

ME 461 Laboratory #3 Analog-to-Digital Conversion

ME 461 Laboratory #3 Analog-to-Digital Conversion ME 461 Laboratory #3 Analog-to-Digital Conversion Goals: 1. Learn how to configure and use the MSP430 s 10-bit SAR ADC. 2. Measure the output voltage of your home-made DAC and compare it to the expected

More information

Timer A. Last updated 8/7/18

Timer A. Last updated 8/7/18 Last updated 8/7/18 Advanced Timer Functions Output Compare Sets a flag and/or creates an interrupt when the counter value matches a value programmed into a separate register Input Capture Captures the

More information

Embedded Robotics. Software Development & Education Center

Embedded Robotics. Software Development & Education Center Software Development & Education Center Embedded Robotics Robotics Development with ARM µp INTRODUCTION TO ROBOTICS Types of robots Legged robots Mobile robots Autonomous robots Manual robots Robotic arm

More information

8-Bit, high-speed, µp-compatible A/D converter with track/hold function ADC0820

8-Bit, high-speed, µp-compatible A/D converter with track/hold function ADC0820 8-Bit, high-speed, µp-compatible A/D converter with DESCRIPTION By using a half-flash conversion technique, the 8-bit CMOS A/D offers a 1.5µs conversion time while dissipating a maximum 75mW of power.

More information

The rangefinder can be configured using an I2C machine interface. Settings control the

The rangefinder can be configured using an I2C machine interface. Settings control the Detailed Register Definitions The rangefinder can be configured using an I2C machine interface. Settings control the acquisition and processing of ranging data. The I2C interface supports a transfer rate

More information

Utilizing the Trigger Routing Unit for System Level Synchronization

Utilizing the Trigger Routing Unit for System Level Synchronization Engineer-to-Engineer Note EE-360 Technical notes on using Analog Devices DSPs, processors and development tools Visit our Web resources http://www.analog.com/ee-notes and http://www.analog.com/processors

More information

Hardware Flags. and the RTI system. Microcomputer Architecture and Interfacing Colorado School of Mines Professor William Hoff

Hardware Flags. and the RTI system. Microcomputer Architecture and Interfacing Colorado School of Mines Professor William Hoff Hardware Flags and the RTI system 1 Need for hardware flag Often a microcontroller needs to test whether some event has occurred, and then take an action For example A sensor outputs a pulse when a model

More information

Analog I/O. ECE 153B Sensor & Peripheral Interface Design Winter 2016

Analog I/O. ECE 153B Sensor & Peripheral Interface Design Winter 2016 Analog I/O ECE 153B Sensor & Peripheral Interface Design Introduction Anytime we need to monitor or control analog signals with a digital system, we require analogto-digital (ADC) and digital-to-analog

More information

MICROPROCESSOR TECHNICS II

MICROPROCESSOR TECHNICS II AGH University of Science and Technology Faculty of Computer Science, Electronics and Telecommunication Department of Electronics MICROPROCESSOR TECHNICS II Tutorial 5 Combining ADC & PWM Mariusz Sokołowski

More information

8-bit Microcontroller with 2K/4K/8K Bytes In-System Programmable Flash. ATtiny24A ATtiny44A ATtiny84A

8-bit Microcontroller with 2K/4K/8K Bytes In-System Programmable Flash. ATtiny24A ATtiny44A ATtiny84A Features High Performance, Low Power AVR 8-bit Microcontroller Advanced RISC Architecture 12 Powerful Instructions Most Single Clock Cycle Execution 32 x 8 General Purpose Working Registers Fully Static

More information

The Need. Reliable, repeatable, stable time base. Memory Access. Interval/Event timers ADC DAC

The Need. Reliable, repeatable, stable time base. Memory Access. Interval/Event timers ADC DAC Timers The Need Reliable, repeatable, stable time base Memory Access /Event timers ADC DAC Time Base: Crystal Oscillator Silicon Dioxide forms a piezoelectric crystal that can deform in eclectic field,

More information

EXAMINATION PAPER EMBEDDED SYSTEMS 6EJ005 UNIVERSITY OF DERBY. School of Computing and Technology DATE: SUMMER 2003 TIME ALLOWED: 2 HOURS

EXAMINATION PAPER EMBEDDED SYSTEMS 6EJ005 UNIVERSITY OF DERBY. School of Computing and Technology DATE: SUMMER 2003 TIME ALLOWED: 2 HOURS BSc/BSc (HONS) MUSIC TECHNOLOGY AND AUDIO SYSTEM DESIGN BSc/BSc (HONS) LIVE PERFORMANCE TECHNOLOGY BSc/BSc (HONS) ELECTRICAL AND ELECTRONIC ENGINEERING DATE: SUMMER 2003 TIME ALLOWED: 2 HOURS Instructions

More information

PIC Functionality. General I/O Dedicated Interrupt Change State Interrupt Input Capture Output Compare PWM ADC RS232

PIC Functionality. General I/O Dedicated Interrupt Change State Interrupt Input Capture Output Compare PWM ADC RS232 PIC Functionality General I/O Dedicated Interrupt Change State Interrupt Input Capture Output Compare PWM ADC RS232 General I/O Logic Output light LEDs Trigger solenoids Transfer data Logic Input Monitor

More information

Timing System. Timing & PWM System. Timing System components. Usage of Timing System

Timing System. Timing & PWM System. Timing System components. Usage of Timing System Timing & PWM System Timing System Valvano s chapter 6 TIM Block User Guide, Chapter 15 PWM Block User Guide, Chapter 12 1 2 Timing System components Usage of Timing System 3 Counting mechanisms Input time

More information

Designing with a Microcontroller (v6)

Designing with a Microcontroller (v6) Designing with a Microcontroller (v6) Safety: In this lab, voltages are less than 15 volts and this is not normally dangerous to humans. However, you should assemble or modify a circuit when power is disconnected

More information

Real time digital audio processing with Arduino

Real time digital audio processing with Arduino Real time digital audio processing with Arduino André J. Bianchi ajb@ime.usp.br Marcelo Queiroz mqz@ime.usp.br Departament of Computer Science Institute of Mathematics and Statistics University of São

More information

ECED3204: Microprocessor Part IV--Timer Function

ECED3204: Microprocessor Part IV--Timer Function ECED3204: Microprocessor Part IV--Timer Function Jason J. Gu Department of 1 Outline i. Introduction to the Microcontroller Timer System ii. Overview of the Mega AVR Timer System iii. Timer Clock Source

More information

νµθωερτψυιοπασδφγηϕκλζξχϖβνµθωερτ ψυιοπασδφγηϕκλζξχϖβνµθωερτψυιοπα σδφγηϕκλζξχϖβνµθωερτψυιοπασδφγηϕκ χϖβνµθωερτψυιοπασδφγηϕκλζξχϖβνµθ

νµθωερτψυιοπασδφγηϕκλζξχϖβνµθωερτ ψυιοπασδφγηϕκλζξχϖβνµθωερτψυιοπα σδφγηϕκλζξχϖβνµθωερτψυιοπασδφγηϕκ χϖβνµθωερτψυιοπασδφγηϕκλζξχϖβνµθ θωερτψυιοπασδφγηϕκλζξχϖβνµθωερτψ υιοπασδφγηϕκλζξχϖβνµθωερτψυιοπασδ φγηϕκλζξχϖβνµθωερτψυιοπασδφγηϕκλζ ξχϖβνµθωερτψυιοπασδφγηϕκλζξχϖβνµ EE 331 Design Project Final Report θωερτψυιοπασδφγηϕκλζξχϖβνµθωερτψ

More information

Temperature Monitoring and Fan Control with Platform Manager 2

Temperature Monitoring and Fan Control with Platform Manager 2 Temperature Monitoring and Fan Control September 2018 Technical Note FPGA-TN-02080 Introduction Platform Manager 2 devices are fast-reacting, programmable logic based hardware management controllers. Platform

More information

Hello, and welcome to this presentation of the STM32G0 digital-to-analog converter. This block is used to convert digital signals to analog voltages

Hello, and welcome to this presentation of the STM32G0 digital-to-analog converter. This block is used to convert digital signals to analog voltages Hello, and welcome to this presentation of the STM32G0 digital-to-analog converter. This block is used to convert digital signals to analog voltages which can interface with the external world. 1 The STM32G0

More information

8-bit Microcontroller with 4K Bytes In-System Programmable Flash and Boost Converter. ATtiny43U. Preliminary

8-bit Microcontroller with 4K Bytes In-System Programmable Flash and Boost Converter. ATtiny43U. Preliminary Features High Performance, Low Power AVR 8-Bit Microcontroller Advanced RISC Architecture 120 Powerful Instructions Most Single Clock Cycle Execution 32 x 8 General Purpose Working Registers Fully Static

More information

Low Energy Timer. AN Application Note. Introduction

Low Energy Timer. AN Application Note. Introduction ...the world's most energy friendly microcontrollers Low Energy Timer AN0026 - Application Note Introduction This application note gives an overview of the Low Energy Timer (LETIMER) and demonstrates how

More information

LINEAR IC APPLICATIONS

LINEAR IC APPLICATIONS 1 B.Tech III Year I Semester (R09) Regular & Supplementary Examinations December/January 2013/14 1 (a) Why is R e in an emitter-coupled differential amplifier replaced by a constant current source? (b)

More information

Microcontroller Systems. ELET 3232 Topic 21: ADC Basics

Microcontroller Systems. ELET 3232 Topic 21: ADC Basics Microcontroller Systems ELET 3232 Topic 21: ADC Basics Objectives To understand the modes and features of the Analog-to-Digital Converter on the ATmega 128 To understand how to perform an Analog-to-Digital

More information

8-bit Microcontroller with 16K Bytes In-System Programmable Flash. ATtiny1634

8-bit Microcontroller with 16K Bytes In-System Programmable Flash. ATtiny1634 Features High Performance, Low Power AVR 8-bit Microcontroller Advanced RISC Architecture 125 Powerful Instructions Most Single Clock Cycle Execution 32 x 8 General Purpose Working Registers Fully Static

More information

8-bit Microcontroller with 2/4/8K Bytes In-System Programmable Flash. Atmel ATtiny24/44/84. Automotive. Preliminary

8-bit Microcontroller with 2/4/8K Bytes In-System Programmable Flash. Atmel ATtiny24/44/84. Automotive. Preliminary Features High Performance, Low Power AVR 8-bit Microcontroller Advanced RISC Architecture 120 Powerful Instructions Most Single Clock Cycle Execution 32 x 8 General Purpose Working Registers Fully Static

More information

High performance, low power AVR 8-bit microcontroller Advanced RISC architecture. Non-volatile program and data memories. Peripheral features

High performance, low power AVR 8-bit microcontroller Advanced RISC architecture. Non-volatile program and data memories. Peripheral features ATtiny24/44/84 8-bit AVR Microcontroller with 2/4/8K Bytes In-System Programmable Flash DATASHEET Features High performance, low power AVR 8-bit microcontroller Advanced RISC architecture 120 powerful

More information

LM4: The timer unit of the MC9S12DP256B/C

LM4: The timer unit of the MC9S12DP256B/C Objectives - To explore the Enhanced Capture Timer unit (ECT) of the MC9S12DP256B/C - To program a real-time clock signal with a fixed period and display it using the onboard LEDs (flashing light) - To

More information

Hardware Platforms and Sensors

Hardware Platforms and Sensors Hardware Platforms and Sensors Tom Spink Including material adapted from Bjoern Franke and Michael O Boyle Hardware Platform A hardware platform describes the physical components that go to make up a particular

More information

8-bit Microcontroller with 2/4/8K Bytes In-System Programmable Flash. ATtiny24/44/84. Preliminary

8-bit Microcontroller with 2/4/8K Bytes In-System Programmable Flash. ATtiny24/44/84. Preliminary Features High Performance, Low Power AVR 8-Bit Microcontroller Advanced RISC Architecture 120 Powerful Instructions Most Single Clock Cycle Execution 32 x 8 General Purpose Working Registers Fully Static

More information

8-bit Microcontroller with 2/4/8K Bytes In-System Programmable Flash. ATtiny24/44/84. Preliminary

8-bit Microcontroller with 2/4/8K Bytes In-System Programmable Flash. ATtiny24/44/84. Preliminary Features High Performance, Low Power AVR 8-Bit Microcontroller Advanced RISC Architecture 120 Powerful Instructions Most Single Clock Cycle Execution 32 x 8 General Purpose Working Registers Fully Static

More information

Complete Self-Test. Plug-in Module Self-Test

Complete Self-Test. Plug-in Module Self-Test Power-On Self-Test Each time the instrument is powered on, a small set of self-tests are performed. These tests check that the minimum set of logic and measurement hardware are functioning properly. Any

More information

Temperature Monitoring and Fan Control with Platform Manager 2

Temperature Monitoring and Fan Control with Platform Manager 2 August 2013 Introduction Technical Note TN1278 The Platform Manager 2 is a fast-reacting, programmable logic based hardware management controller. Platform Manager 2 is an integrated solution combining

More information

EIE/ENE 334 Microprocessors

EIE/ENE 334 Microprocessors EIE/ENE 334 Microprocessors Lecture 13: NuMicro NUC140 (cont.) Week #13 : Dejwoot KHAWPARISUTH Adapted from http://webstaff.kmutt.ac.th/~dejwoot.kha/ NuMicro NUC140: Technical Ref. Page 2 Week #13 NuMicro

More information

EE445L Fall 2012 Final Version B Page 1 of 7

EE445L Fall 2012 Final Version B Page 1 of 7 EE445L Fall 2012 Final Version B Page 1 of 7 Jonathan W. Valvano First: Last: This is the closed book section. You must put your answers in the boxes on this answer page. When you are done, you turn in

More information

AN3252 Application note

AN3252 Application note Application note Building a wave generator using STM8L-DISCOVERY Application overview This application note provides a short description of how to use the STM8L-DISCOVERY as a basic wave generator for

More information

Programming and Interfacing

Programming and Interfacing AtmelAVR Microcontroller Primer: Programming and Interfacing Second Edition f^r**t>*-**n*c contents Preface xv AtmelAVRArchitecture Overview 1 1.1 ATmegal64 Architecture Overview 1 1.1.1 Reduced Instruction

More information

8-bit Atmel tinyavr Microcontroller with 16K Bytes In-System Programmable Flash. ATtiny1634

8-bit Atmel tinyavr Microcontroller with 16K Bytes In-System Programmable Flash. ATtiny1634 8-bit Atmel tinyavr Microcontroller with 16K Bytes In-System Programmable Flash Features High Performance, Low Power AVR 8-bit Microcontroller Advanced RISC Architecture 125 Powerful Instructions Most

More information

INSTITUTO SUPERIOR TÉCNICO. Architectures for Embedded Computing

INSTITUTO SUPERIOR TÉCNICO. Architectures for Embedded Computing UNIVERSIDADE TÉCNICA DE LISBOA INSTITUTO SUPERIOR TÉCNICO Departamento de Engenharia Informática Architectures for Embedded Computing MEIC-A, MEIC-T, MERC Lecture Slides Version 3.0 - English Lecture 23

More information

AN2581 Application note

AN2581 Application note AN2581 Application note STM32F10xxx TIM application examples Introduction This application note is intended to provide practical application examples of the STM32F10xxx TIMx peripheral use. This document,

More information

Design with Microprocessors

Design with Microprocessors Design with Microprocessors Year III Computer Science 1-st Semester Lecture 5: AVR timers Timers AVR timers 8 bit timers/counters 16 bit timers/counters Characteristics Input clock prescaler Read / write

More information

EE 308 Lab Spring 2009

EE 308 Lab Spring 2009 9S12 Subsystems: Pulse Width Modulation, A/D Converter, and Synchronous Serial Interface In this sequence of three labs you will learn to use three of the MC9S12's hardware subsystems. WEEK 1 Pulse Width

More information

8-bit Microcontroller with 2K Bytes In-System Programmable Flash. ATtiny261A. Appendix A. Appendix A ATtiny261A Specification at 105 C

8-bit Microcontroller with 2K Bytes In-System Programmable Flash. ATtiny261A. Appendix A. Appendix A ATtiny261A Specification at 105 C Appendix A ATtiny261A Specification at 15 C This document contains information specific to devices operating at temperatures up to 15 C. Only deviations are covered in this appendix, all other information

More information

Using the Z8 Encore! XP Timer

Using the Z8 Encore! XP Timer Application Note Using the Z8 Encore! XP Timer AN013104-1207 Abstract Zilog s Z8 Encore! XP microcontroller consists of four 16-bit reloadable timers that can be used for timing, event counting or for

More information

8-bit Microcontroller with 1K Bytes In-System Programmable Flash. ATtiny13A

8-bit Microcontroller with 1K Bytes In-System Programmable Flash. ATtiny13A Features High Performance, Low Power AVR 8-Bit Microcontroller Advanced RISC Architecture 120 Powerful Instructions Most Single Clock Cycle Execution 32 x 8 General Purpose Working Registers Fully Static

More information

Real Time Embedded Systems. Lecture 1 January 17, 2012

Real Time Embedded Systems.  Lecture 1 January 17, 2012 Analog Real Time Embedded Systems www.atomicrhubarb.com/embedded Lecture 1 January 17, 2012 Topic Section Topic Where in the books Catsoulis chapter/page Simon chapter/page Zilog UM197 (ZNEO Z16F Series

More information

ME 461 Laboratory #5 Characterization and Control of PMDC Motors

ME 461 Laboratory #5 Characterization and Control of PMDC Motors ME 461 Laboratory #5 Characterization and Control of PMDC Motors Goals: 1. Build an op-amp circuit and use it to scale and shift an analog voltage. 2. Calibrate a tachometer and use it to determine motor

More information

RV-8564 Application Manual. Application Manual. Real-Time Clock Module with I 2 C-Bus Interface. October /62 Rev. 2.1

RV-8564 Application Manual. Application Manual. Real-Time Clock Module with I 2 C-Bus Interface. October /62 Rev. 2.1 Application Manual Application Manual Real-Time Clock Module with I 2 C-Bus Interface October 2017 1/62 Rev. 2.1 TABLE OF CONTENTS 1. OVERVIEW... 5 1.1. GENERAL DESCRIPTION... 5 1.2. APPLICATIONS... 5

More information

Measuring Distance Using Sound

Measuring Distance Using Sound Measuring Distance Using Sound Distance can be measured in various ways: directly, using a ruler or measuring tape, or indirectly, using radio or sound waves. The indirect method measures another variable

More information

Lab 5 Timer Module PWM ReadMeFirst

Lab 5 Timer Module PWM ReadMeFirst Lab 5 Timer Module PWM ReadMeFirst Lab Folder Content 1) ReadMeFirst 2) Interrupt Vector Table 3) Pin out Summary 4) DriverLib API 5) SineTable Overview In this lab, we are going to use the output hardware

More information

The University of Texas at Arlington Lecture 10 ADC and DAC

The University of Texas at Arlington Lecture 10 ADC and DAC The University of Texas at Arlington Lecture 10 ADC and DAC CSE 3442/5442 Measuring Physical Quantities (Digital) computers use discrete values, and use these to emulate continuous values if needed. In

More information

Lab 9. Speed Control of a D.C. motor. Sensing Motor Speed (Tachometer Frequency Method)

Lab 9. Speed Control of a D.C. motor. Sensing Motor Speed (Tachometer Frequency Method) Lab 9. Speed Control of a D.C. motor Sensing Motor Speed (Tachometer Frequency Method) Motor Speed Control Project 1. Generate PWM waveform 2. Amplify the waveform to drive the motor 3. Measure motor speed

More information

Two hydrogen atoms meet. One says "I've lost my electron. The other says "Are you sure?" The first replies "Yes, I'm positive."

Two hydrogen atoms meet. One says I've lost my electron. The other says Are you sure? The first replies Yes, I'm positive. Charge Two hydrogen atoms meet. One says "I've lost my electron. The other says "Are you sure?" The first replies "Yes, I'm positive." 1 Basic Concepts of Electricity Voltage Current Resistance 2 1 Electric

More information