MICROCHIP PIC18F252

PIC18 Microcontroller Family
The PIC18 microcontroller family provides PICmicro®
devices in 18- to 80-pin packages, that are both socket
and software upwardly compatible to the PIC16 family. The
PIC18 family includes all the popular peripherals, such as
MSSP, ESCI, CCP, flexible 8- and 16-bit timers, PSP, 10-bit
ADC, WDT, POR and CAN 2.0B Active for the maximum
flexible solution. Most PIC18 devices will provide FLASH
program memory in sizes from 8 to 128 Kbytes and data
RAM from 256 to 4 Kbytes; operating from 2.0 to 5.5 volts,
at speeds from DC to 40 MHz. Optimized for high-level
languages like ANSI C, the PIC18 family offers a highly
flexible solution for complex embedded applications.
High Performance RISC CPU:
•
•
•
•
•
•
77 instructions
C-Language friendly architecture
PIC16 source code compatible
Linear program memory addressing to 2 Mbyte
Linear data memory addressing up to 4 Kbytes
Up to 10 MIPs operation:
– DC - 40 MHz osc/clock input
– 4 MHz - 10 MHz clock with PLL active
• 16-bit wide instructions, 8-bit wide data path
• Priority levels for interrupts
• 8 x 8 Single Cycle Hardware Multiplier
Analog Features (Continued):
• Programmable Low Voltage Detection (LVD) module
– Supports interrupt-on-low voltage detection
• Programmable Brown-out Reset (BOR)
• Comparators
Special Microcontroller Features:
Peripheral Features:
•
•
•
•
•
•
•
•
•
• Power-on Reset (POR), Power-up Timer (PWRT) and
Oscillator Start-up Timer (OST)
• Watchdog Timer (WDT) with its own on-chip RC oscillator
for reliable operation
• Programmable code protection
• In-Circuit Serial ProgrammingTM (ICSPTM) via two pins
High current sink/source 25 mA/25 mA
Up to four external interrupt pins
Up to three 16-bit timer/counters
Up to two 8-bit timer/counters with 8-bit period
register (time-base for PWM)
Secondary LP oscillator clock option - Timer1
Up to five Capture/Compare/PWM (CCP) modules
CCP pins can be configured as:
– Capture input: 16-bit, resolution 6.25 ns (TCY/16)
– Compare: 16-bit, max. resolution 100 ns (TCY)
– PWM output: PWM resolution is 1- to 10-bit
Max. PWM frequency @: 8-bit resolution = 156 kHz
10-bit resolution = 39 kHz
Master Synchronous Serial Port (MSSP) module
Two modes of operation:
– 3-wire SPITM (supports all 4 SPI modes)
– I2CTM Master and Slave mode
Up to 2 Addressable USART modules (ESCI)
– Supports interrupt on Address bit
Parallel Slave Port (PSP) module
CMOS Technology:
• Fully static design
• Wide operating voltage range (2.0V to 5.5V)
• Industrial and Extended temperature ranges
Power Managed Features:
• Dynamically switch to secondary LP oscillator
• Internal RC oscillator for ADC operation during SLEEP
• SLEEP mode (IPD < 1 µA typ.)
– up to 23 individually selectable wake-up events
– 3 edge selectable wake-up inputs
– 4 state change wake-up inputs
• Internal RC oscillator for WDT (period wake-up)
• RAM retention mode (VDD as low as 1.5V)
• Up to 6 more Power Managed modes available on
selected models (PIC18F1320/2320/4320 and
PIC18F1220/2220/4220)
Analog Features:
• 10-bit Analog-to-Digital Converter module (A/D) with:
– Fast sampling rate
– Up to 16 channels input multiplexor
– Conversion available during SLEEP
– DNL = ±1 LSb, INL = ±1 LSb
�
Microchip Technology Inc.• The Embedded Control Solutions Company®
Additional Information:
• Microchip’s web site: www.microchip.com
• Microchip’s PICmicro 18C MCU Reference Manual,
Order No. DS39500
• Microchip’s CD-ROMs available:
– Technical Library, Order No. DS00161
• Microchip’s Data Sheets available:
– PIC18CXX2, Order No. DS39026
– PIC18CXX8, Order No. DS30475
– PIC18C601/801, Order No. DS39541
• Application Notes are available in:
– Embedded Control Handbook, Order No. DS00092
– Embedded Control Handbook, Volume 2, Math Library,
Order No. DS00167
– Embedded Control Handbook Update 2000,
Order No. DS00711
• Microchip’s Quality Systems and Customer Interface
System, Order No. DS00169
• Demo Boards Available:
– PICDEMTM 2 Demonstration Board
– ROMless
– CAN/LIN bus
• Third Party Tools Available:
– C Compilers
HI-TECH - PICCTM, www.htsoft.com
IAR - EWB-PIC, www.iar.com
CCS PIC18 C Compiler, www.ccsinfo.com
PIC18 Microcontroller Family
Product
PIC18F1220
PIC18F1320
PIC18F2220
PIC18F2320
PIC18C242
PIC18C252
PIC18F242
PIC18F252
PIC18F258
PIC18F4220
PIC18F4320
PIC18C442
PIC18C452
PIC18F442
PIC18F452
PIC18F458
PIC18C601
PIC18C658
PIC18F6520
PIC18F6620
PIC18F6720
PIC18C801
PIC18C858
PIC18F8520
PIC18F8620
PIC18F8720
Program Memory
Type
Bytes
FLASH
4K
FLASH
8K
FLASH
4K
FLASH
8K
OTP
16K
OTP
32K
FLASH
16K
FLASH
32K
FLASH
32K
FLASH
4K
FLASH
8K
OTP
16K
OTP
32K
FLASH
16K
FLASH
32K
FLASH
32K
—
ROMless
OTP
32K
FLASH
32K
FLASH
64K
FLASH
128K
—
ROMless
OTP
32K
FLASH
32K
FLASH
64K
FLASH
128K
Abbreviation: ADC = Analog-to-Digital Converter
PWM = Pulse Width Modulation
Data Memory
RAM
EEPROM
Bytes
Bytes
256
256
256
256
512
256
512
256
512
—
1536
—
512
256
1536
256
1536
256
512
256
512
256
512
—
1536
—
512
256
1536
256
1536
256
1536
—
1536
—
2048
1024
3840
1024
3840
1024
1536
—
1536
—
2048
1024
3840
1024
3840
1024
I/O
Ports
16
16
23
23
23
23
23
23
22
34
34
34
34
34
34
33
31
52
52
52
52
42
68
68
68
68
CCP = Capture/Compare/PWM
SPI = Serial Peripheral Interface
ADC
10-bit
7
7
10
10
5
5
5
5
5
13
13
8
8
8
8
5
8
12
12
12
12
12
16
16
16
16
MSSP
—
—
I2C/SPI
I2C/SPI
I2C/SPI
I2C/SPI
I2C/SPI
I2C/SPI
I2C/SPI
I2C/SPI
I2C/SPI
I2C/SPI
I2C/SPI
I2C/SPI
I2C/SPI
I2C/SPI
I2C/SPI
I2C/SPI
I2C/SPI
I2C/SPI
I2C/SPI
I2C/SPI
I2C/SPI
I2C/SPI
I2C/SPI
I2C/SPI
USART
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
2
2
2
1
1
2
2
2
Other
6x PMM
6x PMM
6x PMM
6x PMM
—
—
—
—
CAN 2.0B
6x PMM
6x PMM
—
—
—
—
CAN 2.0B
—
CAN 2.0B
—
—
—
—
CAN 2.0B
EMA
EMA
EMA
CCP/ Timers
PWM 8/16-bit
1
1/3
1
1/3
2
1/3
2
1/3
2
1/3
2
1/3
2
1/3
2
1/3
1
1/3
2
1/3
2
1/3
2
1/3
2
1/3
2
1/3
2
1/3
1
1/3
2
1/3
2
1/3
5
2/3
5
2/3
5
2/3
2
1/3
2
1/3
5
2/3
5
2/3
5
2/3
Packages
DIP, SOIC, SSOP, QFN
DIP, SOIC, SSOP, QFN
DIP, SOIC
DIP, SOIC
DIP, SOIC
DIP, SOIC
DIP, SOIC, SSOP
DIP, SOIC, SSOP
DIP, SOIC
DIP, TQFP, QFN
DIP, TQFP, QFN
DIP, PLCC, TQFP
DIP, PLCC, TQFP
DIP, PLCC, TQFP
DIP, PLCC, TQFP
DIP, PLCC, TQFP
PLCC, TQFP
PLCC, TQFP
TQFP
TQFP
TQFP
PLCC, TQFP
PLCC, TQFP
TQFP
TQFP
TQFP
Pins
18
18
28
28
28
28
28
28
28
40/44
40/44
40/44
40/44
40/44
40/44
40/44
64/68
64/68
64
64
64
80/84
80/84
80
80
80
I2C = Inter-Integrated Circuit Bus
PMM = Power Managed Mode
USART = Universal Synchronous/Asynchronous Receiver/Transmitter
Development Tools from Microchip
Resale Price*
MPLAB® IDE
Integrated Development Environment (IDE)
FREE
MPASMTM Assembler
Universal PICmicro Macro-Assembler
FREE
MPLINKTM Linker/MPLIBTM Librarian
Linker/Librarian
FREE
MPLAB® SIM
Software Simulator
FREE
MPLAB® ICE 2000/4000
Full Featured Modular In-Circuit Emulator
Starting at $2,045
MPLAB® ICD 2
In-Circuit Debugger
Starting at $159
C compiler
Microchip MPLAB®C18 or supported by
third-party vendors (HI-TECH, IAR, CCS)
Contact Vendor
PRO MATE® II Device Programmer
Full Featured Modular Device Programmer
Starting at $854
PICSTART® Plus Programmer
Entry Level Development Kit with Programmer
$199
*All prices are manufacturer’s suggested resale for North America.
Microchip Technology Inc. • 2355 W. Chandler Blvd. • Chandler, AZ 85224-6199 • (480) 792-7200 • Fax (480) 792-9210
Information subject to change. The Microchip name and logo, the Microchip logo, KEELOQ, MPLAB, PIC, PICmicro, PICSTART and PRO MATE are registered trademarks of Microchip Technology
Inc. in the U.S.A. and other countries. FilterLab, microID, MXDEV, MXLAB, PICMASTER, SEEVAL and The Embedded Control Solutions Company are registered trademarks of Microchip
Technology Inc. in the U.S.A. dsPIC, dsPICDEM.net, ECONOMONITOR, FanSense, FlexROM, fuzzyLAB, In-Circuit Serial Programming, ICSP, ICEPIC, microPort, Migratable Memory, MPASM,
MPLIB, MPLINK, MPSIM, PICC, PICDEM, PICDEM.net, rfPIC, Select Mode and Total Endurance are trademarks of Microchip Technology Inc. in the U.S.A. and other countries. Serialized Quick
Turn Programming (SQTP) is a service mark of Microchip Technology Inc. in the U.S.A. All other trademarks mentioned herein are property of their respective companies.
© 2002 Microchip Technology Inc. All rights reserved. Printed in the U.S.A. DS30327B 9/02
*DS30327B*