Transcription of 18/20-Pin Enhanced Flash Microcontrollers with …
1 2001-2013 Microchip Technology 1 PIC16F818/819 Low-Power Features: Power-Managed modes:- Primary Run: XT, RC oscillator, 87 A, 1 MHz, 2V-INTRC: 7 A, kHz, 2V- Sleep: A, 2V Timer1 oscillator: A, 32 kHz, 2V Watchdog Timer: A, 2V Wide operating voltage range:- Industrial: to : Three Crystal modes:- LP, XT, HS: up to 20 MHz Two External RC modes One External Clock mode:- ECIO: up to 20 MHz Internal oscillator block:- 8 user selectable frequencies: 31 kHz, 125 kHz, 250kHz, 500kHz, 1 MHz, 2 MHz, 4 MHz, 8 MHzPeripheral 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.
2 Resolution is 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 SPI (Master/Slave) and I2C (Slave)Pin DiagramSpecial Microcontroller Features: 100,000 erase/write cycles Enhanced Flash program memory typical 1,000,000 typical erase/write cycles EEPROM data memory typical EEPROM Data Retention: > 40 years In-Circuit Serial ProgrammingTM (ICSPTM) via two pins Processor read/write access to program memory Low-Voltage Programming In-Circuit Debugging via two pinsRA1/AN1RA0/AN0RA7/OSC1/CLKIRA6/OSC2/ CLKOVDDRB7/T1 OSI/PGDRB6/T1 OSO/T1 CKI/PGCRB5/SSRB4/SCK/SCLRA2/AN2/VREF-RA3 /AN3/VREF+RA4/AN4/T0 CKIRA5/MCLR/VPPVSSRB0/INTRB1/SDI/SDARB2/ SDO/CCP1RB3/CCP1/PGM 123456789181716151413121110 PIC16F818/81918-Pin PDIP, SOICD eviceProgram MemoryData MemoryI/O Pins10-bitA/D (ch)CCP(PWM)SSPT imers8/16-bitFlash(Bytes)# Single-Word Instructions SRAM (Bytes)EEPROM (Bytes)
3 SPIS lave I2C PIC16F818179210241281281651YY2/1 PIC16F819358420482562561651YY2/118/20-Pi n Enhanced Flash Microcontrollers with nanoWatt TechnologyPIC16F818/819DS39598F-page 2 2001-2013 Microchip Technology Diagrams RA1/AN1RA0/AN0RA7/OSC1/CLKIRA6/OSC2/CLKO VDDRB7/T1 OSI/PGDRB6/T1 OSO/T1 CKI/PGCRB5/SSRB4/SCK/SCLRA2/AN2/VREF-RA3 /AN3/VREF+RA4/AN4/T0 CKIRA5/MCLR/VPPVSSRB0/INTRB1/SDI/SDARB2/ SDO/CCP1RB3/CCP1/PGM 12345678918171615141312111018-Pin PDIP, SOICPIC16F818/819RA1/AN1RA0/AN0RA7/OSC1/ CLKIRA6/OSC2/CLKOVDDRB7/T1 OSI/PGDRB6/T1 OSO/T1 CKI/PGCRB5/SSRB4/SCK/SCLRA2/AN2/VREF-RA3 /AN3/VREF+RA4/AN4/T0 CKIRA5/MCLR/VPPVSSRB0/INTRB1/SDI/SDARB2/ SDO/CCP1RB3/CCP1/PGM 12345678920191817161514131220-Pin SSOP1011 VSSVDDPIC16F818/81928-Pin QFN(1)162RA2/AN2/VREF-RA0/AN0RA4/AN4/T0 CKIRA5/MCLR/VPPNCVSSNCRB0/INTRB1/SDI/SDA RA3/AN3/VREF+RA7/OSC1/CLKIRA6/OSC2/CLKOV DDNCVDDRB7/T1 OSI/PGDRB6/T1 OSO/T1 CKI/PGCRB5/SSRB4/SCK/SCL7 PIC16F818/819136541521192017182228262723 2425148109131211 VSSNCNCRA1/AN1RB2/SDO/CCP1RB3/CCP1/PGMNC NCNCNote 1:For the QFN package, it is recommended that the bottom pad be connected to VSS.
4 2001-2013 Microchip Technology 3 PIC16F818/819 Table of Overview .. Organization .. EEPROM and Flash Program Configurations .. Ports .. Module .. Module .. Module .. (CCP) Module .. Synchronous Serial Port (SSP) Module .. Analog-to-Digital Converter (A/D) Module .. Special Features of the Instruction Set Summary .. Development Electrical Characteristics .. DC and AC Characteristics Graphs and Packaging 155 Appendix A: Revision 165 Appendix B: Device Differences .. 165 INDEX .. 167 The Microchip Web Site .. 173 Customer Change Notification Service .. 173 Customer Support .. 173 Reader Response .. 174 PIC16F818/819 Product Identification System.
5 175TO OUR VALUED CUSTOMERSIt is our intention to provide our valued customers with the best documentation possible to ensure successful use of your Microchipproducts. To this end, we will continue to improve our publications to better suit your needs. Our publications will be refined andenhanced as new volumes and updates are introduced. If you have any questions or comments regarding this publication, please contact the Marketing Communications Department viaE-mail at or fax the Reader Response Form in the back of this data sheet to (480) 792-4150. Wewelcome your Current Data SheetTo obtain the most up-to-date version of this data sheet, please register at our Worldwide Web site at: can determine the version of a data sheet by examining its literature number found on the bottom outside corner of any last character of the literature number is the version number, ( , DS30000A is version A of document DS30000).
6 ErrataAn errata sheet, describing minor operational differences from the data sheet and recommended workarounds, may exist for currentdevices. As device/documentation issues become known to us, we will publish an errata sheet. The errata will specify the revisionof silicon and revision of document to which it determine if an errata sheet exists for a particular device, please check with one of the following: Microchip s Worldwide Web site; Your local Microchip sales office (see last page)When contacting a sales office, please specify which device, revision of silicon and data sheet (include literature number) you Notification SystemRegister on our web site at to receive the most current information on all of our 4 2001-2013 Microchip Technology : 2001-2013 Microchip Technology 5 PIC16F818 OVERVIEWThis document contains device specific information forthe operation of the PIC16F818/819 devices.
7 Additionalinformation may be found in the PIC Mid-Range MCUF amily Reference Manual (DS33023) which may bedownloaded from the Microchip web site. The ReferenceManual should be considered a complementary docu-ment to this data sheet and is highly recommendedreading for a better understanding of the device architec-ture and operation of the peripheral PIC16F818/819 belongs to the Mid-Range familyof the PIC devices. The devices differ from each otherin the amount of Flash program memory, data memoryand data EEPROM (see Table 1-1). A block diagram ofthe devices is shown in Figure 1-1. These devices con-tain features that are new to the PIC16 product line: Internal RC oscillator with eight selectable frequencies, including kHz, 125 kHz, 250 kHz, 500 kHz, 1 MHz, 2 MHz, 4 MHz and 8 MHz.
8 The INTRC can be configured as the system clock via the configuration bits. Refer to Section Internal Oscillator Block and Section Configuration Bits for further details. The Timer1 module current consumption has been greatly reduced from 20 A (previous PIC16 devices) to A typical (32 kHz at 2V), which is ideal for real-time clock applications. Refer to Section Timer0 Module for further details. The amount of oscillator selections has increased. The RC and INTRC modes can be selected with an I/O pin configured as an I/O or a clock output (FOSC/4). An external clock can be configured with an I/O pin. Refer to Section Oscillator Configurations for further 1-1:AVAILABLE MEMORY IN PIC16F818/819 DEVICES There are 16 I/O pins that are user configurable on apin-to-pin basis.
9 Some pins are multiplexed with otherdevice functions. These functions include: External Interrupt Change on PORTB Interrupt Timer0 Clock Input Low-Power Timer1 Clock/Oscillator Capture/Compare/PWM 10-bit, 5-channel Analog-to-Digital Converter SPI/I2C MCLR (RA5) can be configured as an InputTable 1-2 details the pinout of the devices withdescriptions and details for each FlashData MemoryData EEPROMPIC16F8181K x 14128 x 8128 x 8 PIC16F8192K x14256 x 8256 x 8 DeviceProgram FlashData MemoryData EEPROMPIC16F818/819DS39598F-page 6 2001-2013 Microchip Technology 1-1:PIC16F818/819 BLOCK DIAGRAMF lashMemory1K/2K x 1413 Data Bus814 ProgramBusInstruction regProgram Counter8-Level Stack(13-bit)RAMFileRegisters128/256 x 8 Direct Addr7 RAM Addr(1)9 Addr MUXI ndirectAddrFSR regStatus regMUXALUW regPower-upTimerOscillatorStart-up TimerPower-onResetWatchdogTimerInstructi onDecode &ControlTimingGenerationRA7/OSC1/CLKIRA6 /OSC2/CLKOMCLRVDD, VSST imer010-bit, 5-channelSynchronousSerial PortPORTA88 Brown-outResetNote 1.
10 Higher order bits are from the Status +RA2/AN2/VREF-RA1/AN183 ProgramPORTBRB0/INTRB1/SDI/SDARB2/SDO/CC P1RB3/CCP1/PGMRB4/SCK/SCLRB5/SSRB6/T1 OSO/T1 CKI/PGCRB7/T1 OSI/PGDRA7/OSC1/CLKIRA0/AN0128/256 BytesData EEA/D 2001-2013 Microchip Technology 7 PIC16F818/819 TABLE 1-2:PIC16F818/819 PINOUT DESCRIPTIONSPin NamePDIP/SOICPin#SSOPPin#QFNPin#I/O/PTyp eBufferTypeDescriptionPORTA is a bidirectional I/O I/O input channel I/O input channel I/O input channel reference voltage (low) +RA3AN3 VREF+2227I/OIITTLA nalogAnalogBidirectional I/O input channel reference voltage (high) input. RA4/AN4/T0 CKIRA4AN4T0 CKI3328I/OIISTA nalogSTBidirectional I/O input channel input to the TMR0 timer/counter.