ELE22MIC Lecture 18 The AVR Sleep Modes The ATMEGA128’s Timer System

Slides:



Advertisements
Similar presentations
More fun with Timer/Counters
Advertisements

Sistemi Elettronici Programmabili13-1 MULTI OSC + CLOCK FILTER LVD POWER SUPPLY CONTROL 8 BIT CORE ALU PROGRAM MEMORY RAM I2CI2C PORT A SPI PORT B 16-BIT.
Oscilloscope Watch Teardown. Agenda History and General overview Hardware design: – Block diagram and general overview – Choice of the microcontroller.
Introduction of Holtek HT-46 series MCU
COMP3221: Microprocessors and Embedded Systems Lecture 16: Interrupts II Lecturer: Hui Wu Session 2, 2005.
8-Bit Timer/Counter 0 Counter/Timer 0 and 2 (TCNT0, TCNT2) are nearly identical. Differences: -TCNT0 can run off an external 32Khz clock (Tosc) or the.
ATtiny2313 Timers/Counters CS-423 Dick Steflik. What Do You Use Timers For? Timing of events (internal or external)‏ Scheduling Events Measuring the width.
5-1 Timer/Counters In many microprocessor systems we need to:  count logic pulses  measure the frequency of signals  measure the period of pulses 
HT46 A/D Type MCU Series Data Memory (Byte) Program Memory HT46R22 (OTP) HT46C22 (Mask) 2Kx Kx16 4Kx HT46R23 (OTP) HT46C23 (Mask) HT46R24.
Timers and Interrupts Shivendu Bhushan Summer Camp ‘13.
Pulse Width Modulation modes
MSP Ultra-Low Power | High Integration | Easy-to-Use “How To” Series: Clock System.
BLDC MOTOR SPEED CONTROL USING EMBEDDED PROCESSOR
Renesas Electronics Europe GmbH A © 2010 Renesas Electronics Corporation. All rights reserved. RL78 Clock Generator.
7/23 Timers in Coldfire Processor Computer Science & Engineering Department Arizona State University Tempe, AZ Dr. Yann-Hang Lee (480)
Timer/counter Chapter 12
ARM Timers.
System Clocks.
1 AVR Session 2 Master : Dr.jafari Authors: M.H Edrisi, hadi.edrisi yyyy aaaa hhhh oooo oooo.... cccc oooo mmmm.
16F877A. Timer 0 The Timer0 module timer/counter has the following features: –8-bit timer/counter –Readable and writable –8-bit software programmable.
A Few Words From Dilbert
MSP430 Mixed Signal Microcontroller – Parte 2 Afonso Ferreira Miguel Source: slau056d – Texas instruments.
Chapter 4 TIMER OPERATION
Clock Options and Sleep Modes. Clock Sources Flash Fuse bits can be programmed to choose one of the following Clock sources: 1. External RC Osc. f = 1/(3RC).
MCU: Interrupts and Timers Ganesh Pitchiah. What’s an MCU ?
Embedded System Design Laboratory October 11, 2002Stanford University - EE281 Lecture #4#1 Lecture #4 Outline Announcements Project Proposal AVR Processor.
ELE2MIC Lecture 21 The AVR Sleep Modes ATMEGA128’s Analog to Digital Converter –Features –Block Diagram –Clock Source –Input Sources –Interrupts –BandGap.
Counter/Timer/PWM. incoming Lab. Counter counter is a device which stores the number of times a particular event or process has occurred synchronous/asynchronous.
CCP MODULES  The CCP module (Capture/Compare/PWM) is a peripheral which allows the user to time and control different events.  Capture Mode provides.
ATtiny23131 A SEMINAR ON AVR MICROCONTROLLER ATtiny2313.
Timers and Interrupts Anurag Dwivedi. Let Us Revise.
CS-280 Dr. Mark L. Hornick 1 Atmel Timer/Counter System Most microcontrollers include some type of timer system Facilitates real-time monitoring and control.
Interrupts  An interrupt is any service request that causes the CPU to stop its current execution stream and to execute an instruction stream that services.
TIMERS AND INTERRUPTS AVI SINGH KEVIN JOSE PIYUSH AWASTHI.
Device Overview 1.  The advantages of all PIC18Fxxxx microcontrollers:  High computational performance  High-endurance  Enhanced Flash program memory.
Lecture 4 General-Purpose Input/Output NCHUEE 720A Lab Prof. Jichiang Tsai.
Chapter 12 Some PIC Microcontroller Advances The aims of this chapter are to introduce: To introduce in overview two microcontrollers which show some enhanced.
#1 of 10 Tutorial Introduction PURPOSE -To explain how to configure and use the Timer Interface Module in common applications OBJECTIVES: -Identify the.
Timer 1 and 2 operation, PWM Principles. Timer 1 Operation.
C Examples 6. Download Links MPLAB IDE dsPIC30F4011/4012 Data Sheet dsPIC30F Family Reference Manual MikroC MikroC Manual MikroC Quick Reference.
MICROCONTROLLER INTERFACING WITH STEPPER MOTOR MADE BY: Pruthvirajsinh Jadeja ( ) COLLEGE:DIET BRANCH:EC.
NAM S.B MDLAB. Electronic Engineering, Kangwon National University 1.
Timer Programming in Assembly and C Prepared By:
16F877A.
Why are Timer Functions Important?
MICROCONTROLLER AND INTERFACING
CC2430 module Jinho Son Real-Time System Lab.
V.V.P. ENGINEERING COLLEGE,RAJKOT
ECE 353 Introduction to Microprocessor Systems
BITS EDU. CAMPUS , VARNAMA
AVR Addressing Modes Subject: Microcontoller & Interfacing
8-Bit Timer/Counter 0 Counter/Timer 0 and 2 (TCNT0, TCNT2) are nearly identical. Differences: -TCNT0 can run off an external 32Khz clock (Tosc) or the.
Timer/Counter Modified from Dr. Lam Phung’s Slides.
16-bit Timer/Counter1 Features
8-bit Timer/Counter0 with PWM
ATmega103 Timer0 and Interrupts
Introduction to the Atmel AVR Butterfly
DC motor and PWM.
8-bit Timer/Counter2 with PWM and Asynchronous Operation
Architectural Overview
UNIT 19 PWM 로봇 SW 교육원 조용수.
AVR – ATmega103(ATMEL) Architecture & Summary
Example 18 Pulse Train Using Interrupts
Wave Generation and Input Capturing
Timer/Counter Timer/Counter 0 Timer/Counter 1 Timer/Counter 2 8 bit
Programmable Interval Timer
COMP3221: Microprocessors and Embedded Systems
Presentation transcript:

ELE22MIC Lecture 18 The AVR Sleep Modes The ATMEGA128’s Timer System Clock Sources The 8-bit Timer 0 Modes Clear Timer on Compare match (CTC) Two Pulse Width Modulation (PWM) modes Fast Pulse Width Modulation Phase Correct Pulse Width Modulation

8-bit Timer/Counter 0 The ATMEGA128 contains 4 timer modules. The Bilby is the device we use in lab sessions: an ATMEGA128 on a PCB. Each module has a selection of possible clock or oscillator sources: I/O Clock, System Clock The Bilby’s main crystal is 7.3728MHz, An External low-power crystal connected to TOSC1 & TOSC2 pins.

8-bit Timer/Counter 0 The Bilby’s main crystal is 7.3728MHz, ATMEGA128 Current consumption with the main oscillator running is in the order of 5mA. The Bilby’s low-power crystal connected to TOSC1 & TOSC2 pins. The Bilby’s low power crystal is 32768Hz The ATMEGA128 has sleep modes where only this counter remains active. Total current consumption with a 32768Hz crystal clock running, in power-down sleep mode, is around 200nA (all other subsystems switched off).

Modes of Sleep - Sleep Depth

Modes of Sleep - Clock Domains

Power-Save Considerations Every enabled CPU feature consumes extra current. For example the Bandgap voltage reference consumes 10uA current. The ultra-low power-down sleep mode power consumption can only be achieved IF the features can be switched off.. We can then achieve ultra-low power operation - suitable for miniature battery operation.

Timer / Counter 0 Main Features: Timer/Counter0 is a general purpose, single channel, 8-bit Timer/Counter module. The main features are: Single Channel Counter Clear Timer on Compare Match (Auto Reload)

Timer / Counter 0 Glitch-free, Phase Correct Pulse Width Modulator (PWM) Frequency Generator 10-bit Clock Prescaler Overflow and Compare Match Interrupt Sources (TOV0 and OCF0) Allows Clocking from External 32 kHz Watch Crystal Independent of the I/O Clock

8-Bit Timer Block Diagram

8-Bit Timer Block Diagram

8-Bit Timer Counter Unit Block Diagram

8-Bit Timer Output Compare Unit

CTC Mode Timing Diagram

Fast PWM Mode, Timing Diagram

Phase Correct PWM Mode, Timing Diagram

ULN2003

Stepper Motor

ULN2003