Electronic Components Datasheet Search
  English  ▼
ALLDATASHEET.NET

X  

PIC16F874 Datasheet(PDF) 7 Page - Microchip Technology

Part # PIC16F874
Description  EEPROM Memory Programming Specification
PDF  22 Pages
Scroll/Zoom Zoom In 100%  Zoom Out
Manufacturer  MICROCHIP [Microchip Technology]
Direct Link  http://www.microchip.com
Logo MICROCHIP - Microchip Technology

PIC16F874 Datasheet(HTML) 7 Page - Microchip Technology

Back Button PIC16F874 Datasheet HTML 3Page - Microchip Technology PIC16F874 Datasheet HTML 4Page - Microchip Technology PIC16F874 Datasheet HTML 5Page - Microchip Technology PIC16F874 Datasheet HTML 6Page - Microchip Technology PIC16F874 Datasheet HTML 7Page - Microchip Technology PIC16F874 Datasheet HTML 8Page - Microchip Technology PIC16F874 Datasheet HTML 9Page - Microchip Technology PIC16F874 Datasheet HTML 10Page - Microchip Technology PIC16F874 Datasheet HTML 11Page - Microchip Technology Next Button
Zoom Inzoom in Zoom Outzoom out
 7 / 22 page
background image
 2002 Microchip Technology Inc.
DS39025F-page 7
PIC16F87X
2.5
Erasing Program and Data
Memory
Depending on the state of the code protection bits, pro-
gram and data memory will be erased using different
procedures. The first set of procedures is used when
both program and data memories are not code pro-
tected. The second set of procedures must be used
when either memory is code protected. A device pro-
grammer should determine the state of the code pro-
tection bits and then apply the proper procedure to
erase the desired memory.
2.5.1
ERASING NON-CODE PROTECTED
PROGRAM AND DATA MEMORY
When both program and data memories are not code
protected, they must be individually erased using the
following procedures. The only way that both memories
are erased using a single procedure is if code protec-
tion is enabled for one of the memories. These proce-
dures do not erase the configuration word or ID
locations.
Procedure to bulk erase program memory:
1.
Execute a Load Data for Program Memory com-
mand (000010) with a ’1’ in all locations
(0x3FFF)
2.
Execute
a
Bulk
Erase
Setup1
command
(000001)
3.
Execute
a
Bulk
Erase
Setup2
command
(000111)
4.
Execute a Begin Erase/Programming command
(001000)
5.
Wait 8 ms
6.
Execute
a
Bulk
Erase
Setup1
command
(000001)
7.
Execute
a
Bulk
Erase
Setup2
command
(000111)
Procedure to bulk erase data memory:
1.
Execute a Load Data for Data Memory com-
mand (000011) with a ’1’ in all locations
(0x3FFF)
2.
Execute
a
Bulk
Erase
Setup1
command
(000001)
3.
Execute
a
Bulk
Erase
Setup2
command
(000111)
4.
Execute a Begin Erase/Programming command
(001000)
5.
Wait 8 ms
6.
Execute
a
Bulk
Erase
Setup1
command
(000001)
7.
Execute
a
Bulk
Erase
Setup2
command
(000111)
2.5.2
ERASING CODE PROTECTED
MEMORY
For the PIC16F87X devices, once code protection is
enabled, all protected program and data memory loca-
tions read all ’0’s and further programming is disabled.
The ID locations and configuration word read out
unscrambled and can be reprogrammed normally. The
only procedure to erase a PIC16F87X device that is
code protected is shown in the following procedure.
This method erases program memory, data memory,
configuration bits and ID locations. Since all data
within the program and data memory will be erased
when this procedure is executed, the security of
the data or code is not compromised.
1.
Execute
a
Load
Configuration
command
(000000) with a ’1’ in all locations (0x3FFF)
2.
Execute
Increment
Address
command
(000110) to set address to configuration word
location (0x2007)
3.
Execute
a
Bulk
Erase
Setup1
command
(000001)
4.
Execute
a
Bulk
Erase
Setup2
command
(000111)
5.
Execute a Begin Erase/Programming command
(001000)
6.
Wait 8 ms
7.
Execute
a
Bulk
Erase
Setup1
command
(000001)
8.
Execute
a
Bulk
Erase
Setup2
command
(000111)



Html Pages

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22


Datasheet Download

Go To PDF Page


Link URL



Does ALLDATASHEET help your business so far?  [ DONATE ] 

About Alldatasheet   |   Advertisement   |   Contact us   |   Privacy Policy   |   Link to Datasheet    |   Link Exchange   |   Manufacturer List
All Rights Reserved©Alldatasheet.com


Mirror Sites
English : Alldatasheet.com  |   English : Alldatasheet.net  |   Chinese : Alldatasheetcn.com  |   German : Alldatasheetde.com  |   Japanese : Alldatasheet.jp
Russian : Alldatasheetru.com  |   Korean : Alldatasheet.co.kr  |   Spanish : Alldatasheet.es  |   French : Alldatasheet.fr  |   Italian : Alldatasheetit.com
Portuguese : Alldatasheetpt.com  |   Polish : Alldatasheet.pl  |   Vietnamese : Alldatasheet.vn
Indian : Alldatasheet.in  |   Mexican : Alldatasheet.com.mx  |   British : Alldatasheet.co.uk  |   New Zealand : Alldatasheet.co.nz
Family Site : ic2ic.com  |   icmetro.com