參數(shù)資料
型號: MCV18ET-I/SO
元件分類: 微控制器/微處理器
英文描述: FLASH, 20 MHz, RISC MICROCONTROLLER, PDSO18
封裝: 7.50 MM, LEAD FREE, SOIC-18
文件頁數(shù): 42/108頁
文件大?。?/td> 1509K
代理商: MCV18ET-I/SO
2009 Microchip Technology Inc.
DS41399A-page 39
MCV18E
6.0
TIMER2 MODULE
The Timer2 module is an 8-bit timer with the following
features:
8-bit timer register (TMR2)
8-bit period register (PR2)
Interrupt on TMR2 match with PR2
Software programmable prescaler (1:1, 1:4, 1:16)
Software programmable postscaler (1:1 to 1:16)
See Figure 6-1 for a block diagram of Timer2.
6.1
Timer2 Operation
The clock input to the Timer2 module is the system
instruction clock (FOSC/4). The clock is fed into the
Timer2 prescaler, which has prescale options of 1:1,
1:4 or 1:16. The output of the prescaler is then used to
increment the TMR2 register.
The values of TMR2 and PR2 are constantly compared
to determine when they match. TMR2 will increment
from 00h until it matches the value in PR2. When a
match occurs, two things happen:
TMR2 is reset to 00h on the next increment cycle
The Timer2 postscaler is incremented
The match output of the Timer2/PR2 comparator is
then fed into the Timer2 postscaler. The postscaler has
postscale options of 1:1 to 1:16 inclusive. The output of
the Timer2 postscaler is used to set the TMR2IF
interrupt flag bit in the PIR2 register.
The TMR2 and PR2 registers are both fully readable
and writable. On any Reset, the TMR2 register is set to
00h and the PR2 register is set to FFh.
Timer2 is turned on by setting the TMR2ON bit in the
T2CON register to a ‘1’. Timer2 is turned off by clearing
the TMR2ON bit to a ‘0’.
The Timer2 prescaler is controlled by the T2CKPS bits
in the T2CON register. The Timer2 postscaler is
controlled by the TOUTPS bits in the T2CON register.
The prescaler and postscaler counters are cleared
when:
A write to TMR2 occurs.
A write to T2CON occurs.
Any device Reset occurs (Power-on Reset, MCLR
Reset, Watchdog Timer Reset, or Brown-out
Reset).
FIGURE 6-1:
TIMER2 BLOCK DIAGRAM
Note:
TMR2 is not cleared when T2CON is
written.
Comparator
TMR2
Sets Flag
TMR2
Output
Reset
Postscaler
Prescaler
PR2
2
FOSC/4
1:1 to 1:16
1:1, 1:4, 1:16
EQ
4
bit TMR2IF
TOUTPS<3:0>
T2CKPS<1:0>
相關(guān)PDF資料
PDF描述
MCV18E-I/P 32-BIT, FLASH, 20 MHz, RISC MICROCONTROLLER, PDIP18
MD8086-2/B 16-BIT, 8 MHz, MICROPROCESSOR, CDIP40
MD80C154-12/883D 8-BIT, 12 MHz, MICROCONTROLLER, CDIP40
MR83C154TXXX-20/883 8-BIT, MROM, 20 MHz, MICROCONTROLLER, CQCC44
MR83C154XXX-20/883D 8-BIT, MROM, 20 MHz, MICROCONTROLLER, CQCC44
相關(guān)代理商/技術(shù)參數(shù)
參數(shù)描述
MC-V190H 制造商:Panasonic Industrial Company 功能描述:FILTER KIT
M-CV193H 制造商:Panasonic Industrial Company 功能描述:OD005
MC-V193H 制造商:Panasonic Industrial Company 功能描述:FILTER KIT
MCV19ES 制造商:Mencom 功能描述:
MCV-19FP-FW 制造商:Mencom 功能描述: