Pugazhendhi.M 11/12/2018 TIMERS 11/12/2018 CCET CCET.

Slides:



Advertisements
Similar presentations
EEE305 Microcontroller Systems
Advertisements

More fun with Timer/Counters
The 8051 Microcontroller Chapter 5 SERIAL PORT OPERATION.
ECT 357 Ch 16 Output Control. Today’s Quote: The measure of a man is not how great his faith is bt how great his love is. The measure of a man is not.
Introduction of Holtek HT-46 series MCU
The PIC uCs PIC Microcontroller and Embedded Systems Muhammad Ali Mazidi, Rolin McKinlay and Danny Causey Eng. Husam Alzaq The Islamic Uni. Of Gaza 9-1.
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 
Taking timing further Chapter Nine 9.1 – 9.8 Dr. Gheith Abandah1.
Timers and Interrupts Shivendu Bhushan Summer Camp ‘13.
Lecture 9 Timer Operations and Programming. 2  Introduction  Summary of timers  Timer programming sequence  Summary of timer SFRs  Timer 0: 8-bit.
Today’s Lecture List the Timers of PIC18 and their associated registers Describe the various modes of the PIC18 timers Program the PIC18 timers in Assembly.
7/23 Timers in Coldfire Processor Computer Science & Engineering Department Arizona State University Tempe, AZ Dr. Yann-Hang Lee (480)
System Clocks.
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
Timers ELEC 330 Digital Systems Engineering Dr. Ron Hayne
Timers The timers of the PIC16C7X microcontroller can be briefly described in only one sentence. There are three completely independent timers/counters.
Prepared by Eng. Musa Alyaman1 Chapter Seven Chapter Seven PIC16F87x.
Robotraffic software and programming aids Robotics Laboratory Faculty of Mechanical Engineering Technion Israel Institute of Technology.
© 2009, Renesas Technology America, Inc., All Rights Reserved 1 Course Introduction  Purpose This course provides an introduction to the peripheral functions.
Example. SBUF Register SCON Register(1) SCON Register(2)
ELE22MIC Lecture 18 The AVR Sleep Modes The ATMEGA128’s Timer System
Atmel Atmega128 Overview ALU Particulars RISC Architecture 133, Mostly single cycle instructions 2 Address instructions (opcode, Rs, Rd, offset) 32x8 Register.
CCP MODULES  The CCP module (Capture/Compare/PWM) is a peripheral which allows the user to time and control different events.  Capture Mode provides.
Teachers Name : Suman Sarker Telecommunication Technology Subject Name : Microcontroller & Embedded System Subject Code : 6871 Semester : 7th Department.
MCS51 - lecture 3. Lecture 3 2/30 Timers/counters MCS51.
Architecture and instruction set. Microcontroller Core Features:  Operating speed: DC - 20 MHz clock input DC ns instruction cycle Up to 8K x.
Saxion University of Applied Sciences Advanced Microcontrollers A practical approach.
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.
DsPIC30F4011.
Microprocessors A practical approach Lesson 2 Hardware description and Delays.
Timer 1 and 2 operation, PWM Principles. Timer 1 Operation.
Microcontrollers session. What is Microcontroller? Microcontroller is composed of microprocessor,ram, flash memory,EEPROM and some modules like timers,
Timer Programming in Assembly and C Prepared By:
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.
Special Features. Device Configuration bits Revision Device Configuration bits Revision On-chip Power-on Reset (POR) Revision On-chip Power-on Reset (POR)
One more PIC18F252 example and revision for exam B222L Branislav Vuksanovic, UoP, ECE.
Microprocessors A practical approach..
TIMERS.
Timer modules in PIC 16F877.  The PIC 16F877 basically has three independent timer modules,  denoted by the symbols, TIMER-0, TIMER1,andTIMER2. . These.
16F877A.
Chapter 9 PIC18 Timer Programming in Assembly
Why are Timer Functions Important?
V.V.P. ENGINEERING COLLEGE,RAJKOT
DTMF BASED REMOTE INDUSTRIAL LOAD AND/OR AGRICULTURAL PUMP CONTROL
8051 Timers Timers are the peripherals of the 8051 Microcontroller.
AVR Addressing Modes Subject: Microcontoller & Interfacing
MSP432 ARM Timer Programming
Interrupt Source: under
Microprocessors Timers
Project Title EVM IN PIC Under the Guidance of Submitted by.
RX 8-Bit Timer (TMR) 4/20/2011 Rev. 1.00
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
8051 Timers Prof. Rajiv R Bhandari.
8051 Timers / Counters It has two timers Timer 0 and Timer 1.
Timers.
8-bit Timer/Counter2 with PWM and Asynchronous Operation
PIC18 Timer Programming “Explain the assembly language programming for the timer and counter module”
Lecture 12 Multi-Function Timer Pulse Unit 2 (MTU2a)
8051 Micro Controller.
Figure CCP1 Control Register
Timer Source: under
Timer/Counter Timer/Counter 0 Timer/Counter 1 Timer/Counter 2 8 bit
Programmable Interval Timer
Timers Chapter 2.
Presentation transcript:

Pugazhendhi.M 11/12/2018 TIMERS 11/12/2018 CCET CCET

Timer modules Timer module 0 Timer module 1 Timer module 2 11/12/2018 CCET

TIMER0 MODULE Software selectable as an 8-bit or 16-bit timer/ counter Readable and writable Dedicated 8-bit software programmable prescaler Clock source selectable to be external or internal Interrupt-on-overflow from FFh to 00h in 8-bit mode and FFFFh to 0000h in 16-bit mode Edge select for external clock 11/12/2018 CCET

TIMER0 CONTROL REGISTER T0CON: bit 7 TMR0ON: Timer0 On/Off Control bit bit 6 T08BIT: Timer0 8-bit/16-bit Control bit bit 5 T0CS: Timer0 Clock Source Select bit bit 4 T0SE: Timer0 Source Edge Select bit bit 3 PSA: Timer0 Prescaler Assignment bit bit 2-0 T0PS2:T0PS0: Timer0 Prescaler Select bits 11/12/2018 CCET

TIMER0 OPERATION Operate as a timer or counter Timer mode is selected by clearing the T0CS bit Counter mode is selected by setting the T0CS bit An 8-bit counter is available as a prescaler for the Timer0 module 11/12/2018 CCET

TIMER1 MODULE 16-bit timer/counter (two 8-bit registers; TMR1H and TMR1L) Readable and writable (both registers) Internal or external clock select Interrupt-on-overflow from FFFFh to 0000h RESET from CCP module special event trigger 11/12/2018 CCET

TIMER1 CONTROL REGISTER T1CON: bit 7 RD16: 16-bit Read/Write Mode Enable bit bit 6 Unimplemented: Read as '0' bit 5-4 T1CKPS1:T1CKPS0: Timer1 Input Clock Prescale Select bits bit 3 T1OSCEN: Timer1 Oscillator Enable bit bit 2 T1SYNC: Timer1 External Clock Input Synchronization Select bit bit 1 TMR1CS: Timer1 Clock Source Select bit bit 0 TMR1ON: Timer1 On bit 11/12/2018 CCET

TIMER1 OPERATION Operates as a timer, synchronous counter and as an asynchronous counter A crystal oscillator circuit is built-in between pins T1OSI (input) and T1OSO (amplifier output) This interrupt can be enabled/disabled by setting/clearing TMR1 interrupt enable bit 11/12/2018 CCET

TIMER2 MODULE 8-bit timer (TMR2 register) 8-bit period register (PR2) Readable and writable (both registers) Software programmable prescaler (1:1, 1:4, 1:16) Software programmable postscaler (1:1 to 1:16) Interrupt on TMR2 match of PR2 SSP module optional use of TMR2 output to generate clock shift 11/12/2018 CCET

TIMER2 CONTROL REGISTER T2CON: bit 7 Unimplemented: Read as '0' bit 6-3 TOUTPS3:TOUTPS0: Timer2 Output Postscale Select bits bit 2 TMR2ON: Timer2 On bit bit 1-0 T2CKPS1:T2CKPS0: Timer2 Clock Prescale Select bits 11/12/2018 CCET

TIMER2 OPERATION Timer2 can be used as the PWM time-base for the PWM mode of the CCP module. The output of TMR2 (before the postscaler) is fed to the Synchronous Serial Port module, which optionally uses it to generate the shift clock. 11/12/2018 CCET

TIMER3 MODULE 16-bit timer/counter (two 8-bit registers; TMR3H and TMR3L) Readable and writable (both registers) Internal or external clock select Interrupt-on-overflow from FFFFh to 0000h RESET from CCP module trigger 11/12/2018 CCET

TIMER3 CONTROL REGISTER T3CON: bit 7 RD16: 16-bit Read/Write Mode Enable bit bit 6-3 T3CCP2:T3CCP1: Timer3 and Timer1 to CCPx Enable bits bit 5-4 T3CKPS1:T3CKPS0: Timer3 Input Clock Prescale Select bits bit 2 T3SYNC: Timer3 External Clock Input Synchronization Control bit bit 1 TMR3CS: Timer3 Clock Source Select bit bit 0 TMR3ON: Timer3 On bit 11/12/2018 CCET

TIMER3 OPERATION Operates as a timer, synchronous counter and as an asynchronous counter The TMR3 Register pair (TMR3H:TMR3L) increments from 0000h to FFFFh and rolls over to 0000h. 11/12/2018 CCET

11/12/2018 CCET

11/12/2018 CCET

11/12/2018 CCET

Continue………. 11/12/2018 CCET