English
Language : 

PIC16LF145X Datasheet, PDF (29/38 Pages) Microchip Technology – PIC16(L)F145X Memory Programming Specification
PIC16(L)F145X
EXAMPLE 7-2:
CHECKSUM COMPUTED WITH PROGRAM CODE PROTECTION DISABLED
(CP = 1), PIC16LF1459, 00AAh AT FIRST AND LAST ADDRESS
PIC16LF1459 Sum of Memory addresses 0000h-1FFFh
Configuration Word 1
Configuration Word 1 mask
Configuration Word 2
6156h(1)
3FFFh(2)
3EFFh(3)
3FFFh(4)
Configuration Word 2 mask
3FF3h(5)
Checksum = 6156h + (3FFFh and 3EFFh) + (3FFFh and 3FF3h)(6)
= 6156h + 3EFFh + 3FF3h
= E048h
Note 1:
2:
3:
4:
5:
6:
This value is obtained by taking the total number of program memory locations (0x000 to 0x1FFFh
which is 2000h) subtracting 2h which yields 1EFFh, then multiplying it by the blank memory value of
0x3FFF to get the sum of 7FF 6002h. Then, truncate to 16 bits the value of 6002h. Now add 00AAh
(00AAh + 00AAh) to 6002h to get the final value of 6156h.
This value is obtained by making all bits of the Configuration Word 1 a ‘1’, then converting it to hex, thus
having a value of 3FFFh.
This value is obtained by making all used bits of the Configuration Word 1 a ‘1’, then converting it to hex,
thus having a value of 3EFFh.
This value is obtained by making all bits of the Configuration Word 2 a ‘1’, then converting it to hex, thus
having a value of 3FFFh.
This value is obtained by making all used bits of the Configuration Word 2 a ‘1’, then converting it to hex,
thus having a value of 3FF3h.
This value is obtained by ANDing the Configuration Word value with the Configuration Word Mask Value
and adding it to the sum of memory addresses: (3FFFh and 3EFFh) + (3FFFh and 3FF3h) + 6156h =
E048h. Then, truncate to 16 bits, thus having a final value of E048h.
 2011-2012 Microchip Technology Inc.
Advance Information
DS41620C-page 29