Datasheet

Table Of Contents
2011-2013 Microchip Technology Inc. DS41458C-page 165
PIC16(L)F1526/7
18.0 TIMER1/3/5 MODULE WITH
GATE CONTROL
The Timer1/3/5 module is a 16-bit timer/counter with
the following features:
16-bit timer/counter register pair (TMRxH:TMRxL)
Programmable internal or external clock source
2-bit prescaler
Dedicated 32 kHz oscillator circuit
Optionally synchronized comparator out
Multiple Timer1/3/5 gate (count enable) sources
Interrupt on overflow
Wake-up on overflow (external clock,
Asynchronous mode only)
Time base for the Capture/Compare function
Auto-conversion Trigger (with CCP)
Selectable Gate Source Polarity
Gate Toggle mode
Gate Single-pulse mode
Gate Value Status
Gate Event Interrupt
Figure 18-1 is a block diagram of the Timer1/3/5 module.
.
FIGURE 18-1: TIMER1/3/5 BLOCK DIAGRAM
Note: The ‘x’ variable used in this section is
used to designate Timer1, Timer3 or
Timer5. For example, TxCON references
T1CON, T3CON or T5CON. PRx refer-
ences PR1, PR3 or PR5.
TMRxH TMRxL
TxSYNC
TxCKPS<1:0>
Prescaler
1, 2, 4, 8
0
1
Synchronized
clock input
2
Set flag bit
TMRxIF on
Overflow
TMRx
(2)
TMRxON
Note 1: ST Buffer is high-speed type when using TxCKI.
2: Timer1 register increments on rising edge.
3: Synchronize does not operate while in Sleep.
4: See Table 18-4 for Timer selection.
TxG
FOSC/4
Internal
Clock
TMRxCS<1:0>
Synchronize
(3)
det
Sleep input
TMRxGE
0
1
00
01
10
11
TxGPOL
D
Q
CK
Q
0
1
TxGVAL
TxGTM
Single Pulse
Acq. Control
TxGSPM
TxGGO/DONE
TxGSS<1:0>
10
11
00
01
FOSC
Internal
Clock
LFINTOSC
R
D
EN
Q
Q1
RD
T1GCON
Data Bus
det
Interrupt
TMRxGIF
Set
TxCLK
FOSC/2
Internal
Clock
D
EN
Q
TxG_IN
TMRxON
From Timer0
Timer2/4/6
Overflow
Timer10
Overflow
Overflow
(4)
To Comparator Module
SOSC/TxCKI
Secondary Oscillator
(See Figure 18-2)