8051 Aula 02 Prof Afonso Ferreira Miguel. Microcontrolador 8051 (MCS-51)  Timers do MCS51 Two 16-bit Counter/Timers: Two 16-bit Counter/Timers: Up counters,

Slides:



Advertisements
Similar presentations
The 8051 Microcontroller and Embedded Systems
Advertisements

4-1 Timers Timers can be used for  timing  event counting  pulse width measurement  pulse generation  frequency multiplication There are 8 Timers.
Chapter Microcontroller Objectives  Understand the 8051 Architecture  Use SFR in C  Use I/O ports in C.
8051 Core Specification.
CSC Timers Since this is a microcontroller it mainly finds itself in embedded devices Quite often embedded devices need to synchronize events The.
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.
5-1 Timer/Counters In many microprocessor systems we need to:  count logic pulses  measure the frequency of signals  measure the period of pulses 
8254 Modes Made by: Ryan wahab (8) Modes Gate is low the count will be paused Gate is high Will continue counting Mode 0: An events counter.
Timers and Interrupts Shivendu Bhushan Summer Camp ‘13.
Microcontroller 8051.
Embedded Systems UNIT 3. Pin Details of 8051 Pins 1-8: Port 1 Each of these pins can be configured as an input or an output. Pin 9: The positive voltage.
1.  8051 Timers “count up,” incrementing the Timer’s respective “count register” each time there is a triggering clock pulse. 2  When the “count register”
Lecture 9 Timer Operations and Programming. 2  Introduction  Summary of timers  Timer programming sequence  Summary of timer SFRs  Timer 0: 8-bit.
The 8051 Microcontroller architecture
Microcontroller 8051.
NATIONAL TAIWAN OCEAN UNIVERSITY 國立台灣海洋大學 2002/4/8 Microcomputers and Microprocessors Chapter 9 COUNTER/TIMER PROGRAMMING IN THE 8051.
CHAPTER TIMER PROGRAMMING Timers The 8051 has two timers/counters, they can be used as ◦ Timers to generate a time delay ◦ Event counters.
8051 timer/counter.
1 Chapter 4 Timer Operation (I. Scott MacKenzie).
Chapter 9 Counter/Timer Programming in the 8051
7/23 Timers in Coldfire Processor Computer Science & Engineering Department Arizona State University Tempe, AZ Dr. Yann-Hang Lee (480)
8254 Counter/Timer Counter Each of the three counter has 3 pins associated CLK: input clock frequency- 8 MHz OUT GATE: Enable (high) or disable.
ARM Timers.
MICROCONTROLERUL ONIGA ŞTEFAN Curs 1999/ MICROCONTROLERE - Calculator pe un cip deoarece el conţine pe lângă CPU şi memorie şi interfeţe de.
Timers ELEC 330 Digital Systems Engineering Dr. Ron Hayne
Chapter 4 TIMER OPERATION
CoE3DJ4 Digital Systems Design Chapter 4: Timer operation.
Timers The timers of the PIC16C7X microcontroller can be briefly described in only one sentence. There are three completely independent timers/counters.
Lecture Set 9 MCS-51 Serial Port.
Timers /Counters Programming  The 8051 has 2 timers/counters: ○ timer/counter 0 ○ timer/counter 1 They can be used as 1. The timer is used as a time.
© 2009, Renesas Technology America, Inc., All Rights Reserved 1 Course Introduction  Purpose This course provides an introduction to the peripheral functions.
1. Registers Used in Timer/Counter  TH0, TL0, TH1, TL1  TMOD (Timer mode register)  TCON (Timer control register) 2.
ELE22MIC Lecture 18 The AVR Sleep Modes The ATMEGA128’s Timer System
8051 Timer/Counter Lec note 7.
8051 Micro controller. Architecture of 8051 Features of 8051.
MCS51 - lecture 3. Lecture 3 2/30 Timers/counters MCS51.
Intel 8051 Another family of microcontroller is the Intel 8051 family. The basic 8051 microcontroller has four parallel input/output ports, port 0, 1,
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.
© 2009, Renesas Technology America, Inc., All Rights Reserved 1 Course Introduction  Purpose This course provides an introduction to the peripheral functions.
The 8051 Microcontroller Prepared By, R-THANDAIAH PRABU M.E.,
Jump, Loop, and Call Instructions
The Silicon Laboratories C8051F020
C Examples 1. Download Links dsPIC30F4011/4012 Data Sheet dsPIC30F4013/3014 dsPIC30F Family Reference Manual MikroC MikroC Manual MikroC Quick Reference.
Lecture 41 CSE 341 – Microprocessors Lecture 4 Md. Omar Faruqe UB 1228
#1 of 10 Tutorial Introduction PURPOSE -To explain how to configure and use the Timer Interface Module in common applications OBJECTIVES: -Identify the.
Timer Programming in Assembly and C Prepared By:
HJD Institute of Technical Education & Research- Kera(Kutch) The 8051 Microcontroller architecture PREPARED BY: RAYMA SOHIL( )
80C51 Block Diagram 1. 80C51 Memory Memory The data width is 8 bits Registers are 8 bits Addresses are 8 bits – i.e. addresses for only 256.
DEPARTMENT OF ELECTRONICS ENGINEERING V-SEMESTER MICROPROCESSOR & MICROCONTROLLER 1 CHAPTER NO microcontroller & programming.
One more PIC18F252 example and revision for exam B222L Branislav Vuksanovic, UoP, ECE.
80C51 Block Diagram ECE Overview.
Assembly Language * * * * * * * 8051 Timer
8051 Timers Timers are the peripherals of the 8051 Microcontroller.
Timer Source: under
BVM Engineering College Electrical Engineering Department : Microprocessor and Microcontroller Interfacing Interrupts of 8051 Prepared by:
UNIT 5 TIMRERS/COUNTERS
Introduction to Micro Controllers & Embedded System Design I/O Processing and Serial Port Operation Department of Electrical & Computer Engineering Missouri.
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 Operations and Programming
EMT 348: Microcontroller Timer/counter
8051 Timers Prof. Rajiv R Bhandari.
Introduction to Micro Controllers & Embedded System Design Timer Operation Department of Electrical & Computer Engineering Missouri University of Science.
Timer.
8051 Timers / Counters It has two timers Timer 0 and Timer 1.
Timer Source: under
Interrupt Source: under
Timer Source: under
Prof Afonso Ferreira Miguel
Presentation transcript:

8051 Aula 02 Prof Afonso Ferreira Miguel

Microcontrolador 8051 (MCS-51)  Timers do MCS51 Two 16-bit Counter/Timers: Two 16-bit Counter/Timers: Up counters, can interrupt on overflow. Counts: Counts: CPU cycles (crystal/12). External input (max. half CPU rate). Four Operation Modes. Four Operation Modes.

Microcontrolador 8051 (MCS-51)  Timers do MCS51 Timer Mode 0 : Timer Mode 0 : Emulates 8048 counter/timer (13-bits). 8-bit counter (TL0 or TL1). 5-bit prescaler (TH0 or TH1). Timer Mode 1 : Timer Mode 1 : Simple 16-bit counter. Timer Mode 2 : Timer Mode 2 : 8-bit auto-reload. Counter in TL0 or TL1. Reload value in TH0 or TH1. Provides a periodic flag or interrupt.

Microcontrolador 8051 (MCS-51)  Timers do MCS51 Timer Mode 3 : Timer Mode 3 : Splits timer 0 into two 8-bit counter/timers.Splits timer 0 into two 8-bit counter/timers. First counter (TLO) acts like mode 0,First counter (TLO) acts like mode 0, without prescaler.without prescaler. Second counter (TH0):Second counter (TH0): Counts CPU cycles. Counts CPU cycles. Uses TR1 (timer 1 run bit) as enable. Uses TR1 (timer 1 run bit) as enable. Uses TF1 (timer 1 overflow bit) as flag. Uses TF1 (timer 1 overflow bit) as flag. Uses Timer 1 interrupt. Uses Timer 1 interrupt. Timer 1 (when timer 0 is in mode 3 ):Timer 1 (when timer 0 is in mode 3 ): Counter stopped if in mode 3. Counter stopped if in mode 3. Running in mode 0, 1, or 2. Running in mode 0, 1, or 2. Has gate (INT1) and external input (T1), but no flag or interrupt. Has gate (INT1) and external input (T1), but no flag or interrupt. May be used as a baud rate generator. May be used as a baud rate generator.

Microcontrolador 8051 (MCS-51)  Timers do MCS51 – MODO 1 Osc.÷12Osc. TL1 8-bits TF1 TH1 8-bits Interrupt Control T1 (Pin) TR1 Gate INT1 (Pin) The Gate input controls whether the Counter runs while gated bythe interrupt signal or not. C/T=0 C/T=1

Microcontrolador 8051 (MCS-51)  Timers do MCS51 – MODO 2 Osc.÷12Osc. TL1 8-bits TF1 TH1 8-bits Interrupt Control T1 (Pin) TR1 Gate INT1 (Pin) The Gate input controls whether the Counter runs while gated bythe interrupt signal or not. C/T=0 C/T=1

Microcontrolador 8051 (MCS-51)  Timers do MCS51 – TMOD

Microcontrolador 8051 (MCS-51)  Timers do MCS51 – TCON