PIC18F87J11 FAMILY 64/80-Pin, High-Performance, 1-Mbit Flash Microcontrollers Flexible Oscillator Structure: Peripheral Highlights (continued): Four Crystal modes, Including High-Precision PLL 8-Bit Parallel Master Port/Enhanced Parallel Slave Two External Clock modes, up to 48 MHz Port (PMP/EPSP) with 16 Address Lines Internal Oscillator Block: Dual Analog Comparators with Input Multiplexing - Provides 8 user-selectable frequencies from 10-Bit, up to 15-Channel Analog-to-Digital Converter 31 kHz to 8 MHz module (A/D): - Provides a complete range of clock speeds, - Auto-acquisition capability from 31 kHz to 32 MHz when used with PLL - Conversion available during Sleep - User-tunable to compensate for frequency drift External Memory Bus (80-pin devices only): Secondary Oscillator using Timer1 32 kHz Fail-Safe Clock Monitor (FSCM): Address Capability of up to 2 Mbytes 8-Bit or 16-Bit Interface - Allows for safe shutdown if any clock stops 12-Bit, 16-Bit and 20-Bit Addressing modes Peripheral Highlights: Special Microcontroller Features: High-Current Sink/Source 25 mA/25mA on PORTB and PORTC Low-Power, High-Speed CMOS Flash Technology C Compiler Optimized Architecture for Re-Entrant Four Programmable External Interrupts Four Input Change Interrupts Code Power Management Features: One 8/16-Bit Timer/Counter Two 8-Bit Timers/Counters - Run: CPU on, peripherals on - Idle: CPU off, peripherals on Two 16-Bit Timers/Counters Two Capture/Compare/PWM (CCP) modules - Sleep: CPU off, peripherals off Priority Levels for Interrupts Three Enhanced Capture/Compare/PWM (ECCP) modules: Self-Programmable under Software Control 8 x 8 Single-Cycle Hardware Multiplier - One, two or four PWM outputs - Selectable polarity Extended Watchdog Timer (WDT): - Programmable period from 4 ms to 131s - Programmable dead time - Auto-shutdown and auto-restart Single-Supply In-Circuit Serial Programming (ICSP) via Two Pins Two Master Synchronous Serial Port (MSSP) modules supporting 3-Wire SPI (all 4 modes) and In-Circuit Debug (ICD) with 3 Breakpoints via Two Pins 2 Operating Voltage Range of 2.0V to 3.6V I C Master and Slave modes Two Enhanced USART modules: 5.5V Tolerant Inputs (digital only pins) On-Chip 2.5V Regulator - Supports RS-485, RS-232 and LIN/J2602 - Auto-wake-up on Start bit Flash Program Memory of 10000 Erase/Write Cycles and 20-Year Data Retention - Auto-Baud Detect MSSP Flash SRAM Program Data 10-Bit CCP/ECCP Device I/O Master Memory Memory A/D (ch) (PWM) SPI 2 I C (bytes) (bytes) PIC18F66J11 64 kB 3904 52 11 2/3 2 Y Y 2 2 2/3 N Y PIC18F66J16 96 kB 3904 52 11 2/3 2 Y Y 2 2 2/3 N Y PIC18F67J11 128 kB 3904 52 11 2/3 2 Y Y 2 2 2/3 N Y PIC18F86J11 64 kB 3904 68 15 2/3 2 Y Y 2 2 2/3 Y Y PIC18F86J16 96 kB 3904 68 15 2/3 2 Y Y 2 2 2/3 Y Y PIC18F87J11 128 kB 3904 68 15 2/3 2 Y Y 2 2 2/3 Y Y 2007-2012 Microchip Technology Inc. DS39778E-page 1 EUSART Comparators Timers 8/16-Bit External Bus PMP/EPSPPIC18F87J11 FAMILY 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/PMWR/P2C 1 48 RE0/PMRD/P2D 47 RB1/INT1/PMA4 2 RB2/INT2/PMA3 RG0/PMA8/ECCP3/P3A 3 46 RG1/PMA7/TX2/CK2 45 RB3/INT3/PMA2 4 44 RB4/KBI0/PMA1 RG2/PMA6/RX2/DT2 5 43 RG3/PMCS1/CCP4/P3D 6 RB5/KBI1/PMA0 42 RB6/KBI2/PGC MCLR 7 PIC18F6XJ11 VSS RG4/PMCS2/CCP5/P1D 8 41 40 OSC2/CLKO/RA6 VSS 9 PIC18F6XJ16 39 OSC1/CLKI/RA7 VDDCORE/VCAP 10 38 VDD RF7/SS1 11 RB7/KBI3/PGD RF6/AN11/C1INA 12 37 RF5/AN10/C1INB/CVREF 13 36 RC5/SDO1 RF4/AN9/C2INA 35 RC4/SDI1/SDA1 14 34 RF3/AN8/C2INB RC3/SCK1/SCL1 15 33 RC2/ECCP1/P1A RF2/PMA5/AN7/C1OUT 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 Legend: Shaded pins indicate pins that are tolerant up to +5.5V. Note 1: The ECCP2/P2A pin placement depends on the CCP2MX Configuration bit setting. DS39778E-page 2 2007-2012 Microchip Technology Inc. RE2/PMBE/P2B RF1/AN6/C2OUT ENVREG RE3/PMA13/P3C/REFO AVDD RE4/PMA12/P3B AVSS RE5/PMA11/P1C RA3/AN3/VREF+ RE6/PMA10/P1B (1) (1) RA2/AN2/VREF- RE7/PMA9/ECCP2 /P2A RA1/AN1 RD0/PMD0 VDD RA0/AN0 VSS VSS VDD RD1/PMD1 RA5/AN4 RD2/PMD2 RA4/T0CKI RD3/PMD3 (1) (1) RD4/PMD4/SDO2 RC1/T1OSI/ECCP2 /P2A RD5/PMD5/SDI2/SDA2 RC0/T1OSO/T13CKI RD6/PMD6/SCK2/SCL2 RC6/TX1/CK1 RC7/RX1/DT1 RD7/PMD7/SS2