PIC16F87/88 18/20/28-Pin Enhanced Flash MCUs with nanoWatt Technology Low-Power Features: Pin Diagram Power-Managed modes: 18-Pin PDIP, SOIC - Primary Run: RC oscillator, 76 A, 1 MHz, 2V - RC RUN: 7 A, 31.25 kHz, 2V RA2/AN2/CVREF/ 1 18 RA1/AN1 VREF- - SEC RUN: 9 A, 32 kHz, 2V RA3/AN3/VREF+/ RA0/AN0 2 17 - Sleep: 0.1 A, 2V C1OUT RA4/AN4/T0CKI/ Timer1 Oscillator: 1.8 A, 32 kHz, 2V 3 16 RA7/OSC1/CLKI C2OUT Watchdog Timer: 2.2 A, 2V RA5/MCLR/VPP 4 15 RA6/OSC2/CLKO Two-Speed Oscillator Start-up VSS VDD 5 14 RB7/AN6/PGD/ (1) RB0/INT/CCP1 Oscillators: 6 13 T1OSI RB6/AN5/PGC/ Three Crystal modes: RB1/SDI/SDA 7 12 T1OSO/T1CKI - LP, XT, HS: up to 20 MHz RB2/SDO/RX/DT 8 11 RB5/SS/TX/CK Two External RC modes (1) RB3/PGM/CCP1 9 10 RB4/SCK/SCL One External Clock mode: - ECIO: up to 20 MHz Note 1: The CCP1 pin is determined by the CCPMX bit in Configuration Word 1 register. Internal oscillator block: - 8 user selectable frequencies: 31 kHz, 125 kHz, 250 kHz, 500 kHz, 1 MHz, 2 MHz, 4MHz, 8MHz Special Microcontroller Features: 100,000 erase/write cycles Enhanced Flash Peripheral Features: program memory typical Capture, Compare, PWM (CCP) module: 1,000,000 typical erase/write cycles EEPROM - Capture is 16-bit, max. resolution is 12.5 ns data memory typical - Compare is 16-bit, max. resolution is 200 ns EEPROM Data Retention: > 40 years - PWM max. resolution is 10-bit In-Circuit Serial Programming (ICSP) 10-bit, 7-channel Analog-to-Digital Converter via two pins Synchronous Serial Port (SSP) with SPI Processor read/write access to program memory 2 (Master/Slave) and I C (Slave) Low-Voltage Programming Addressable Universal Synchronous In-Circuit Debugging via two pins Asynchronous Receiver Transmitter Extended Watchdog Timer (WDT): (AUSART/SCI) with 9-bit address detection: - Programmable period from 1 ms to 268s - RS-232 operation using internal oscillator Wide operating voltage range: 2.0V to 5.5V (no external crystal required) Dual Analog Comparator module: - Programmable on-chip voltage reference - Programmable input multiplexing from device inputs and internal voltage reference - Comparator outputs are externally accessible Program Memory Data Memory I/O 10-bit CCP Timers Device AUSART Comparators SSP Flash Single-Word SRAM EEPROM Pins A/D (ch) (PWM) 8/16-bit (bytes) Instructions (bytes) (bytes) PIC16F87 7168 4096 368 256 16 N/A 1 Y 2 Y 2/1 PIC16F88 7168 4096 368 256 16 1 1 Y 2 Y 2/1 2002-2013 Microchip Technology Inc. DS30487D-page 1 PIC16F88PIC16F87/88 Pin Diagrams 18-Pin PDIP, SOIC RA2/AN2/CVREF 1 18 RA1/AN1 RA3/AN3/C1OUT RA0/AN0 2 17 RA4/T0CKI/C2OUT 3 16 RA7/OSC1/CLKI RA5/MCLR/VPP 4 15 RA6/OSC2/CLKO VSS VDD 5 14 (1) RB0/INT/CCP1 RB7/PGD/T1OSI 6 13 RB1/SDI/SDA 7 12 RB6/PGC/T1OSO/T1CKI RB2/SDO/RX/DT 8 11 RB5/SS/TX/CK (1) RB3/PGM/CCP1 RB4/SCK/SCL 9 10 20-Pin SSOP RA2/AN2/CVREF RA1/AN1 1 20 RA3/AN3/C1OUT 2 19 RA0/AN0 RA4/T0CKI/C2OUT 3 18 RA7/OSC1/CLKI RA5/MCLR/VPP 4 17 RA6/OSC2/CLKO VSS 5 16 VDD VSS VDD 6 15 (1) RB7/PGD/T1OSI RB0/INT/CCP1 7 14 RB1/SDI/SDA RB6/PGC/T1OSO/T1CKI 8 13 RB5/SS/TX/CK RB2/SDO/RX/DT 9 12 (1) RB3/PGM/CCP1 RB4/SCK/SCL 10 11 18-Pin PDIP, SOIC RA2/AN2/CVREF/VREF- 1 18 RA1/AN1 RA3/AN3/VREF+/C1OUT RA0/AN0 2 17 RA4/AN4/T0CKI/C2OUT 3 16 RA7/OSC1/CLKI RA5/MCLR/VPP 4 15 RA6/OSC2/CLKO VSS VDD 5 14 (1) RB0/INT/CCP1 RB7/AN6/PGD/T1OSI 6 13 RB1/SDI/SDA 7 12 RB6/AN5/PGC/T1OSO/T1CKI RB2/SDO/RX/DT 8 11 RB5/SS/TX/CK (1) RB3/PGM/CCP1 9 10 RB4/SCK/SCL 20-Pin SSOP RA2/AN2/CVREF/VREF- RA1/AN1 1 20 RA3/AN3/VREF+/C1OUT 2 19 RA0/AN0 RA4/AN4/T0CKI/C2OUT 3 18 RA7/OSC1/CLKI RA5/MCLR1/VPP 4 17 RA6/OSC2/CLKO VSS VDD 5 16 VSS VDD 6 15 (1) RB7/AN6/PGD/T1OSI RB0/INT/CCP1 7 14 RB6/AN5/PGC/T1OSO/T1CKI RB1/SDI/SDA 8 13 RB5/SS/TX/CK RB2/SDO/RX/DT 9 12 (1) RB3/PGM/CCP1 10 11 RB4/SCK/SCL Note 1: The CCP1 pin is determined by the CCPMX bit in Configuration Word 1 register. DS30487D-page 2 2002-2013 Microchip Technology Inc. PIC16F87 PIC16F87 PIC16F88 PIC16F88