PIC18F4520-I/P Microchip Technology Inc., PIC18F4520-I/P Datasheet - Page 135

no-image

PIC18F4520-I/P

Manufacturer Part Number
PIC18F4520-I/P
Description
40 Pin, 32 KB Flash, 1536 RAM, 36 I/O
Manufacturer
Microchip Technology Inc.
Datasheet

Specifications of PIC18F4520-I/P

A/d Inputs
13-Channel, 10-Bit
Comparators
2
Cpu Speed
10 MIPS
Eeprom Memory
256 Bytes
Input Output
36
Interface
I2C/SPI/USART
Memory Type
Flash
Number Of Bits
8
Package Type
40-pin PDIP
Programmable Memory
32K Bytes
Ram Size
1.5K Bytes
Speed
40 MHz
Timers
1-8-bit, 3-16-bit
Voltage, Range
2-5.5 V
Lead Free Status / Rohs Status
RoHS Compliant part Electrostatic Device

Available stocks

Company
Part Number
Manufacturer
Quantity
Price
Part Number:
PIC18F4520-I/P
Manufacturer:
ST
Quantity:
104
Part Number:
PIC18F4520-I/P
Manufacturer:
MICROCH
Quantity:
20 000
Part Number:
PIC18F4520-I/PT
Manufacturer:
TI
Quantity:
14 300
Part Number:
PIC18F4520-I/PT
Manufacturer:
Microchip Technology
Quantity:
33 055
Part Number:
PIC18F4520-I/PT
Manufacturer:
Microchip Technology
Quantity:
10 000
Part Number:
PIC18F4520-I/PT
Manufacturer:
MICROCHIP
Quantity:
510
Part Number:
PIC18F4520-I/PT
Manufacturer:
MICROCHIP/微芯
Quantity:
20 000
Part Number:
PIC18F4520-I/PT
0
13.0
The Timer2 module timer incorporates the following
features:
• 8-bit timer and period registers (TMR2 and PR2,
• Readable and writable (both registers)
• Software programmable prescaler (1:1, 1:4 and
• Software programmable postscaler (1:1 through
• Interrupt on TMR2-to-PR2 match
• Optional use as the shift clock for the MSSP
The module is controlled through the T2CON register
(Register 13-1), which enables or disables the timer
and configures the prescaler and postscaler. Timer2
can be shut off by clearing control bit, TMR2ON
(T2CON<2>), to minimize power consumption.
A simplified block diagram of the module is shown in
Figure 13-1.
REGISTER 13-1:
 2004 Microchip Technology Inc.
respectively)
1:16)
1:16)
module
TIMER2 MODULE
bit 7
bit 6-3
bit 2
bit 1-0
bit 7
Unimplemented: Read as ‘0’
T2OUTPS3:T2OUTPS0: Timer2 Output Postscale Select bits
0000 = 1:1 Postscale
0001 = 1:2 Postscale
1111 = 1:16 Postscale
TMR2ON: Timer2 On bit
1 = Timer2 is on
0 = Timer2 is off
T2CKPS1:T2CKPS0: Timer2 Clock Prescale Select bits
00 = Prescaler is 1
01 = Prescaler is 4
1x = Prescaler is 16
T2CON: TIMER2 CONTROL REGISTER
Legend:
R = Readable bit
-n = Value at POR
U-0
T2OUTPS3 T2OUTPS2 T2OUTPS1 T2OUTPS0 TMR2ON T2CKPS1 T2CKPS0
R/W-0
PIC18F2420/2520/4420/4520
R/W-0
Preliminary
‘1’ = Bit is set
W = Writable bit
R/W-0
13.1
In normal operation, TMR2 is incremented from 00h on
each clock (F
clock input gives direct input, divide-by-4 and divide-by-
16 prescale options; these are selected by the prescaler
control bits, T2CKPS1:T2CKPS0 (T2CON<1:0>). The
value of TMR2 is compared to that of the period register,
PR2, on each clock cycle. When the two values match,
the comparator generates a match signal as the timer
output. This signal also resets the value of TMR2 to 00h
on the next cycle and drives the output counter/
postscaler (see Section 13.2 “Timer2 Interrupt”).
The TMR2 and PR2 registers are both directly readable
and writable. The TMR2 register is cleared on any
device Reset, while the PR2 register initializes at FFh.
Both the prescaler and postscaler counters are cleared
on the following events:
• a write to the TMR2 register
• a write to the T2CON register
• any device Reset (Power-on Reset, MCLR Reset,
TMR2 is not cleared when T2CON is written.
Watchdog Timer Reset or Brown-out Reset)
Timer2 Operation
R/W-0
U = Unimplemented bit, read as ‘0’
‘0’ = Bit is cleared
OSC
/4). A 4-bit counter/prescaler on the
R/W-0
x = Bit is unknown
R/W-0
DS39631A-page 133
R/W-0
bit 0

Related parts for PIC18F4520-I/P