Datasheet

PIC18F47J13 FAMILY
DS39974A-page 228 Preliminary 2010 Microchip Technology Inc.
15.5.4 TIMER3/5 GATE SINGLE PULSE
MODE
When Timer3/5 Gate Single Pulse mode is enabled, it
is possible to capture a single pulse gate event.
Timer3/5 Gate Single Pulse mode is first enabled by
setting the TxGSPM bit (TxGCON<4>). Next, the
TxGGO/TxDONE
bit (TxGCON<3>) must be set.
The Timer3/5 will be fully enabled on the next incre-
menting edge. On the next trailing edge of the pulse,
the TxGGO/TxDONE
bit will automatically be cleared.
No other gate events will be allowed to increment
Timer3/5 until the TxGGO/TxDONE bit is once again
set in software.
Clearing the TxGSPM bit will also clear the
TxGGO/TxDONE
bit. (For timing details, see
Figure 15-4.)
Simultaneously, enabling the Toggle mode and the
Single Pulse mode will permit both sections to work
together. This allows the cycle times on the Timer3/5
gate source to be measured. (For timing details, see
Figure 15-5.)
FIGURE 15-4: TIMER3/5 GATE SINGLE PULSE MODE
TMRxGE
TxGPOL
TxG_IN
TxCKI
TxGVAL
Timer3/5
N N + 1 N + 2
TxGSPM
TxGGO/
TxDONE
Set by Software
Cleared by Hardware on
Falling Edge of TxGVAL
Set by Hardware on
Falling Edge of TxGVAL
Cleared by Software
Cleared by
Software
TMRxGIF
Counting Enabled on
Rising Edge of TxG