Datasheet
1996 Microchip Technology Inc.
Preliminary
DS40122B-page 37
PIC14000
6.0 TIMER MODULES
The PIC14000 contains two general purpose timer
modules, Timer0 (TMR0) and the Watchdog Timer
(WDT). The ADTMR is described in the A/D section.
The Timer0 module is identical to the Timer0 module of
the PIC16C7X enhanced core products. It is an 8-bit
overflow counter.
The Timer0 module has a programmable prescaler
option. This prescaler can be assigned to either the
Timer0 module or the Watchdog Timer (WDT). PSA
(OPTION<3>) assigns the prescaler, and PS2:PS0
(OPTION<2:0>) determines the prescaler value.
Timer0 can increment at the following rates: 1:1 (when
prescaler assigned to Watchdog Timer), 1:2, 1:4, 1:8,
1:16, 1:32, 1:64, 1:128, 1:256.
The Timer0 module has the following features:
• 8-bit timer
• Readable and writable (file address 01h)
• 8-bit software programmable prescaler
• Interrupt on overflow from FFh to 00h
Figure 6-1 is a simplified block diagram of the Timer0
module.
The Timer0 module will increment every instruction
cycle (without prescaler). If TMR0 is written, increment
is inhibited for the following two cycles (Figure 6-2 and
Figure 6-3). The user can compensate by writing an
adjusted value to TMR0.
FIGURE 6-1: TIMER0 AND WATCHDOG TIMER BLOCK DIAGRAM
RC3/T0CKI
T0SE
0
1
1
0
pin
T0CS
FOSC/4
Sync with
Internal
clocks
TMR0
PSout
(2 cycle delay)
PSout
Data bus
8
PSA
Set T0IF
Interrupt on
Overflow
8-bit Counter
8-to-1 MUX
18 mS
Timer
PSA
01
WDT
Time-out
PS2:PS0
8
Note: T0CS, T0SE, PSA, PS2:PS0 correspond to (OPTION<5:0>).
PSA
0
1
3
HIBERNATE
WDT
Enable Bit
Local
Oscillator
Prescaler/
Postscaler
Enable
Watchdog Timer
Timer0
This document was created with FrameMaker404