PIC16F818/819 18/20-Pin Enhanced Flash Microcontrollers with nanoWatt Technology Low-Power Features: Pin Diagram Power-Managed modes: 18-Pin PDIP, SOIC - Primary Run: XT, RC oscillator, 1 RA2/AN2/VREF- 18 RA1/AN1 87 A, 1 MHz, 2V 2 RA3/AN3/VREF+ 17 RA0/AN0 -INTRC: 7 A, 31.25 kHz, 2V 3 RA4/AN4/T0CKI 16 RA7/OSC1/CLKI 4 RA5/MCLR/VPP 15 RA6/OSC2/CLKO - Sleep: 0.2 A, 2V 5 VSS 14 VDD Timer1 oscillator: 1.8 A, 32 kHz, 2V 6 RB0/INT 13 RB7/T1OSI/PGD 7 Watchdog Timer: 0.7 A, 2V RB1/SDI/SDA 12 RB6/T1OSO/T1CKI/PGC RB2/SDO/CCP1 8 11 RB5/SS Wide operating voltage range: 9 RB3/CCP1/PGM 10 RB4/SCK/SCL - Industrial: 2.0V to 5.5V Oscillators: Special Microcontroller Features: Three Crystal modes: 100,000 erase/write cycles Enhanced Flash - LP, XT, HS: up to 20 MHz program memory typical Two External RC modes 1,000,000 typical erase/write cycles EEPROM One External Clock mode: data memory typical - ECIO: up to 20 MHz EEPROM Data Retention: > 40 years Internal oscillator block: TM TM In-Circuit Serial Programming (ICSP ) via two pins - 8 user selectable frequencies: 31 kHz, 125 kHz, Processor read/write access to program memory 250kHz, 500kHz, 1MHz, 2 MHz, 4 MHz, 8 MHz Low-Voltage Programming In-Circuit Debugging via two pins Peripheral Features: 16 I/O pins with individual direction control High sink/source current: 25 mA Timer0: 8-bit timer/counter with 8-bit prescaler Timer1: 16-bit timer/counter with prescaler, can be incremented during Sleep via external crystal/clock Timer2: 8-bit timer/counter with 8-bit period register, prescaler and postscaler Capture, Compare, PWM (CCP) module: - Capture is 16-bit, max. resolution is 12.5 ns - Compare is 16-bit, max. resolution is 200 ns - PWM max. resolution is 10-bit 10-bit, 5-channel Analog-to-Digital converter Synchronous Serial Port (SSP) with 2 SPI (Master/Slave) and I C (Slave) Program Memory Data Memory SSP 10-bit CCP Timers Device I/O Pins Flash Single-Word SRAM EEPROM Slave A/D (ch) (PWM) 8/16-bit SPI 2 (Bytes) Instructions (Bytes) (Bytes) I C PIC16F818 1792 1024 128 128 16 5 1 Y Y 2/1 PIC16F819 3584 2048 256 256 16 5 1 Y Y 2/1 2001-2013 Microchip Technology Inc. DS39598F-page 1 PIC16F818/819PIC16F818/819 Pin Diagrams 20-Pin SSOP 18-Pin PDIP, SOIC RA2/AN2/VREF- 1 20 RA1/AN1 RA2/AN2/VREF- 1 18 RA1/AN1 RA3/AN3/VREF+ 2 RA0/AN0 19 2 RA3/AN3/VREF+ 17 RA0/AN0 RA4/AN4/T0CKI 3 18 RA7/OSC1/CLKI 3 RA4/AN4/T0CKI 16 RA7/OSC1/CLKI RA5/MCLR/VPP 4 17 RA6/OSC2/CLKO 4 RA5/MCLR/VPP 15 RA6/OSC2/CLKO VSS 5 16 VDD 5 VSS 14 VDD VSS 6 15 VDD 6 RB0/INT 13 RB7/T1OSI/PGD RB0/INT 7 14 RB7/T1OSI/PGD 7 RB1/SDI/SDA 12 RB6/T1OSO/T1CKI/PGC RB6/T1OSO/T1CKI/PGC RB1/SDI/SDA 8 13 RB2/SDO/CCP1 8 11 RB5/SS RB2/SDO/CCP1 9 RB5/SS 12 9 RB3/CCP1/PGM 10 RB4/SCK/SCL RB3/CCP1/PGM 10 11 RB4/SCK/SCL (1) 28-Pin QFN RA5/MCLR/VPP 21 RA7/OSC1/CLKI 1 20 NC 2 RA6/OSC2/CLKO 19 VSS 3 VDD 18 NC 4 NC PIC16F818/819 VSS 5 17 VDD RB7/T1OSI/PGD NC 6 16 7 15 RB6/T1OSO/T1CKI/PGC RB0/INT Note 1: For the QFN package, it is recommended that the bottom pad be connected to VSS. DS39598F-page 2 2001-2013 Microchip Technology Inc. PIC16F818/819 8 RB1/SDI/SDA 28 RA4/AN4/T0CKI 9 RB2/SDO/CCP1 RA3/AN3/VREF+ 27 10 RB3/CCP1/PGM RA2/AN2/VREF- 26 NC 11 25 NC RB4/SCK/SCL 12 24 RA1/AN1 RB5/SS 13 23 RA0/AN0 14 NC 22 NC PIC16F818/819