Electronic Components Datasheet Search
  English  ▼
ALLDATASHEET.NET

X  

PIC16F72 Datasheet(PDF) 10 Page - Microchip Technology

Part # PIC16F72
Description  FLASH Memory Programming Specification
PDF  14 Pages
Scroll/Zoom Zoom In 100%  Zoom Out
Manufacturer  MICROCHIP [Microchip Technology]
Direct Link  http://www.microchip.com
Logo MICROCHIP - Microchip Technology

PIC16F72 Datasheet(HTML) 10 Page - Microchip Technology

Back Button PIC16F72 Datasheet HTML 6Page - Microchip Technology PIC16F72 Datasheet HTML 7Page - Microchip Technology PIC16F72 Datasheet HTML 8Page - Microchip Technology PIC16F72 Datasheet HTML 9Page - Microchip Technology PIC16F72 Datasheet HTML 10Page - Microchip Technology PIC16F72 Datasheet HTML 11Page - Microchip Technology PIC16F72 Datasheet HTML 12Page - Microchip Technology PIC16F72 Datasheet HTML 13Page - Microchip Technology PIC16F72 Datasheet HTML 14Page - Microchip Technology  
Zoom Inzoom in Zoom Outzoom out
 10 / 14 page
background image
PIC16F72
DS39588A-page 10
Preliminary
 2002 Microchip Technology Inc.
4.0
CODE PROTECTION
Once code protection is enabled, all program memory
locations read all ‘0’s; further programming of program
memory is disabled. ID locations and the configuration
word may still be read and programmed (1’s to 0’s
only).
4.1
Disabling Code Protection
The following procedure should be performed before
any other programming is attempted. This procedure
also turns off code protection (code protect bit = 1);
however, all program memory will be erased when
this procedure is executed and thus, the security of
the code is not compromised.
Procedure to disable code protection:
a)
Issue the ‘Chip Erase’ command.
b)
Wait for the erase cycle time (tera) to pass. The
program memory is erased, then the configura-
tion memory is erased.
4.2
Embedding Configuration Word and ID Information in the HEX File
4.3
Checksum Computation
The checksum is calculated by reading the contents of
the PIC16F72 memory locations and adding up the
opcodes, up to the maximum user addressable location
(i.e., 0x07FFh for the PIC16F72). Any carry bits exceed-
ing 16 bits are neglected. Finally, the configuration word
(appropriately masked) is added to the checksum.
The checksum is calculated by summing the following:
• The contents of all program memory locations
• The configuration word, appropriately masked
• Masked ID locations (when applicable)
The Least Significant 16 bits of this sum are the
checksum.
Table 4-1 describes how to calculate the checksum for
the PIC16F72. Note that the checksum calculation dif-
fers depending on the code protection setting. Since
the program memory locations read out differently
depending on the code protection setting, the table
describes how to manipulate the actual program mem-
ory values to simulate the values that would be read
from a protected device. When calculating a checksum
of a non-protected device, the entire program memory
can simply be read and summed. The configuration
word and ID locations can always be read.
TABLE 4-1:
CHECKSUM COMPUTATION
To allow portability of code, the programmer is required to read the configuration word and ID locations from the HEX
file, when loading the HEX file. If configuration word information was not present in the HEX file, then a simple warning
message may be issued. Similarly, while saving a HEX file, configuration word and ID information must be included.
An option to not include this information may be provided.
Microchip Technology Inc. feels strongly that this feature is important for the benefit of the end customer.
Device
Code
Protect
Checksum
Blank
Value
0x05E6 at
0x0000
and max
address
PIC16F72
OFF
SUM[0x000:0x07FF] + CFWD & 0x005F
0xF85F
0x842D
ALL
CFWD & 0x005F + SUM_ID
0x005E
0x005E
Legend: CFWD
= Configuration Word
SUM[a:b]
= [Sum of locations a to b inclusive]
SUM_ID
= ID locations masked by 0x0F, then concatenated into a 16-bit value with ID0 as the most significant nibble.
For example, ID0 = 0x01, ID2 = 0x02, ID3 = 0x03, ID4 = 0x04, then SUM_ID = 0x1234
Checksum
= [Sum of all the individual expressions] MODULO [0xFFFF]
+
= Addition
&
= Bitwise AND



Html Pages

1 2 3 4 5 6 7 8 9 10 11 12 13 14


Datasheet Download

Go To PDF Page


Link URL



Does ALLDATASHEET help your business so far?  [ DONATE ] 

About Alldatasheet   |   Advertisement   |   Contact us   |   Privacy Policy   |   Link to Datasheet    |   Link Exchange   |   Manufacturer List
All Rights Reserved©Alldatasheet.com


Mirror Sites
English : Alldatasheet.com  |   English : Alldatasheet.net  |   Chinese : Alldatasheetcn.com  |   German : Alldatasheetde.com  |   Japanese : Alldatasheet.jp
Russian : Alldatasheetru.com  |   Korean : Alldatasheet.co.kr  |   Spanish : Alldatasheet.es  |   French : Alldatasheet.fr  |   Italian : Alldatasheetit.com
Portuguese : Alldatasheetpt.com  |   Polish : Alldatasheet.pl  |   Vietnamese : Alldatasheet.vn
Indian : Alldatasheet.in  |   Mexican : Alldatasheet.com.mx  |   British : Alldatasheet.co.uk  |   New Zealand : Alldatasheet.co.nz
Family Site : ic2ic.com  |   icmetro.com