PIC16F688
6.1
Timer1 Operation
6.0
TIMER1 MODULE WITH GATE
CONTROL
The Timer1 module is a 16-bit incrementing counter
which is accessed through the TMR1H:TMR1L register
pair. Writes to TMR1H or TMR1L directly update the
counter.
The Timer1 module is a 16-bit timer/counter with the
following features:
• 16-bit timer/counter register pair (TMR1H:TMR1L)
• Programmable internal or external clock source
• 3-bit prescaler
When used with an internal clock source, the module is
a timer. When used with an external clock source, the
module can be used as either a timer or counter.
• Optional LP oscillator
• Synchronous or asynchronous operation
6.2
Clock Source Selection
• Timer1 gate (count enable) via comparator or
T1G pin
The TMR1CS bit of the T1CON register is used to select
the clock source. When TMR1CS = 0, the clock source
is FOSC/4. When TMR1CS = 1, the clock source is
supplied externally.
• Interrupt on overflow
• Wake-up on overflow (external clock,
Asynchronous mode only)
Clock Source
TMR1CS
Clock Source
Figure 6-1 is a block diagram of the Timer1 module.
FOSC/4
0
1
FOSC/4
T1CKI pin
T1CKI pin
FIGURE 6-1:
TIMER1 BLOCK DIAGRAM
TMR1GE
T1GINV
TMR1ON
Set flag bit
TMR1IF on
Overflow
To C2 Comparator Module
Timer1 Clock
(2)
TMR1
TMR1H
Synchronized
clock input
0
EN
TMR1L
1
Oscillator
(1)
T1SYNC
OSC1/T1CKI
1
(3)
Synchronize
det
Prescaler
1, 2, 4, 8
FOSC/4
Internal
Clock
0
OSC2/T1G
2
T1CKPS<1:0>
TMR1CS
1
0
INTOSC
Without CLKOUT
C2OUT
T1OSCEN
T1GSS
Note 1: ST Buffer is low power type when using LP oscillator, or high speed type when using T1CKI.
2: Timer1 register increments on rising edge.
3: Synchronize does not operate while in Sleep.
DS41203D-page 48
© 2007 Microchip Technology Inc.