2002 Microchip Technology Inc. Advance Information DS39558C-page 1
MPIC18F6520/8520
High Performance RISC CPU:
Linear program memory addr essing to 32 Kbytes
Linear data memory addressing to 2048 bytes
1 Kbyte of data EEPROM
Up to 10 MIPs operation:
- DC - 40 MHz osc./clock input
- 4 MHz - 10 MHz osc./clock input with PLL active
16-bit wide instructions, 8-bit wide data path
Priority levels for interrupts
31-level, software accessible hardware stack
8 x 8 Single Cycl e Hardware Multiplier
Pinout compatible to the
PIC18F6620/6720/8620/8720
External Memory Interface
(PIC18F8520 Devices Only):
Address capabil i ty of up to 2 Mbytes
16-bit interface
Peripheral Features:
High current sink/source 25 mA/25 mA
Four external interrupt pins
Timer0 module: 8-bit/16-bit timer/counter
Timer1 module: 16-bit timer/counter
Timer2 module: 8-bit timer/counter
Timer3 module: 16-bit timer/counter
Timer4 module: 8-bit timer/counter
Secondary oscillator clock option - Timer1/Timer3
Five Captu re/Compare/PWM (CCP ) modules:
- Capture is 16-bit, max. resolution 6.25 ns (TCY/16)
- Compare is 16-bit, max. resolution 100 ns (TCY)
- PWM output: PWM resolution is 1- to 10-bit
Master Synchronous Serial Port (MSSP) module
with two modes of operation:
- 3-wire SPI™ (supports all 4 SPI modes)
-I
2C™ Master and Slave mode
Two Addressable USART modules:
- Supports RS-485 and RS-232
Parallel Slave Port (PSP) module
Analog Features:
10-bit, up to 16-channel Analog-to-Digital
Converter (A/D)
- Conversion available during SLEEP
Programmable 16-level Low Voltage Detection
(LVD) module
- Supports interrupt on Low Voltage Detection
Programmable Brown-out Reset (BOR)
Dual analog comparators
- Programmable input/output configuration
Special Microcontroller Features:
100,0 00 eras e/w ri te cy cl e Enhan ced FLASH
program memory typical
1,000,000 erase/write cycle Data EEPROM
memory typica l
1 second programming time
FLASH/Data EEPROM Retention: > 40 years
Self-reprogrammable under software control
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
Power saving SLEEP mode
Selectable oscillator options including:
- 4X Phase Lock Loop (of primary oscillator)
- Secondary Oscillator (32 kHz) clock input
In-Circuit Serial Programming™ (ICSP™) via
two pins
MPLAB® In-Circuit Debug (ICD) via two pins
CMOS Technology:
Low power, high speed FLASH technology
Fully static design
Wide operating voltage range (2.0V to 5.5V)
Industrial and Extended temperature ranges
Device Program Memory Data Memory I/O 10-bit
A/D (ch) CCP
(PWM)
MSSP USART Timers
8-bit/16-bit Ext
Bus
Bytes # Single Word
Instructions SRAM
(bytes) EEPROM
(bytes) SPI Master
I2C
PIC18F6520 32K 16384 2048 1024 52 12 5 Y Y 2 2/3 N
PIC18F8520 32K 16384 2048 1024 68 16 5 Y Y 2 2/3 Y
64/80-pin High Performance, 256 Kbit Enhanced FLASH
Micr ocontrollers with A/D Product Brief
PIC18F6520/8520
DS39558C-page 2 Advance Information 2002 Microchip Technology Inc.
Pin Diagrams
PIC18F6520
1
2
3
4
5
6
7
8
9
10
11
12
13
14
38
37
36
35
34
33
50 49
17 18 19 20 21 22 23 24 25 26
RE2/CS
RE3
RE4
RE5
RE6
RE7/CCP2*
RD0/PSP0
VDD
VSS
RD1/PSP1
RD2/PSP2
RD3/PSP3
RD4/PSP4
RD5/PSP5
RD6/PSP6
RD7/PSP7
RE1/WR
RE0/RD
RG0/CCP3
RG1/TX2/CK2
RG2/RX2/DT2
RG3/CCP4
MCLR/VPP
RG4/CCP5
VSS
VDD
RF7/SS
RF6/AN11
RF4/AN9
RF3/AN8
RF2/AN7/C1OUT
RB0/INT0
RB1/INT1
RB2/INT2
RB3/INT3
RB4/KBI0
RB5/KBI1/PGM
RB6/KBI2/PGC
VSS
OSC2/CLKO/RA6
OSC1/CLKI
VDD
RB7/KBI3/PGD
RC4/SDI/SDA
RC3/SCK/SCL
RC2/CCP1
RF0/AN5
RF1/AN6/C2OUT
AVDD
AVSS
RA3/AN3/VREF+
RA2/AN2/VREF-
RA1/AN1
RA0/AN0
VSS
VDD
RA4/T0CKI
RA5/AN4/LVDIN
RC1/T1OSI/CCP2*
RC0/T1OSO/T13CLK
RC7/RX1/DT1
RC6/TX1/CK1
RC5/SDO
15
16
31
40
39
27 28 29 30 32
48
47
46
45
44
43
42
41
54 53 52 5158 57 56 5560 59
64 63 62 61
RF5/AN10/CVREF
64-pin TQFP
* CCP2 is multiplexed with RC1 when CCP2MX is set.
2002 Microchip Technology Inc. Advance Information DS39558C-page 3
PIC18F6520/8520
Pin Diagrams (Cont.’d)
PIC18F8520
3
4
5
6
7
8
9
10
11
12
13
14
15
16
48
47
46
45
44
43
42
41
40
39
64 63 62 61
21 22 23 24 25 26 27 28 29 30 31 32
RE2/AD10/CS***
RE3/AD11
RE4/AD12
RE5/AD13
RE6/AD14
RE7/AD15/CCP2**
RD0/AD0/PSP0***
VDD
VSS
RD1/AD1/PSP1***
RD2/AD2/PSP2***
RD3/AD3/PSP3***
RD4/AD4/PSP4***
RD5/AD5/PSP5***
RD6/AD6/PSP6***
RD7/AD7/PSP7***
***RE1/AD9/WR
***RE0/AD8/RD
RG0/CCP3
RG1/TX2/CK2
RG2/RX2/DT2
RG3/CCP4
MCLR/VPP
RG4/CCP5
VSS
VDD
RF7/SS
RF6/AN11
RF5/AN10/CVREF
RF4/AN9
RF3/AN8
RF2/AN7/C1OUT
RB0/INT0
RB1/INT1
RB2/INT2
RB3/INT3/CCP2*
RB4/KBI0
RB5/KBI1/PGM
RB6/KBI2/PGC
VSS
OSC2/CLKO/RA6
OSC1/CLKI
VDD
RB7/KBI3/PGD
RC4/SDI/SDA
RC3/SCK/SCL
RC2/CCP1
RF0/AN5
RF1/AN6/C2OUT
AVDD
AVSS
RA3/AN3/VREF+
RA2/AN2/VREF-
RA1/AN1
RA0/AN0
VSS
VDD
RA4/T0CKI
RA5/AN4/LVDIN
RC1/T1OSI/CCP2*
RC7/RX1/DT1
RC6/TX1/CK1
RC5/SDO
RJ0/ALE
RJ1/OE
RH1/A17
RH0/A16
1
2
RH2/A18
RH3/A19
17
18
RH7/AN15
RH6/AN14
RH5/AN13
RH4/AN12
RJ5
RJ4/BA0
37
RJ7/UB
RJ6/LB
50
49
RJ2/WRL
RJ3/WRH
19
20
33 34 35 36 38
58
57
56
55
54
53
52
51
60
59
68 67 66 6572 71 70 69
74 73
78 77 76 75
79
80
80-pin TQFP
RC0/T1OSO/T13CLK
* CCP2 is multiplexed with RC1 when CCP2MX is set.
** CCP2 is multiplexed by default with RE7 when the device is configured in Microcontroller mode.
*** PSP is available only in Microcontroller mode.
PIC18F6520/8520
DS39558C-page 4 Advance Information 2002 Microchip Technology Inc.
NOTES:
2002 Microchip Technology Inc. Advance Information DS39558C - page 5
Information contained in this publication regarding device
applications and the like is intended through sug gestion only
and may be superseded by updates. It is your responsibility to
ensure that your application meets with your specifications.
No representation or warranty is given and no liability is
assumed by Microc hip Technology Inc orporated with respect
to the accuracy or use of such inf orm ation, or inf ringement of
patents or other intellectual property rights arising from such
use or otherwise. Use of Microchips products as critical com-
ponents in life support systems is not authorized except with
express written approval by Microchip. No licenses are con-
veyed, implicitly or otherwise, under any intellectual property
rights.
Trademarks
The Microchip name and logo, the Microchip logo, FilterLab,
KEELOQ, microID, MPLAB, PIC, PICmicro, PICMASTER,
PICSTART, PRO MATE, SEEVAL and The Embedded Control
Solutions Company are registered trademarks of Microchip Tech-
nology Incorporated in the U.S.A. and other countries.
dsPIC, ECONOMONITOR, FanSense, FlexRO M, fuzzyLAB,
In-Circuit Serial Programming, ICSP, ICEPIC, microPort,
Migratable Memory, MPASM, MPLIB, MPLINK, MPSIM,
MXDEV, MXLAB, PICC, PICDEM, PICDEM.n et, rfPIC, Sele ct
Mode and Total Endurance are trademarks of Microchip
Technology Incorporated in the U.S.A.
Serialized Quick Turn Programming (SQTP) is a service mark
of Microchip Technology Incorpora ted in the U.S.A.
All other trademarks mentioned herein are property of their
respective companies.
© 2002, Microchip Technology Incorporated, Printed in the
U.S.A., All Rights Reserved.
Printed on recycled paper.
Microchip received QS-9000 quality system
certification for its worldwide headquarters,
design and wafer fabrication facilities in
Chandler and Tempe, Arizona in July 1999
and Mountain View, California in March 2002.
The Company’s quality system processes and
procedures are QS-9000 compliant for its
PICmicro® 8-bit MCUs, KEELOQ® code ho pp in g
devices, Serial EEPRO Ms, micrope riphera ls,
non-volatile memory and analog products. In
addition, Microchips quality system for the
design and manufacture of development
systems is ISO 9001 certified.
Note the following details of the code protection feature on PICmicro® MCUs.
The PICmicro family meets the specifications contained in the Microchip Data Sheet.
Microchip believes that its family of PICmicro microcontrollers is one of the most secure products of it s kind on the market today,
when used in the intended manner and under normal conditions.
There are dishonest and possibly illegal methods used to breach the code protection feature. All of these methods, to our knowl-
edge, require using the PICmicro microcontroller in a manner outside the operating specifications contained in the data sheet.
The person doing so may be engaged in theft of intellectual property.
Microchip is willing to work with the customer who is concerned about the integrity of their code.
Neither Microchip nor any other semiconductor manufacturer can guarantee the security of their code. Code protection does not
mean that we are guaranteeing the product as unbreakable.
Code protection is constantly evolving. We at Microchip are committed to continuously improving the code protection features of
our product.
If you have any further questions about this matter, please contact the local sales office nearest to you.
DS39558C-page 1-6 Advance Information 2002 Microchip Technology Inc.
M
AMERICAS
Corporate Office
2355 West Chandler Blvd.
Chandler, AZ 85224-6199
Tel: 480-792-7200 Fax: 480-792-7277
Technical Support: 480-792-7627
Web Address: http://ww w.microchip .com
Rocky Mountain
2355 West Chandler Blvd.
Chandler, AZ 85224-6199
Tel: 480-792-7966 Fax: 480-792-4338
Atlanta
500 Sugar Mill Road, Suite 200B
Atlanta, GA 30350
Tel: 770-6 40- 003 4 Fax: 770- 640 -03 07
Boston
2 Lan Drive, Suite 120
Westford, MA 01886
Tel: 978-6 92- 384 8 Fax: 978- 692 -38 21
Chicago
333 Pierce Road, Suite 180
Itasca, IL 60143
Tel: 630-285-0071 Fax: 630-285-0075
Dallas
4570 Westgrove Drive, Suite 160
Addison, TX 7500 1
Tel: 972-8 18- 742 3 Fax: 972- 818 -29 24
Detroit
Tri-Atria Office Building
32255 Northwestern Highway, Suite 190
Farmington Hills, MI 48334
Tel: 248-538-2250 Fax: 248-538-2260
Kokomo
2767 S. Albright Road
Kokomo, Indiana 46902
Tel: 765-864-8360 Fax: 765-864-8387
Los A n ge les
18201 Von Karman, Suite 1090
Irvine, CA 92612
Tel: 949-2 63- 188 8 Fax: 949- 263 -13 38
New York
150 Motor Parkway, Suite 202
Hauppauge, NY 11788
Tel: 631-2 73- 530 5 Fax: 631- 273 -53 35
San Jose
Microchip Technology Inc.
2107 North First Street, Suite 590
San Jose, CA 95131
Tel: 408-4 36- 795 0 Fax: 408- 436 -79 55
Toronto
6285 Northam Drive, Suite 108
Mississ aug a, Ontario L4V 1X5, C ana da
Tel: 905-673-0699 Fax: 905-673-6509
ASIA/PACIFIC
Australia
Microchip Technology Australia Pty Ltd
Suite 22, 41 Rawson Street
Epping 212 1, NSW
Australia
Tel: 61-2-9868-6733 Fax: 61-2-9868-6755
China - Be ij ing
Microchip Technology Consulting (Shanghai)
Co., Ltd., Beijing Liaison Office
Unit 915
Bei Hai Wa n Tai Bldg.
No. 6 Chaoyangmen Beidajie
Beijing, 100027, No. China
Tel: 86-10-85282100 Fax: 86-10-85282104
China - Chengdu
Microchip Technology Consulting (Shanghai)
Co., Ltd., Chengdu Liaison Office
Rm. 2401, 24th Floor,
Ming Xing Financial Tower
No. 88 TIDU Street
Cheng du 610 016 , Chi na
Tel: 86-28-86766200 Fax: 86-28-86766599
China - Fuzhou
Microchip Technology Consulting (Shanghai)
Co., Ltd., Fuzhou Liaison Of fice
Unit 28F, World Trade Plaza
No. 71 Wusi Road
Fuzhou 350001, China
Tel: 86-591-7503506 Fax: 86-591-7503521
China - Shanghai
Microchip Technology Consulting (Shanghai)
Co., Ltd.
Room 701, Bldg. B
Far East International Plaza
No. 317 Xian Xia Road
Shanghai, 200051
Tel: 86-21-6275-5700 Fax: 86-21-6275-5060
China - Shenzhen
Microchip Technology Consulting (Shanghai)
Co., Ltd., Shenzhen Liaison Office
Rm. 1315, 13/F, Shenzhen Kerry Centre,
Renminnan Lu
Shenzhen 518001, China
Tel: 86-755-2350361 Fax: 86-755-2366086
China - Hong Kong SAR
Microchip Technology Hongkong Ltd.
Unit 901-6, Tower 2, Metroplaza
223 Hing Fong Road
Kwai Fong, N.T., Hong Kong
Tel: 852-2401-1200 Fax: 852-2401-3431
India
Microchip Technology Inc.
India Liaiso n Office
Divyasree Chambers
1 Floor, Wing A (A3/A4)
No. 11, OShaugnessey Road
Bangalore, 560 025, India
Tel: 91-80-2290061 Fax: 91-80-2290062
Japan
Microchip Technology Japan K.K.
Benex S-1 6F
3-18-20, Shinyokohama
Kohoku-K u, Yokoham a-shi
Kanagawa, 222-0033, Japan
Tel: 81-45-471- 6166 Fax: 81-45-471-6122
Korea
Microc hip Tech nolo gy Ko rea
168-1, Youngbo Bldg. 3 Floor
Samsung-Dong, Kangnam-Ku
Seoul, Ko re a 135- 88 2
Tel: 82-2-554-7200 Fax: 82-2-558-5934
Singapore
Microchip Technology Singapore Pte Ltd.
200 Midd le Ro ad
#07-02 Prime Centre
Singapore, 188980
Tel: 65-6334-8870 Fax: 65-6334-8850
Taiwan
Microchip Technolo gy (Barb ad os) Inc. ,
Taiwan Branch
11F-3, No. 207
Tung Hua North Road
Taipei, 105, Taiwan
Tel: 886-2-2717-7175 Fax: 886-2-2545-0139
EUROPE
Austria
Microchip Technology Austria GmbH
Durisolstrasse 2
A-4600 Wels
Austria
Tel: 43-7242-2244-399
Fax: 43-7242-2244-393
Denmark
Microchip Technology Nordic ApS
Regus Business Centre
Lautrup hoj 1-3
Ballerup DK-2750 Denmark
Tel: 45 4420 9895 Fax: 45 4420 9910
France
Microc hip Tech nolo gy SARL
Parc dActivite du Moulin de Massy
43 Rue du Saule Trapu
Batiment A - ler Et age
91300 Massy, France
Tel: 33-1-69-53-63-20 Fax: 33-1-69-30-90-79
Germany
Microc hip Tech nolo gy Gmb H
Gustav-Heinemann Ring 125
D-81739 Munich, Germany
Tel: 49-89-627-144 0 Fax: 49-89-627-144-44
Italy
Microc hip Tech nolo gy SRL
Centro Direzionale Colleoni
Palazzo Taurus 1 V. Le Colleoni 1
20041 Agrate Brianza
Milan, Italy
Tel: 39-039-65791-1 Fax: 39-039-6899883
United Kingdom
Micro chip Ltd.
505 Eskdale Road
Winnersh Triangle
Wokingham
Berksh ire, E ngla nd RG 41 5TU
Tel: 44 118 921 5869 Fax: 44-118 921-5820
05/16/02
Worldwide Sales and Service