| Electronic Components Datasheet Search |
|
PIC16F15213T-I/ST Datasheet(PDF) 179 Page - Microchip Technology |
|
|
|||||||||||||||||||||||||||||
PIC16F15213T-I/ST Datasheet(HTML) 179 Page - Microchip Technology |
|
179 / 439 page ![]() 21.1 Timer2 Operation Timer2 operates in three major modes: • Free-Running Period • One Shot • Monostable Within each operating mode, there are several options for starting, stopping and Reset. Table 21-1 lists the options. In all modes, the T2TMR count register increments on the rising edge of the clock signal from the programmable prescaler. When T2TMR equals T2PR, a high level output to the postscaler counter is generated. T2TMR is cleared on the next clock input. An external signal from hardware can also be configured to gate the timer operation or force a T2TMR count Reset. In Gate modes, the counter stops when the gate is disabled and resumes when the gate is enabled. In Reset modes, the T2TMR count is reset on either the level or edge from the external source. The T2TMR and T2PR registers are both directly readable and writable. The T2TMR register is cleared and the T2PR register initializes to 0xFF on any device Reset. Both the prescaler and postscaler counters are cleared on the following events: • A write to the T2TMR register • A write to the T2CON register • Any device Reset • External Reset source event that resets the timer Important: T2TMR is not cleared when T2CON is written. 21.1.1 Free-Running Period Mode The value of T2TMR is compared to that of the period register, T2PR, on each clock cycle. When the two values match, the comparator resets the value of T2TMR to 0x00 on the next cycle and increments the output postscaler counter. When the postscaler count equals the value in the OUTPS bits of the T2CON register then a one clock period wide pulse occurs on the TMR2_postscaled output, and the postscaler count is cleared. 21.1.2 One Shot Mode The One Shot mode is identical to the Free-Running Period mode except that the ON bit is cleared and the timer is stopped when T2TMR matches T2PR and will not restart until the ON bit is cycled off and on. Postscaler (OUTPS) values other than zero are ignored in this mode because the timer is stopped at the first period event and the postscaler is reset when the timer is restarted. 21.1.3 Monostable Mode Monostable modes are similar to One Shot modes except that the ON bit is not cleared and the timer can be restarted by an external Reset event. 21.2 Timer2 Output The Timer2 module’s primary output is TMR2_postscaled, which pulses for a single TMR2_clk period upon each match of the postscaler counter and the OUTPS bits of the T2CON register. The postscaler is incremented each time the T2TMR value matches the T2PR value. This signal can also be selected as an input to other Core Independent Peripherals. In addition, the Timer2 is also used by the CCP module for pulse generation in PWM mode. See the “PWM Overview” and “PWM Period” sections in the “CCP - Capture/Compare/PWM Module” chapter for more details on setting up Timer2 for use with the CCP and PWM modules. PIC16F15213/14/23/24/43/44 TMR2 - Timer2 Module © 2020-2022 Microchip Technology Inc. and its subsidiaries Data Sheet DS40002195E-page 179 |
|
Link URL |
| Does ALLDATASHEET help your business so far? [ DONATE ] |
About Alldatasheet | Advertisement | Contact us | Privacy Policy | Link to Datasheet | Link Exchange | Manufacturer List All Rights Reserved©Alldatasheet.com |
| Russian : Alldatasheetru.com | Korean : Alldatasheet.co.kr | Spanish : Alldatasheet.es | French : Alldatasheet.fr | Italian : Alldatasheetit.com Portuguese : Alldatasheetpt.com | Polish : Alldatasheet.pl | Vietnamese : Alldatasheet.vn Indian : Alldatasheet.in | Mexican : Alldatasheet.com.mx | British : Alldatasheet.co.uk | New Zealand : Alldatasheet.co.nz |
|
Family Site : ic2ic.com |
icmetro.com |