Datasheet
2009-2011 Microchip Technology Inc. DS39957D-page 215
PIC18F87K90 FAMILY
16.2 Timer4/6/8/10/12 Interrupt
The Timer4/6/8/10/12 modules have 8-bit Period
registers, PRx, that are both readable and writable.
Timer4/6/8/10/12 increment from 00h until they match
PR4/6/8/10/12 and then reset to 00h on the next
increment cycle. The PRx registers are initialized to
FFh upon Reset.
16.3 Output of TMRx
The outputs of TMRx (before the postscaler) are used
only as a PWM time base for the ECCP modules. They
are not used as baud rate clocks for the MSSP
modules as is the Timer2 output.
FIGURE 16-1: TIMER4/6/8/10/12 BLOCK DIAGRAM
TABLE 16-3: REGISTERS ASSOCIATED WITH TIMER4/6/8/10/12 AS A TIMER/COUNTER
Name Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0
Reset
Values
on Page:
INTCON GIE/GIEH PEIE/GIEL
TMR0IE INT0IE RBIE TMR0IF INT0IF RBIF 75
IPR5
TMR7GIP
(1)
TMR12IP
(1)
TMR10IP
(1)
TMR8IP TMR7IP
(1)
TMR6IP TMR5IP TMR4IP 76
PIR5
TMR7GIF
(1)
TMR12IF
(1)
TMR10IF
(1)
TMR8IF TMR7IF
(1)
TMR6IF TMR5IF TMR4IF 77
PIE5
TMR7GIE
(1)
TMR12IE
(1)
TMR10IE
(1)
TMR8IE TMR7IE
(1)
TMR6IE TMR5IE TMR4IE 77
TMR4 Timer4 Register 82
T4CON
— T4OUTPS3 T4OUTPS2 T4OUTPS1 T4OUTPS0 TMR4ON T4CKPS1 T4CKPS0 82
PR4 Timer4 Period Register 82
TMR6 Timer6 Register 81
T6CON
— T6OUTPS3 T6OUTPS2 T6OUTPS1 T6OUTPS0 TMR6ON T6CKPS1 T6CKPS0 81
PR6 Timer6 Period Register 81
TMR8 Timer8 Register 81
T8CON
— T8OUTPS3 T8OUTPS2 T8OUTPS1 T8OUTPS0 TMR8ON T8CKPS1 T8CKPS0 81
PR8 Timer8 Period Register 81
TMR10 Timer10 Register 81
T10CON
— T10OUTPS3 T10OUTPS2 T10OUTPS1 T10OUTPS0 TMR10ON T10CKPS1 T10CKPS0 81
PR10 Timer10 Period Register 81
TMR12 Timer12 Register 81
T12CON — T12OUTPS3 T12OUTPS2 T12OUTPS1 T12OUTPS0 TMR12ON T12CKPS1 T12CKPS0 81
PR12 Timer12 Period Register 81
CCPTMRS0 C3TSEL1 C3TSEL0 C2TSEL2 C2TSEL1 C2TSEL0 C1TSEL2 C1TSEL1 C1TSEL0 81
CCPTMRS1 C7TSEL1 C7TSEL0
— C6TSEL0 — C5TSEL0 C4TSEL1 C4TSEL0 81
CCPTMRS2
— — — C10TSEL0
(1)
— C9TSEL0
(1)
C8TSEL1 C8TSEL0 81
Legend: — = unimplemented, read as ‘0’. Shaded cells are not used by the Timer4/6/8/10/12 module.
Note 1: Unimplemented in devices with a program memory of 32 Kbytes (PIC18FX5K22).
Comparator
TMRx Output
TMRx
Postscaler
Prescaler
PRx
2
F
OSC/4
1:1 to 1:16
1:1, 1:4, 1:16
4
TxOUTPS<3:0>
TxCKPS<1:0>
Set TMRxIF
Internal Data Bus
8
Reset
TMRx/PRx
8
8
(to PWM)
Match