English
Language : 

PIC18F23K22 Datasheet, PDF (161/492 Pages) Microchip Technology – 28/40/44-Pin, Low-Power, High-Performance Microcontrollers with nanoWatt XLP Technology
PIC18(L)F2X/4XK22
12.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 Secondary 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)
• 16-Bit Read/Write Operation
• Time base for the Capture/Compare function
FIGURE 12-1:
TIMER1/3/5 BLOCK DIAGRAM
• Special Event Trigger (with CCP/ECCP)
• Selectable Gate Source Polarity
• Gate Toggle Mode
• Gate Single-pulse Mode
• Gate Value Status
• Gate Event Interrupt
Figure 12-1 is a block diagram of the Timer1/3/5
module.
TxGSS<1:0>
TxG
00
TxGSPM
Timer2/4/6 Match
PR2/4/6
01
Comparator 1
SYNCC1OUT(7)
10
Comparator 2
SYNCC2OUT(7)
11
TxGPOL
TxG_IN
TMRxON
TxGTM
DQ
CK Q
R
Set flag bit
TMRxIF on
Overflow
TMRx(2),(4)
TMRxH
TMRxL
0
Single Pulse
1
Acq. Control
TxGGO/DONE
0
TxGVAL
DQ
1
Q1 EN
Interrupt
det
Data Bus
RD
TXGCON
Set
TMRxGIF
EN
TxCLK
QD
TMRxON
0
TMRxGE
To Comparator Module
Synchronized
clock input
Secondary
Oscillator
Module
See Figure 2-4
SOSCOUT
TMRxCS<1:0>
Reserved 11
(5),(6)
1
TxCLK_EXT_SRC
(1)
10
TxCKI
0
FOSC
Internal 01
TxSOSCEN
Clock
FOSC/4
Internal 00
Clock
1
TxSYNC
Prescaler
1, 2, 4, 8
2
TxCKPS<1:0>
Synchronize(3),(7)
det
FOSC/2
Internal
Clock
Sleep input
Note 1: ST Buffer is high speed type when using TxCKI.
2: Timer1/3/5 register increments on rising edge.
3: Synchronize does not operate while in Sleep.
4: See Figure 12-2 for 16-Bit Read/Write Mode Block Diagram.
5: T1CKI is not available when the secondary oscillator is enabled. (SOSCGO = 1 or TXSOSCEN = 1)
6: T3CKI is not available when the secondary oscillator is enabled, unless T3CMX = 1.
7: Synchronized comparator output should not be used in conjunction with synchronized TxCKI.
 2010 Microchip Technology Inc.
Preliminary
DS41412B-page 161