27.4.6 Sync and Triggered Operation
Synchronized (Sync) and Triggered mode operations can be thought of as Complementary modes that affect the operation of the CCPxTMR registers in most of the module’s major operating modes. Both use the SYNC[4:0] bits (CCPxCON1[20:16]) to determine the input signal source. The difference is how that signal affects the timer.
In Sync mode operation, the timer counts freely when enabled by the CCPON bit and is reset to zero when the input, selected by SYNC[4:0], is asserted. The timer immediately begins to count again from zero unless it is held for some other reason. Sync operation is used whenever the TRIGEN bit (CCPxCON1[23]) is cleared.
In Triggered mode operation, the timer is held in Reset until the input selected by SYNC[4:0] is asserted; when this occurs, the timer starts counting and continues to count until the TRCLR bit (CCPxSTAT[5]) is set. Triggered operation is used whenever the TRIGEN bit is set.
Depending on the specific device, the SYNC[4:0] bits allow for the selection of up to 32
internal or external sources. Some implemented sources may be available for triggered
operation but not for Sync operation. In addition, ‘11111
’
(free-running counter) is not valid for Sync operation.
Sync and trigger operations play a major role in the module’s operation in Timer and Output Compare modes by allowing chained and synchronized operation of multiple modules.
SYNC[4:0] | Synchronization Source |
---|---|
11111 | None; Timer with Auto-Rollover (FFFFh → 0000h) |
11010-11110 | Reserved |
11001 | Comparator 3 Output |
11000 | Comparator 2 Output |
10111 | Comparator 1 Output |
10110 | Reserved |
10101 | UART3 TX Edge Detect |
10100 | UART3 RX Edge Detect |
10011 | CLC4 Output |
10010 | CLC3 Output |
10001 | CLC2 Output |
10000 | CLC1 Output |
01111 | UART2 TX Edge Detect |
01110 | UART2 RX Edge Detect |
01101 | UART1 TX Edge Detect |
01100 | UART1 RX Edge Detect |
01011 | INT2 |
01010 | INT1 |
01001 | INT0 |
00101-01000 | Reserved |
00100 | Sync Output SCCP4 |
00011 | Sync Output SCCP3 |
00010 | Sync Output SCCP2 |
00001 | Sync Output SCCP1 |
00000 | None; Timer with Rollover on CCPxPR Match or FFFFh |