English
Language : 

PIC18F44J50-I Datasheet, PDF (218/562 Pages) Microchip Technology – 28/44-Pin, Low-Power, High-Performance USB Microcontrollers
PIC18F46J50 FAMILY
15.5.2
TIMER3 GATE SOURCE
SELECTION
The Timer3 gate source can be selected from one of
four different sources. Source selection is controlled by
the T3GSSx bits of the T3GCON register. The polarity
for each available source is also selectable. Polarity
selection is controlled by the T3GPOL bit of the
T3GCON register.
TABLE 15-2: TIMER3 GATE SOURCES
T3GSS<1:0>
Timer3 Gate Source
00
Timer3 Gate Pin
01
Overflow of Timer0
(TMR0 increments from FFh to 00h)
10
TMR2 to Match PR2
(TMR2 increments to match PR2)
11
Reserved
15.5.2.1 T3G Pin Gate Operation
The T3G pin is one source for Timer3 gate control. It
can be used to supply an external source to the Timer3
gate circuitry.
15.5.2.2 Timer0 Overflow Gate Operation
When Timer0 increments from FFh to 00h, a
low-to-high pulse will automatically be generated and
internally supplied to the Timer3 gate circuitry.
15.5.2.3 Timer2 Match Gate Operation
The TMR2 register will increment until it matches the
value in the PR2 register. On the very next increment
cycle, TMR2 will be reset to 00h. When this Reset
occurs, a low-to-high pulse will automatically be
generated and internally supplied to the Timer3 gate
circuitry.
15.5.3 TIMER3 GATE TOGGLE MODE
When Timer3 Gate Toggle mode is enabled, it is
possible to measure the full cycle length of a Timer3
gate signal, as opposed to the duration of a single level
pulse.
The Timer1 gate source is routed through a flip-flop that
changes state on every incrementing edge of the
signal. See Figure 15-3 for timing details.
The T3GVAL bit will indicate when the Toggled mode is
active and the timer is counting.
Timer3 Gate Toggle mode is enabled by setting the
T3GTM bit of the T3GCON register. When the T3GTM
bit is cleared, the flip-flop is cleared and held clear. This
is necessary in order to control which edge is
measured.
FIGURE 15-3:
TIMER3 GATE TOGGLE MODE
TMR3GE
T3GPOL
T3GTM
T3G_IN
T1CKI
T3GVAL
Timer3
N
N+1 N+2 N+3
N+4
N+5 N+6 N+7 N+8
DS39931D-page 218
 2011 Microchip Technology Inc.