PIC18C242 MICROCHIP [Microchip Technology], PIC18C242 Datasheet - Page 103

no-image

PIC18C242

Manufacturer Part Number
PIC18C242
Description
High-Performance Microcontrollers with 10-Bit A/D
Manufacturer
MICROCHIP [Microchip Technology]
Datasheet

Available stocks

Company
Part Number
Manufacturer
Quantity
Price
Part Number:
PIC18C242-I/SO
Manufacturer:
MICROCHIP
Quantity:
2 000
Part Number:
PIC18C242/JW
Manufacturer:
NS
Quantity:
10
11.2
The Timer2 module has an 8-bit period register PR2.
Timer2 increments from 00h until it matches PR2 and
then resets to 00h on the next increment cycle. PR2 is
a readable and writable register. The PR2 register is ini-
tialized to FFh upon reset.
FIGURE 11-1: TIMER2 BLOCK DIAGRAM
TABLE 11-1:
INTCON
PIR1
PIE1
IPR1
TMR2
T2CON
PR2
Name
7/99 Microchip Technology Inc.
Legend: x = unknown, u = unchanged, - = unimplemented read as ’0’. Shaded cells are not used by the Timer2 module.
Note 1:
F
Timer2 Interrupt
OSC
Timer2 module’s register
Timer2 Period Register
GIE/GIEH
PSPIF
PSPIE
PSPIP
/4
Bit 7
The PSPIF, PSPIE and PSPIP bits are reserved on the PIC18C2X2 devices. Always maintain these bits clear.
Note 1: TMR2 register output can be software selected by the SSP Module as a baud clock.
(1)
(1)
(1)
REGISTERS ASSOCIATED WITH TIMER2 AS A TIMER/COUNTER
PEIE/GIEL
TOUTPS3
Bit 6
ADIF
ADIE
ADIP
T2CKPS1:T2CKPS0
1:1, 1:4, 1:16
Prescaler
TOUTPS2
2
TMR0IE
Bit 5
RCIF
RCIE
RCIP
TOUTPS1
INT0IE
Bit 4
TXIF
TXIE
TXIP
Comparator
TMR2
PR2
Preliminary
TOUTPS0
SSPIE
SSPIP
SSPIF
Bit 3
RBIE
Reset
EQ
11.3
The output of TMR2 (before the postscaler) is fed to the
Synchronous Serial Port module, which optionally uses
it to generate the shift clock.
TOUTPS3:TOUTPS0
1:1
TMR2ON
TMR0IF
CCP1IF
CCP1IE
CCP1IP
Postscaler
Bit 2
to
Output of TMR2
TMR2
output
1:16
4
T2CKPS1
TMR2IE
TMR2IP
TMR2IF
INT0IF
(1)
Bit 1
T2CKPS0
PIC18CXX2
TMR1IF
TMR1IE
TMR1IP
Bit 0
RBIF
Sets flag
bit TMR2IF
DS39026B-page 103
POR, BOR
0000 000x
0000 0000
0000 0000
0000 0000
0000 0000
-000 0000
1111 1111
Value on
0000 000u
0000 0000
0000 0000
0000 0000
0000 0000
-000 0000
1111 1111
Value on
all other
resets

Related parts for PIC18C242