DatasheetQ Logo
Electronic component search and free download site. Transistors,MosFET ,Diode,Integrated circuits

PIC16F1829 View Datasheet(PDF) - Microchip Technology

Part Name
Description
Manufacturer
PIC16F1829 Datasheet PDF : 40 Pages
First Prev 21 22 23 24 25 26 27 28 29 30 Next Last
PIC16F/LF182X/PIC12F/LF1822
7.4 Checksum Computation
The checksum is calculated by two different methods
dependent on the setting of the CP Configuration bit.
TABLE 7-1:
Device
PIC16F1826
PIC16F1827
PIC16LF1826
PIC16LF1827
PIC12F1822
PIC12LF1822
PIC16F1823
PIC16LF1823
PIC16F1824
PIC16LF1824
PIC16F1825
PIC16LF1825
PIC16F1828
PIC16LF1828
PIC16F1829
PIC16LF1829
CONFIGURATION WORD
MASK VALUES
Config. Word 1 Config. Word 2
Mask
Mask
3FFFh
3FFFh
3FFFh
3FFFh
3FFFh
3FFFh
3FFFh
3FFFh
3FFFh
3FFFh
3FFFh
3FFFh
3FFFh
3FFFh
3FFFh
3FFFh
3713h
3713h
3703h
3703h
3713h
3713h
3713h
3713h
3713h
3713h
3713h
3713h
3713h
3713h
3713h
3713h
7.4.1
PROGRAM CODE PROTECTION
DISABLED
With the program code protection disabled, the
checksum is computed by reading the contents of the
PIC16F/LF182X and PIC12F/LF1822 program memory
locations and adding up the program memory data
starting at address 0000h, up to the maximum user
addressable location. Any Carry bit exceeding 16 bits
are ignored. Additionally, the relevant bits of the
Configuration Words are added to the checksum. All
unimplemented Configuration bits are masked to ‘0’.
Note: Data memory does not effect the
checksum.
EXAMPLE 7-1:
CHECKSUM COMPUTED WITH PROGRAM CODE PROTECTION DISABLED
PIC16F1827, BLANK DEVICE
PIC16F1827 Sum of Memory addresses 0000h-0FFFh
F000h
Configuration Word 1
3FFFh
Configuration Word 1 mask
3FFFh
Configuration Word 2
Configuration Word 2 mask
3FFFh
3713h
Checksum
= F000h + (3FFFh and 3FFFh) + (3FFFh and 3713h)
= F000h + 3FFFh + 3713h
= 6712h
EXAMPLE 7-2:
CHECKSUM COMPUTED WITH PROGRAM CODE PROTECTION DISABLED
PIC16LF1827, 00AAh AT FIRST AND LAST ADDRESS
PIC16LF1827
Sum of Memory addresses 0000h-0FFFh
Configuration Word 1
Configuration Word 1 mask
Configuration Word 2
7156h
3FFFh
3FFFh
3FFFh
Configuration Word 2 mask
3703h
Checksum = 7156h + (3FFFh and 3FFFh) + (3FFFh and 3703h)
= 7156h + 3FFFh + 3703h
= E858h
DS41390C-page 30
Advance Information
2010 Microchip Technology Inc.

Share Link: 

datasheetq.com  [ Privacy Policy ]Request Datasheet ] [ Contact Us ]