PIC16F874A-E/ML Microchip Technology, PIC16F874A-E/ML Datasheet
PIC16F874A-E/ML
Specifications of PIC16F874A-E/ML
Related parts for PIC16F874A-E/ML
PIC16F874A-E/ML Summary of contents
Page 1
... Flash Memory Programming Specification This document includes programming specifications for the following devices: • PIC16F873A • PIC16F876A • PIC16F874A • PIC16F877A 1.0 PROGRAMMING THE PIC16F87XA The PIC16F87XA is programmed using a serial method. The Serial mode will allow the PIC16F87XA to be programmed while in the user’s system. This allows for increased design flexibility ...
Page 2
... MCLR does not draw any significant current. DS39589C-page 2 During Programming Pin Type I Low voltage ICSP™ programming input if LVP configuration bit equals ‘1’ I Clock input I/O Data input/output P* Program Mode Select P Power Supply P Ground Advance Information Pin Description 2010 Microchip Technology Inc. ...
Page 3
... The amount of data EEPROM memory depends on the device and is shown below in number of bytes. Device PIC16F873A PIC16F874A PIC16F876A PIC16F877A The contents of data EEPROM memory have the capa- bility to be embedded into the HEX file. The programmer should be able to read data EEPROM ...
Page 4
... Implemented Implemented Implemented Implemented Implemented Implemented Implemented Reserved Implemented Implemented Implemented Reserved Reserved Reserved Reserved Advance Information 000h 3FFh 400h 7FFh 800h BFFh C00h FFFh 1000h 13FFh 1400h 17FFh 1800h 1BFFh 1C00h 1FFFh 2008h 2100h 3FFFh 2010 Microchip Technology Inc. ...
Page 5
... Issue an ‘End Programming’ command. 5. Increment to the next address. 6. Repeat this alternative sequence as required to write program and configuration memory. 2010 Microchip Technology Inc. The address and program counter are reset to 0000h by resetting the device (taking MCLR below V re-entering Programming mode. Program and configu ration memory may then be read or verified using the ‘ ...
Page 6
... The configuration word will not be written unless the address is specifically pointing to 2007h. A timing diagram for this command is shown in Figure 6-7. Advance Information Begin Erase/Program Cycle range of the device. DD range. DD Begin Programming Only range. DD 2010 Microchip Technology Inc. ...
Page 7
... Read Data from Program Memory Increment Address Begin Erase/Programming Cycle Begin Programming Only Cycle Bulk Erase Program Memory Bulk Erase Data Memory Chip Erase Load Data for Data Memory Read Data from Data Memory End Programming 2010 Microchip Technology Inc. Mapping (MSB … LSB ...
Page 8
... Chip Erase command. This allows the user to erase all program and configu- ration content, including the code-protect bits, without compromising the user ID bits (2000h through 2004h), or any pass codes stored in the test row. Advance Information range. DD 2010 Microchip Technology Inc. ...
Page 9
... ALGORITHM 1 FLOWCHART – PROGRAM MEMORY (2.0V V FIGURE 2-2: Increment Address Command Increment Address Command Report Verify Error 2010 Microchip Technology Inc. A timing diagram for this command is shown in Figure 6-10. Note: The Chip Erase operation must take place at the 4.5V to 5.5V V Start Set ...
Page 10
... DDP Load Data Command No Eight Loads Done? Yes Begin Programming Only Command Wait tprog1 (1 ms) End Programming Command Yes No All Locations Done? Report Verify Error Advance Information 5.5V) DD Verify all Locations No Data Correct? Yes End 2010 Microchip Technology Inc. ...
Page 11
... Yes Increment Address Command Increment Address Command Increment Address Command Report Program No Configuration Data Correct? Word Error Yes End 2010 Microchip Technology Inc. Load Configuration Data Read Data Increment Command Address Command No Data Correct? Yes Address = 2003h? Yes No Increment Address ...
Page 12
... PROGRAM FOUR LOCATIONS Start Load Data Command No Four Loads Done? Yes Begin Program Only Command Wait tprog1 (1 ms) End Programming Command End PROGRAM CONFIGURATION WORD Start Load Data Command Begin Erase/Program Command Wait tprog2 (8 ms) End 2010 Microchip Technology Inc. ...
Page 13
... FOSC<1:0>: Oscillator Selection bits oscillator oscillator oscillator oscillator Legend Readable bit W = Writable bit -n = Default value 1 = Bit is erased 2010 Microchip Technology Inc. TABLE 3-1: Device PIC16F873A PIC16F874A PIC16F876A PIC16F877A R/P-1 R/P-1 R/P-1 U-1 U-1 CPD LVP BOREN — — Unimplemented bit, read as ‘1’ ...
Page 14
... An option to not include this information may be provided. Specifically for the PIC16F87XA, the EEPROM data memory should also be embedded in the HEX file (see Section 2.2). Microchip Technology Inc. feels strongly that this feature is important for the benefit of the end customer. DS39589C-page 14 Advance Information ...
Page 15
... Masked ID locations (when applicable) TABLE 5-1: CHECKSUM COMPUTATION Code Device Protect PIC16F873A OFF SUM[0000:0FFF] + (CFGW & 2FCF) ON (CFGW & 2FCF) + SUM_ID PIC16F874A OFF SUM[0000:0FFF] + (CFGW & 2FCF) ON (CFGW & 2FCF) + SUM_ID PIC16F876A OFF SUM[0000:1FFF] + (CFGW & 2FCF) ON (CFGW & 2FCF) + SUM_ID PIC16F877A OFF SUM[0000:1FFF] + (CFGW & ...
Page 16
... Units Conditions/Comments Externally Timed ms Internally Timed ms Internally Timed V s V Schmitt Trigger input V Schmitt Trigger input ns s 2.0V V < 4.5V DD 4.5V V 5. s 2.0V V < 4.5V DD 4.5V V 5. 2010 Microchip Technology Inc. ...
Page 17
... FIGURE 6-3: READ DATA FROM PROGRAM MEMORY COMMAND (PROGRAM/VERIFY) V IHH MCLR tset0 thld0 RB6 (CLOCK) RB7 (DATA) tset1 thld1 100 ns min RESET 2010 Microchip Technology Inc. 1 s min tdly2 0 0 strt_bit X tdly1 1 s min 100 ns min Program/Verify Test Mode 1 s min ...
Page 18
... Program/Verify Test Mode tset1 thld1 100 ns min Program/Verify Test Mode tset1 thld1 100 ns min Program/Verify Test Mode Advance Information tdly3 bit 13 RB7 input RB7 = output tdly2 Next Command 1 s min tdly1 1 s min tprog2 Next Command tdly1 2010 Microchip Technology Inc. ...
Page 19
... BULK ERASE PROGRAM MEMORY COMMAND (PROGRAM/VERIFY) V IHH MCLR 1 RB6 (CLOCK) RB7 1 (DATA) RESET FIGURE 6-9: BULK ERASE DATA MEMORY COMMAND (PROGRAM/VERIFY) V IHH MCLR 1 RB6 (CLOCK) RB7 1 (DATA) RESET 2010 Microchip Technology Inc. tprog1 tdly2 1 s min tset1 thld1 100 ns min Program/Verify Test Mode ...
Page 20
... PIC16F87XA FIGURE 6-10: CHIP ERASE COMMAND (PROGRAM/VERIFY) V IHH MCLR 1 RB6 (CLOCK) RB7 1 (DATA) tset1 100 ns min RESET DS39589C-page thld1 Program/Verify Test Mode Advance Information tprog3 Next Command tdly1 2010 Microchip Technology Inc. ...
Page 21
... 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 22
... France - Paris Tel: 33-1-69-53-63-20 Fax: 33-1-69-30-90-79 Germany - Munich Tel: 49-89-627-144-0 Fax: 49-89-627-144-44 Italy - Milan Tel: 39-0331-742611 Fax: 39-0331-466781 Netherlands - Drunen Tel: 31-416-690399 Fax: 31-416-690340 Spain - Madrid Tel: 34-91-708-08-90 Fax: 34-91-708-08- Wokingham Tel: 44-118-921-5869 Fax: 44-118-921-5820 01/05/10 2010 Microchip Technology Inc. ...