PIC16F8X PIC16CR8X PIC16F8X 18-pin Flash/EEPROM 8-Bit Microcontrollers Devices Included in this Data Sheet: Pin Diagrams PIC16F83 PDIP, SOIC PIC16F84 RA2 1 18 RA1 PIC16CR83 2 PIC16CR84 RA3 17 RA0 RA4/T0CKI 3 16 OSC1/CLKIN Extended voltage range devices available 4 MCLR 15 OSC2/CLKOUT (PIC16LF8X, PIC16LCR8X) 5 VSS 14 VDD High Performance RISC CPU Features: RB0/INT 6 13 RB7 RB1 7 12 RB6 Only 35 single word instructions to learn 8 RB2 11 RB5 All instructions single cycle except for program 9 RB3 10 RB4 branches which are two-cycle Operating speed: DC - 10 MHz clock input DC - 400 ns instruction cycle Special Microcontroller Features: Program Data Data Max. Device Memory RAM EEPROM Freq In-Circuit Serial Programming (ICSP) - via two (words) (bytes) (bytes) (MHz) pins (ROM devices support only Data EEPROM programming) PIC16F83 512 Flash 36 64 10 PIC16F84 1 K Flash 68 64 10 Power-on Reset (POR) PIC16CR83 512 ROM 36 64 10 Power-up Timer (PWRT) PIC16CR84 1 K ROM 68 64 10 Oscillator Start-up Timer (OST) 14-bit wide instructions Watchdog Timer (WDT) with its own on-chip RC oscillator for reliable operation 8-bit wide data path Code-protection 15 special function hardware registers Power saving SLEEP mode Eight-level deep hardware stack Selectable oscillator options Direct, indirect and relative addressing modes Four interrupt sources: CMOS Flash/EEPROM Technology: - External RB0/INT pin Low-power, high-speed technology - TMR0 timer overflow Fully static design - PORTB<7:4> interrupt on change Wide operating voltage range: - Data EEPROM write complete - Commercial: 2.0V to 6.0V 1000 erase/write cycles Flash program memory - Industrial: 2.0V to 6.0V 10,000,000 erase/write cycles EEPROM data mem- Low power consumption: ory - < 2 mA typical 5V, 4 MHz EEPROM Data Retention > 40 years -15 A typical 2V, 32 kHz Peripheral Features: -< 1 A typical standby current 2V 13 I/O pins with individual direction control High current sink/source for direct LED drive - 25 mA sink max. per pin - 20 mA source max. per pin TMR0: 8-bit timer/counter with 8-bit programmable prescaler 1996-2013 Microchip Technology Inc. DS30430D-page 1PIC16F8X Table of Contents 1.0 General Description ...................................................................................................................................................................... 3 2.0 PIC16F8X Device Varieties .......................................................................................................................................................... 5 3.0 Architectural Overview.................................................................................................................................................................. 7 4.0 Memory Organization ................................................................................................................................................................. 11 5.0 I/O Ports...................................................................................................................................................................................... 21 6.0 Timer0 Module and TMR0 Register............................................................................................................................................ 27 7.0 Data EEPROM Memory.............................................................................................................................................................. 33 8.0 Special Features of the CPU ...................................................................................................................................................... 37 9.0 Instruction Set Summary ............................................................................................................................................................ 53 10.0 Development Support................................................................................................................................................................. 69 11.0 Electrical Characteristics for PIC16F83 and PIC16F84.............................................................................................................. 73 12.0 Electrical Characteristics for PIC16CR83 and PIC16CR84........................................................................................................ 85 13.0 DC & AC Characteristics Graphs/Tables.................................................................................................................................... 97 14.0 Packaging Information .............................................................................................................................................................. 109 Appendix A: Feature Improvements - From PIC16C5X To PIC16F8X .......................................................................................... 113 Appendix B: Code Compatibility - from PIC16C5X to PIC16F8X.................................................................................................. 113 Appendix C: Whats New In This Data Sheet................................................................................................................................. 114 Appendix D: Whats Changed In This Data Sheet ......................................................................................................................... 114 Appendix E: Conversion Considerations - PIC16C84 to PIC16F83/F84 And PIC16CR83/CR84.................................................. 115 Index ................................................................................................................................................................................................. 117 On-Line Support................................................................................................................................................................................. 119 Reader Response .............................................................................................................................................................................. 120 PIC16F8X Product Identification System ........................................................................................................................................... 121 Sales and Support.............................................................................................................................................................................. 121 To Our Valued Customers We constantly strive to improve the quality of all our products and documentation. We have spent a great deal of time to ensure that these documents are correct. However, we realize that we may have missed a few things. If you find any information that is missing or appears in error, please use the reader response form in the back of this data sheet to inform us. We appreciate your assistance in making this a better document. DS30430D-page 2 1996-2013 Microchip Technology Inc.