Qdatasheet_Logo
Integrated circuits, Transistor, Semiconductors Search and Datasheet PDF Download Site

PIC16F View Datasheet(PDF) - Microchip Technology

Part Name
Description
MFG CO.
'PIC16F' PDF : 40 Pages View PDF
PIC16F/LF182X/PIC12F/LF1822
6.0 CODE PROTECTION
Code protection is controlled using the CP bit in
Configuration Word 1. When code protection is
enabled, all program memory locations (0000h-7FFFh)
read as all ‘0’. Further programming is disabled for the
program memory (0000h-7FFFh).
Data memory is protected with its own code-protect bit
(CPD). When data code-protection is enabled (CPD = 0),
all data memory locations read as ‘0’. Further
programming is disabled for the data memory. Data
memory can still be programmed and read during
program execution.
The user ID locations and Configuration Words can be
programmed and read out regardless of the code
protection settings.
6.1 Program Memory
Code protection is enabled by programming the CP bit
in Configuration Word 1 register to ‘0’.
The only way to disable code protection is to use the
Bulk Erase Program Memory command.
6.2 Data Memory
Data memory protection is enabled by programming
the CPD bit in Configuration Word 1 register to ‘0’.
The only way to disable code protection is to use the
Bulk Erase Program Memory command.
Note:
To ensure system security, if CPD bit = 0,
the Bulk Erase Program Memory command
will also erase data memory.
7.0 HEX FILE USAGE
In the hex file there are two bytes per program word
stored in the Intel® INHX32 hex format. Data is stored
LSB first, MSB second. Because there are two bytes
per word, the addresses in the hex file are 2x the
address in program memory. (Example: Configuration
Word 1 is stored at 8007h on the PIC16F/LF182X and
PIC12F/LF1822. In the hex file this will be referenced
as 1000Eh-1000Fh).
7.1 Configuration Word
To allow portability of code, it is strongly recommended
that the programmer is able to read the Configuration
Words and user ID locations from the hex file. If the
Configuration Words information was not present in the
hex file, a simple warning message may be issued.
Similarly, while saving a hex file, Configuration Words
and user ID information should be included.
7.2 Device ID and Revision
If a device ID is present in the hex file at 1000Ch-
1000Dh (8006h on the part), the programmer should
verify the device ID (excluding the revision) against the
value read from the part. On a mismatch condition the
programmer should generate a warning message.
7.3 Data EEPROM
The programmer should be able to read data memory
information from a hex file and write data memory
contents to a hex file.
The physical address range of the 256 byte data
memory is 0000h-00FFh. However, these addresses
are logically mapped to address 1E000h-1E1FFh in the
hex file. This provides a way of differentiating between
the data and program memory locations in this range.
The format for data memory storage is one data byte
per address location, LSb aligned.
2010 Microchip Technology Inc.
Advance Information
DS41390C-page 29
Share Link: GO URL

All Rights Reserved © qdatasheet.com  [ Privacy Policy ] [ Contact Us ]