16F876 Microchip Technology, 16F876 Datasheet - Page 52

no-image

16F876

Manufacturer Part Number
16F876
Description
28/40-pin 8-Bit CMOS FLASH Microcontrollers
Manufacturer
Microchip Technology
Datasheet
PIC16F87X
6.1
Timer mode is selected by clearing the TMR1CS
(T1CON<1>) bit. In this mode, the input clock to the
timer is F
(T1CON<2>) has no effect since the internal clock is
always in sync.
FIGURE 6-1:
6.3
Counter mode is selected by setting bit TMR1CS. In
this mode, the timer increments on every rising edge of
clock input on pin RC1/T1OSI/CCP2, when bit
T1OSCEN is set, or on pin RC0/T1OSO/T1CKI, when
bit T1OSCEN is cleared.
FIGURE 6-2:
DS30292B-page 52
Note 1: When the T1OSCEN bit is cleared, the inverter is turned off. This eliminates power drain.
RC0/T1OSO/T1CKI
RC1/T1OSI/CCP2
T1CKI
(Default high)
T1CKI
(Default low)
Note: Arrows indicate counter increments.
2: For the PIC16F873/876, the Schmitt Trigger is not implemented in external clock mode.
Timer1 Operation in Timer Mode
Timer1 Operation in Synchronized
Counter Mode
OSC
Set flag bit
TMR1IF on
Overflow
/4. The synchronize control bit T1SYNC
TIMER1 INCREMENTING EDGE
TIMER1 BLOCK DIAGRAM
(2)
TMR1H
T1OSC
TMR1
TMR1L
Oscillator
Enable
T1OSCEN
(1)
(2)
Clock
F
Internal
OSC
TMR1ON
/4
on/off
TMR1CS
1
0
6.2
Timer1 may operate in asynchronous or usynchronous
mode depnding on the setting of the TMR1CS bit.
When Timer1 is being incremented via an external
source, increments occur on a rising edge. After
Timer1 is enabled in counter mode, the module must
first have a falling edge before the counter begins to
increment.
If T1SYNC is cleared, then the external clock input is
synchronized with internal phase clocks. The synchro-
nization is done after the prescaler stage. The pres-
caler stage is an asynchronous ripple-counter.
In this configuration, during SLEEP mode, Timer1 will
not increment even if the external clock is present,
since the synchronization circuit is shut off. The pres-
caler however will continue to increment.
T1CKPS1:T1CKPS0
T1SYNC
Prescaler
1, 2, 4, 8
Timer1 Counter Operation
0
1
2
Synchronized
clock input
1999 Microchip Technology Inc.
Synchronize
Q Clock
det

Related parts for 16F876