PIC16F883-E/ML Microchip Technology, PIC16F883-E/ML Datasheet
![IC,MICROCONTROLLER,8-BIT,PIC CPU,CMOS,LLCC,28PIN,PLASTIC](/photos/6/81/68120/150-28-qfn_sml.jpg)
PIC16F883-E/ML
Specifications of PIC16F883-E/ML
Related parts for PIC16F883-E/ML
PIC16F883-E/ML Summary of contents
Page 1
... PIC16F88X Memory Programming Specification This document includes the programming specifications for the following devices: • PIC16F882 • PIC16F883 • PIC16F884 • PIC16F886 • PIC16F887 1.0 PROGRAMMING THE PIC16F88X DEVICES The PIC16F88X can be programmed using the high- voltage In-Circuit Serial Programming™ (ICSP™) method or the low-voltage ICSP method. Both of these can be done with the device in the user’ ...
Page 2
... FIGURE 1-2: PIC16F882/883/886 28-PIN QFN DIAGRAM RA2/AN2/V -/CV /C2IN+ REF REF RA3/AN3/V +/C1IN+ REF RA4/T0CKI/C1OUT RA5/AN4/SS/C2OUT RA7/OSC1/CLKIN RA6/OSC2/CLKOUT DS41287D-page PIC16F882/883/886 RB7/ICSPDAT RB6/ICSPCLK RB5/AN13/T1G RB4/AN11/P1D RB3/AN9/PGM/C12IN2- RB2/AN8/P1B RB1/AN10/P1C/C12IN3- RB0/AN12/INT RC7/RX/DT RC6/TX/CK RC5/SDO RC4/SDI/SDA RB3/AN9/PGM/C12IN2- RB2/AN8/P1B RB1/AN10/P1C/C12IN3- RB0/AN12/INT RC7/RX/DT 2009 Microchip Technology Inc. ...
Page 3
... MCLR/V /RE3 PP RA0/AN0/ULPWU/C12IN0- RA1/AN1/C12IN1- RA2/AN2/V -/CV /C2IN+ REF REF RA3/AN3/V +/C1IN+ REF RA4/T0CKI/C1OUT RA5/AN4/SS/C2OUT RE0/AN5 RE1/AN6 RE2/AN7 RA7/OSC1/CLKIN RA6/OSC2/CLKOUT RC0/T1OSO/T1CKI RC1/T1OSI/CCP2 RC2/CCP1/P1A RC3/SCK/SCL RD0 RD1 2009 Microchip Technology Inc. RB7/ICSPDAT 1 40 RB6/ICSPCLK 39 2 RB5/AN13/T1G 3 38 RB4/AN11 RB3/AN9/PGM/C12IN2- 5 RB2/AN8 6 35 RB1/AN10/C12IN3 RB0/AN12/INT ...
Page 4
... PIC16F88X FIGURE 1-4: PIC16F884/887 44-PIN TQFP DIAGRAM RC7/RX/DT RD4 RD5/P1B RD6/P1C RD7/P1D RB0/AN12/INT RB1/AN10/C12IN3- RB2/AN8 RB3/AN9/PGM/C12IN2- DS41287D-page RC0/T1OSO/T1CKI 2 32 RA6/OSC2/CLKOUT 31 3 RA7/OSC1/CLKIN PIC16F884/887 RE2/AN7 27 7 RE1/AN6 8 26 RE0/AN5 9 25 RA5/AN4/SS/C2OUT RA4/T0CKI/C1OUT 2009 Microchip Technology Inc. ...
Page 5
... FIGURE 1-5: PIC16F884/887 44-PIN QFN DIAGRAM RC7/RX/DT RD4 RD5/P1B RD6/P1C RD7/P1D RB0/AN12/INT RB1/AN10/C12IN3- RB2/AN8 2009 Microchip Technology Inc. 1 RA6/OSC2/CLKOUT 33 2 RA7/OSC1/CLKIN PIC16F884/887 RE2/AN7 27 8 RE1/AN6 26 9 RE0/AN5 25 10 RA5/AN4/SS/C2OUT RA4/T0CKI/C1OUT PIC16F88X DS41287D-page 5 ...
Page 6
... Program Memory Map The user memory space extends from 0x0000-0x07FF for the PIC16F882, 0x0000-0x0FFF PIC16F883/884, and from 0x0000-0x1FFF PIC16F886/887. In Program/Verify mode, the program memory space extends from 0x0000 to 0x3FFF, with the first half being user program memory and the second half (0x2000-0x3FFF) being configuration memory ...
Page 7
... User ID Location 2003 Reserved 2004 Reserved 2005 Device ID 2006 Configuration Word 1 2007 2008 Configuration Word 2 2009 Calibration Word 200A-207F Reserved 2009 Microchip Technology Inc. PIC16F88X 2 KW Implemented 07FF Program Memory Maps to 0-7FF 1FFF 2000 Implemented 2080 Maps to Configuration Memory 2000-203F 3FFF ...
Page 8
... PIC16F88X FIGURE 2-2: PIC16F883/884 PROGRAM MEMORY MAPPING User ID Location 2000 User ID Location 2001 User ID Location 2002 User ID Location 2003 Reserved 2004 Reserved 2005 Device ID 2006 Configuration Word 1 2007 2008 Configuration Word 2 2009 Calibration Word 200A-207F Reserved DS41287D-page Implemented 0FFF Program Memory ...
Page 9
... User ID Location 2002 User ID Location 2003 Reserved 2004 Reserved 2005 Device ID 2006 Configuration Word 1 2007 2008 Configuration Word 2 2009 Calibration Reserved 200A-207F 2009 Microchip Technology Inc. PIC16F88X 8 KW Implemented Program Memory 1FFF 2000 Implemented 2080 Maps to Configuration Memory 2000-203F 3FFF DS41287D-page 9 ...
Page 10
... ICSPCLK does not DD while FIGURE 3- undershoot just PP ICSPDAT ICSPCLK V -FIRST PROGRAM/ PP VERIFY MODE ENTRY PPDP HLD This method of entry is valid, regardless of Configuration Word selected. V -FIRST PROGRAM/ DD VERIFY MODE ENTRY HLD PPDP PROGRAM/VERIFY MODE EXIT T 0 HLD 2009 Microchip Technology Inc. ...
Page 11
... Programming addresses 2 through 9 will create an unexpected result. 2009 Microchip Technology Inc. The sequence for programming eight words of program memory at a time is as follows: 1. Load a word at the current program memory only. DD address using Load Data for Program Memory ...
Page 12
... Memory or Load Data for Configuration Memory command with a data word of all ‘1’s. 2. Issue an Increment Address command. 3. Repeat this sequence three times on the PIC16F883/884 and seven times on the PIC16F886/887 to reset all write latches. DS41287D-page 12 3.2.5 ERASE ALGORITHMS The PIC16F88X will erase different memory locations depending on the Program Counter (PC), CP and CPD values, and which erase command is executed ...
Page 13
... End Programming Bulk Erase Program Memory Bulk Erase Data Memory Row Erase Program Memory 2009 Microchip Technology Inc. During a read operation, the LSb will be transmitted onto ICSPDAT pin on the rising edge of the second cycle. For a load operation, the LSb will be latched on the falling edge of the second cycle ...
Page 14
... After the configuration memory is entered, the only way to get back to the program memory is to exit the Program/Verify mode by taking MCLR low ( DLY strt_bit LSb DLY T 2 DLY strt_bit LSb DLY ). MSb stp_bit T 1 SET T 1 HLD MSb stp_bit T 1 SET T 1 HLD 2009 Microchip Technology Inc. ...
Page 15
... Input mode (high-impedance) after the 16th rising edge. If the program memory is code-protected (CP = 0), the data is read as zeros. FIGURE 3-7: READ DATA FROM PROGRAM MEMORY COMMAND ICSPCLK ICSPDAT T 1 SET T Input 2009 Microchip Technology Inc DLY strt_bit LSb T 1 DLY T 2 DLY ...
Page 16
... Program/Verify mode. FIGURE 3-9: INCREMENT ADDRESS COMMAND (PROGRAM/VERIFY) 1 ICSPCLK 0 ICSPDAT DS41287D-page DLY DLY strt_bit LSb T 1 DLY SET T 1 HLD stp_bit MSb on 9th falling edge Output Input T 2 DLY Next Command DLY 2009 Microchip Technology Inc. ...
Page 17
... Programming (T 2) time and is terminated using an End PROG Programming command. The addressed location is not erased before programming. FIGURE 3-11: BEGIN PROGRAMMING COMMAND (EXTERNALLY TIMED V IHH MCLR 1 ICSPCLK 0 ICSPDAT 2009 Microchip Technology Inc. of the memory SET T 1 HLD ...
Page 18
... All Bulk Erase operations must take place between 4.5V and 5. FIGURE 3-13: BULK ERASE PROGRAM MEMORY COMMAND 1 ICSPCLK 1 ICSPDAT T 1 SET DS41287D-page SET T 1 HLD . SET T 1 HLD T 1 HLD Next Command DIS T ERA Next Command 2009 Microchip Technology Inc. ...
Page 19
... To perform a Row Erase Program Memory, the following sequence must be performed. 1. Execute a Row Erase Program Memory command. 2. Wait T to complete a row erase. ERA FIGURE 3-15: ROW ERASE PROGRAM MEMORY COMMAND 1 ICSPCLK 1 ICSPDAT 2009 Microchip Technology Inc SET T 1 HLD ...
Page 20
... If the device is code-protected or must be completely erased, then Bulk Erase device per Figure 3-21. DS41287D-page 20 Begin Programming Command (Internally timed) Report No Programming Wait T Failure Program Cycle Load Data for Program Memory Begin Programming Command (Externally timed) Wait PROG PROG End Programming Wait T DIS 2009 Microchip Technology Inc. ...
Page 21
... Verification in Four-Word mode is accomplished after programming by reading back the entire memory. 3: This step is optional if the data memory does not require updates the device is code-protected or must be completely erased, then Bulk Erase device per Figure 3-21. 2009 Microchip Technology Inc. PIC16F88X Program Cycle ...
Page 22
... Command Load Data Latch 2 for Program Memory Increment Address Command Load Data Latch 8 for Program Memory Begin Begin Programming Programming Command Command (Internally timed) (Externally timed) Wait T 2 Wait T 1 PROG PROG End Programming Wait T DIS 2009 Microchip Technology Inc. ...
Page 23
... Yes Increment Address Command No Yes Address = 0x2004? Note: Ensure that a device Bulk Erase has been performed or that the device is blank prior to programming the configuration memory. 2009 Microchip Technology Inc. Begin Programming Command (Internally timed) Wait T PROG Report Programming Failure Increment ...
Page 24
... Address Done? Command Done DS41287D-page 24 Programming (Internally timed) Wait T Report No Programming Failure Yes Yes Program Cycle Load Data for Data Memory Begin Begin Programming Command Command (Externally timed) 1 Wait T 2 PROG PROG End Programming Wait T DIS 2009 Microchip Technology Inc. ...
Page 25
... FIGURE 3-21: PROGRAM FLOWCHART – ERASE FLASH DEVICE 2009 Microchip Technology Inc. PIC16F88X Start Read and Store Calibration Memory Values (Figure 3-22) Bulk Erase Program Memory Load Configuration Bulk Erase Program Memory Bulk Erase Data Memory Read and Verify Calibration Memory ...
Page 26
... The device should not be used if verification of the Calibration Word locations fails. This information should be reported to the user through the user interface of the device programmer. DS41287D-page 26 Start Load Configuration Increment Address Command No Address = 0x2009? Yes Read and Store Calibration Word Calibration No Word Fail (1,2) is Valid? Yes Done 2009 Microchip Technology Inc. ...
Page 27
... If the device Master Clear is disabled, verify that either of the following is done to ensure proper entry into ICSP mode: a) disable Low-Voltage Programming (Config Word 1<12> make certain that RB3/PGM is held low during entry into ICSP. 2009 Microchip Technology Inc. to the IHH PIC16F88X DS41287D-page 27 ...
Page 28
... CPD: Data EE Memory Code Protection bit 1 = Code protection off 0 = Data EE memory code-protected bit 6 CP: Flash Program Memory Code Protection bit PIC16F886/887 1 = Code protection off 0 = 0000h to 1FFFh code protection on PIC16F883/884 1 = Code protection off 0 = 0000h to 0FFFh code protection on bit 5 MCLRE: MCLR MCLR/V /RE3 pin function is MCLR ...
Page 29
... EECON control 10 = 0000h to 00FFh write-protected, 0100h to 1FFFh may be modified by EECON control 11 = Write protection off PIC16F883/884 00 = 0000h to 07FFh write-protected, 0800h to 0FFFh may be modified by EECON control 01 = 0000h to 03FFh write-protected, 0400h to 0FFFh may be modified by EECON control 10 = 0000h to 00FFh write-protected, 0100h to 0FFFh may be modified by EECON control ...
Page 30
... Device ID Word The device ID word for the PIC16F88X is located at 2006h. This location cannot be erased. TABLE 4-1: DEVICE ID VALUES Device ID Values Device Dev PIC16F882 10 0000 000 PIC16F883 10 0000 001 PIC16F884 10 0000 010 PIC16F886 10 0000 011 PIC16F887 10 0000 100 DS41287D-page 30 R/P-1 R/P-1 ...
Page 31
... Specifically for the PIC16F88X, the data memory should also be embedded in the hex file (see Section 5.3.2 “Embedding Data Memory Contents In Hex File”). Microchip Technology Incorporated feels strongly that this feature is important for the benefit of the end customer. 2009 Microchip Technology Inc. ...
Page 32
... Code Device Protect PIC16F882 SUM[0x0000:0x07FF] + (CFG1 & 0x3FFF) + (CFG2 & 0x0700 (CFG1 & 0x3FFF) + (CFG2 & 0x0700) + SUM_ID PIC16F883 SUM[0x0000:0x0FFF] + (CFG1 & 0x3FFF) + (CFG2 & 0x0700 (CFG1 & 0x3FFF) + (CFG2 & 0x0700) + SUM_ID PIC16F884 SUM[0x0000:0x0FFF] + (CFG1 & 0x3FFF) + (CFG2 & 0x0700 (CFG1 & ...
Page 33
... PROG timed) Programming cycle time (externally T 2 PROG timed) Time delay from program to compare T DIS (HV discharge time) 2009 Microchip Technology Inc. Standard Operating Conditions (unless otherwise stated) -40°C T Operating Temperature 4.5V V Operating Voltage Min Typ Max 2.0 — ...
Page 34
... Section 5.3.1 (paragraph 1); Table 6-1 (T and max). Revision C (03/07) Added the PIC16F882 device. Revision D (12/09) Updated sections 2.3, 3.2.3, 3.2.4, 3.2.5, 3.2.6.1; Updated Figures 3-16, 3-17, 3-18, 3-19, 3-21; Added Figure 3-22 . DS41287D-page 34 1 min PROG 2009 Microchip Technology Inc. ...
Page 35
... REAL ICE, rfLAB, Select Mode, Total Endurance, TSHARC, UniWinDriver, WiperLock and ZENA are trademarks of Microchip Technology Incorporated in the U.S.A. and other countries. SQTP is a service mark of Microchip Technology Incorporated in the U.S.A. All other trademarks mentioned herein are property of their respective companies. ...
Page 36
... Fax: 886-3-6578-370 Taiwan - Kaohsiung Tel: 886-7-536-4818 Fax: 886-7-536-4803 Taiwan - Taipei Tel: 886-2-2500-6610 Fax: 886-2-2508-0102 Thailand - Bangkok Tel: 66-2-694-1351 Fax: 66-2-694-1350 2009 Microchip Technology Inc. EUROPE Austria - Wels Tel: 43-7242-2244-39 Fax: 43-7242-2244-393 Denmark - Copenhagen Tel: 45-4450-2828 Fax: 45-4485-2829 France - Paris Tel: 33-1-69-53-63-20 ...