| Electronic Components Datasheet Search |
|
PIC16F87 Datasheet(PDF) 10 Page - Microchip Technology |
|
|
|||||||||||||||||||||||||||||
PIC16F87 Datasheet(HTML) 10 Page - Microchip Technology |
|
10 / 24 page ![]() PIC16F87/88 DS39607B-page 10 2002 Microchip Technology Inc. 3.5 Erasing Program and Data Memory Depending on the state of the code protection bits, program and data memory will be erased using different methods. The first two commands are used when both program and data memories are not code protected. The third command is used when either memory is code protected, or if you want to also erase the code protect bits. A device programmer should determine the state of the code protection bits and then apply the proper command to erase the desired memory. 3.5.1 ERASING PROGRAM AND DATA MEMORY When both program and data memories are not code- protected, they can be individually erased by the following ‘Bulk Erase’ commands. If it is desired to erase both program and data memory with a single command, the ‘Chip Erase’ command must be used whether code protection is disabled or enabled (detailed in Section 3.5.1.3 “Chip Erase”). 3.5.1.1 Bulk Erase Program Memory When this command is performed, and is followed by a ‘Begin Erase’ command, the entire program memory will be erased. If the address is pointing to user memory, only the user memory will be erased. If the address is pointing to the configuration memory (2000h-2008h), then both the user memory and the configuration memory will be erased. The configuration words will not be erased, even if the address is pointing to location 2007h. Previously, a load data with 0FFh command was recommended before any ‘Bulk Erase’. On these devices, this will not be required. The ‘Bulk Erase’ command is disabled when the CP bit is programmed to ‘0’, enabling code-protect. A timing diagram for this command is shown in Figure 7-8. 3.5.1.2 Bulk Erase Data Memory When this command is performed, and is followed by a ‘Begin Erase’ command, the entire data memory will be erased. The ‘Bulk Erase Data’ command is disabled when the CPD bit is programmed to ‘0’, enabling protected data memory. A timing diagram for this command is shown in Figure 7-9. 3.5.1.3 Chip Erase This command, when performed, will erase the program memory, EE data memory, and all of the code protection bits. All on-chip Flash and EEPROM memory is erased, regardless of the address contained in the PC. When a Chip Erase command is issued and the PC points to (0000h-1FFFh), the configuration words (2007h and 2008h) and the user program memory will be erased. When a Chip Erase command is issued and the PC points to (2000h-2008h), all of the configuration memory, program memory, and data memory will be erased. The Chip Erase is internally self-timed to ensure that all program and data memory are erased before the code protect bits are erased. A timing diagram for this command is shown in Figure 7-10. 3.5.2 ERASING CODE-PROTECTED MEMORY For the PIC16F87/88 devices, once code protection is enabled, all protected program and data memory locations read all '0's and further programming is disabled. The ID locations and configuration words read out unscrambled and can be reprogrammed normally. The only command to erase a code-protected PIC16F87/88 device is the ‘Chip Erase’. This erases program memory, data memory, configuration bits and ID locations, as described in Section 3.5.1.3 “Chip Erase”. Since all data within the program and data memory will be erased when this command is executed, the security of the data or code is not compromised. Note: All ‘Bulk Erase’ operations must take place at the 4.5V to 5.5V VDD range. Note: The Chip Erase operation must take place at the 4.5V to 5.5V VDD range. |
|
|
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 |
| 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 |