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
7.4.2
PROGRAM CODE PROTECTION
ENABLED
With the program code protection enabled, the
checksum is computed in the following manner: The
Least Significant nibble of each User ID is used to
create a 16-bit value. The masked value of User ID
location 8000h is the Most Significant nibble. This Sum
of User IDs is summed with the Configuration Words
(all unimplemented Configuration bits are masked to
0’).
Note: Data memory does not effect the
checksum.
EXAMPLE 7-3:
CHECKSUM COMPUTED WITH PROGRAM CODE PROTECTION ENABLED
PIC16F1827, BLANK DEVICE
PIC16F1827
Configuration Word 1
Configuration Word 1 mask
Configuration Word 2
3F7Fh
3FFFh
3FFFh
Configuration Word 2 mask
3713h
User ID (8000h)
0006h
User ID (8001h)
0007h
User ID (8002h)
0001h
User ID (8003h)
0002h
Sum of User IDs = (0006h and 000Fh) << 12 + (0007h and 000Fh) << 8 +
(0001h and 000Fh) << 4 + (0002h and 000Fh)
= 6000h + 0700h + 0010h + 0002h
= 6712h
Checksum
= (3F7Fh and 3FFFh) + (3FFFh and 3713h) + Sum of User IDs
= 3F7Fh +3713h + 6712h
= DDA4h
EXAMPLE 7-4:
CHECKSUM COMPUTED WITH PROGRAM CODE PROTECTION ENABLED
PIC16LF1827, 00AAh AT FIRST AND LAST ADDRESS
PIC16LF1827
Configuration Word 1
3F7Fh
Configuration Word 1 mask
3FFFh
Configuration Word 2
3FFFh
Configuration Word 2 mask
3703h
User ID (8000h)
000Eh
User ID (8001h)
0008h
User ID (8002h)
0005h
User ID (8003h)
0008h
Sum of User IDs = (000Eh and 000Fh) << 12 + (0008h and 000Fh) << 8 +
(0005h and 000Fh) << 4 + (0008h and 000Fh)
= E000h + 0800h + 0050h + 0008h
= E858h
Checksum
= (3F7Fh and 3FFFh) + (3FFFh and 3703h) + Sum of User IDs
= 3F7Fh +3703h + E858h
= 5EDAh
2010 Microchip Technology Inc.
Advance Information
DS41390C-page 31
Share Link: GO URL

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