PIC18F6525/6621/8525/8621 64/80-Pin High-Performance, 64-Kbyte Enhanced Flash Microcontrollers with A/D High Performance RISC CPU: External Memory Interface (PIC18F8525/8621 Devices Only): Linear program memory addressing to 64 Kbytes Address capability of up to 2 Mbytes Linear data memory addressing to 4 Kbytes 1 Kbyte of data EEPROM 16-bit interface Up to 10 MIPs operation: Analog Features: - DC 40 MHz osc./clock input 10-bit, up to 16-channel Analog-to-Digital - 4 MHz 10 MHz osc./clock input with PLL active Converter (A/D): 16-bit wide instructions, 8-bit wide data path - Auto-Acquisition Priority levels for interrupts - Conversion available during Sleep 31-level, software accessible hardware stack Programmable 16-level Low-Voltage Detection 8 x 8 Single-cycle Hardware Multiplier (LVD) module: Peripheral Features: - Supports interrupt on Low-Voltage Detection High current sink/source 25 mA/25 mA Programmable Brown-out Reset (BOR) Dual analog comparators: Four external interrupt pins Timer0 module: 8-bit/16-bit timer/counter - Programmable input/output configuration Timer1 module: 16-bit timer/counter Special Microcontroller Features: Timer2 module: 8-bit timer/counter 100,000 erase/write cycle Enhanced Flash Timer3 module: 16-bit timer/counter program memory typical Timer4 module: 8-bit timer/counter 1,000,000 erase/write cycle Data EEPROM Secondary oscillator clock option Timer1/Timer3 memory typical Two Capture/Compare/PWM (CCP) modules: 1 second programming time CY/16) - Capture is 16-bit, max. resolution 6.25 ns (T Flash/Data EEPROM Retention: > 100 years - Compare is 16-bit, max. resolution 100 ns (TCY) Self-reprogrammable under software control - PWM output: 1 to 10-bit PWM resolution Power-on Reset (POR), Power-up Timer (PWRT) Three Enhanced Capture/Compare/PWM (ECCP) and Oscillator Start-up Timer (OST) modules: Watchdog Timer (WDT) with its own On-Chip - Same Capture/Compare features as CCP RC Oscillator for reliable operation - One, two or four PWM outputs Programmable code protection - Selectable polarity Power-saving Sleep mode - Programmable dead time Selectable oscillator options including: - Auto-Shutdown on external event - 4x Phase Lock Loop (PLL) of primary oscillator - Auto-Restart - Secondary Oscillator (32 kHz) clock input Master Synchronous Serial Port (MSSP) module In-Circuit Serial Programming (ICSP) via two pins with two modes of operation: MPLAB In-Circuit Debug (ICD 2) via two pins - 2/3/4-wire SPI (supports all 4 SPI modes) 2 CMOS Technology: -I C Master and Slave mode Two Enhanced USART modules: Low power, high-speed Flash technology - Supports RS-485, RS-232 and LIN 1.2 Fully static design - Auto-Wake-up on Start bit Wide operating voltage range (2.0V to 5.5V) - Auto-Baud Rate Detect Industrial and Extended temperature ranges Parallel Slave Port (PSP) module Program Memory Data Memory 10-bit CCP/ MSSP/SPI/ Timers Device I/O A/D PWM EUSART EMI 2 Single-Word SRAM EEPROM ECCP Master I C 8-bit/16-bit Bytes (ch) Instructions (bytes) (bytes) PIC18F6525 48K 24576 3840 1024 53 12 2/3 14 Y 2 2/3 N PIC18F6621 64K 32768 3840 1024 53 12 2/3 14 Y 2 2/3 N PIC18F8525 48K 24576 3840 1024 70 16 2/3 14 Y 2 2/3 Y PIC18F8621 64K 32768 3840 1024 70 16 2/3 14 Y 2 2/3 Y 2003-2013 Microchip Technology Inc. DS39612C-page 1PIC18F6525/6621/8525/8621 Pin Diagrams 64-Pin TQFP 64 63 62 61 60 59 58 57 56 55 54 53 52 51 50 49 RB0/INT0/FLT0 RE1/WR/P2C 48 1 RB1/INT1 RE0/RD/P2D 2 47 RG0/ECCP3/P3A RB2/INT2 46 3 RG1/TX2/CK2 RB3/INT3 45 4 RG2/RX2/DT2 RB4/KBI0 44 5 RG3/CCP4/P3D RB5/KBI1/PGM 6 43 (2) MCLR/VPP/RG5 RB6/KBI2/PGC 42 7 PIC18F6525 RG4/CCP5/P1D VSS 8 41 VSS OSC2/CLKO/RA6 9 PIC18F6621 40 VDD OSC1/CLKI 10 39 VDD RF7/SS 11 38 RF6/AN11 RB7/KBI3/PGD 37 12 RF5/AN10/CVREF RC5/SDO 13 36 RF4/AN9 RC4/SDI/SDA 14 35 RF3/AN8 RC3/SCK/SCL 15 34 RF2/AN7/C1OUT RC2/ECCP1/P1A 33 16 29 30 31 32 17 18 19 20 21 22 23 24 25 26 27 28 Note 1: ECCP2/P2A are multiplexed with RC1 when CCP2MX is set, or RE7 when CCP2MX is not set. 2: RG5 is multiplexed with MCLR and is only available when the MCLR Resets are disabled. DS39612C-page 2 2003-2013 Microchip Technology Inc. RE2/CS/P2B RF1/AN6/C2OUT RE3/P3C RF0/AN5 RE4/P3B AVDD RE5/P1C AVSS RE6/P1B RA3/AN3/VREF+ (1) (1) RE7/ECCP2 /P2A RA2/AN2/VREF- RD0/PSP0 RA1/AN1 VDD RA0/AN0 VSS VSS RD1/PSP1 VDD RD2/PSP2 RA5/AN4/LVDIN RD3/PSP3 RA4/T0CKI (1) (1) RD4/PSP4 RC1/T1OSI/ECCP2 /P2A RD5/PSP5 RC0/T1OSO/T13CKI RD6/PSP6 RC6/TX1/CK1 RD7/PSP7 RC7/RX1/DT1