PIC18F:
PIC18Fxxxx family microcontrollers have several code and data protection mechanisms, which are implemented using configuration bits set during device programming.
The primary protection mechanism in PIC18Fxxxx is read protection of the program memory. This prevents the firmware from being read from the device via a programmer. Protection is enabled for different memory blocks separately. If a protection bit is set (programmed to '0'), the corresponding memory block cannot be read externally.
Code Protection Bits:
Bit
Description
Unprotection:
To disable read protection, a full Chip Erase must be performed using a programmer. This operation irreversibly erases all program memory and EEPROM data. After erasing, new configuration bit values can be programmed to disable the protection.
Write protection prevents the modification of memory contents during application execution. Like read protection, it is configured for different memory areas. If a write protection bit is set, any attempt to write to the corresponding block will be ignored.
Write Protection Bits:
Bit
Description
Configuration bits are special memory locations that define the key operating parameters of the microcontroller. They are read on reset and cannot be modified by software during operation (unless the WRTC bit is cleared).
Configuration Registers Location:
Address Register
Key Security-Related Configuration Bits:
LVP (Low-Voltage ICSP Enable bit): Enables Low-Voltage In-Circuit Serial Programming mode. When this mode is enabled, the PGM pin becomes active, and a high voltage on the MCLR pin is not required to enter programming mode. For enhanced security, it is recommended to disable this mode (LVP=0).
MCLRE (MCLR Pin Enable bit): Determines whether the MCLR pin will be used as an external reset line or as a regular digital input. Configuring this pin as an input can make it more difficult to control the device with a programmer.
PIC18Fxxxx microcontrollers have unique identifiers that can be used for serial numbers, tying firmware to a specific device, or for cryptographic purposes.
ID Locations:
Address Description
The Device IDs are unique to each PIC model and also contain information about the silicon revision. The User IDs can be programmed once to store any information, such as a serial number.
Microchip Technology
Ask your question: RussianSemiResearch@ya.ru
E-mail: RussianSemiResearch@ya.ru