欢迎访问ic37.com |
会员登录 免费注册
发布采购

PIC12C671-04I/SM 参数 Datasheet PDF下载

PIC12C671-04I/SM图片预览
型号: PIC12C671-04I/SM
PDF下载: 下载PDF文件 查看货源
内容描述: EPROM存储器编程规范 [EPROM Memory Programming Specification]
分类和应用: 存储微控制器和处理器外围集成电路光电二极管PC可编程只读存储器电动程控只读存储器时钟
文件页数/大小: 14 页 / 177 K
品牌: MICROCHIP [ MICROCHIP TECHNOLOGY ]
 浏览型号PIC12C671-04I/SM的Datasheet PDF文件第6页浏览型号PIC12C671-04I/SM的Datasheet PDF文件第7页浏览型号PIC12C671-04I/SM的Datasheet PDF文件第8页浏览型号PIC12C671-04I/SM的Datasheet PDF文件第9页浏览型号PIC12C671-04I/SM的Datasheet PDF文件第11页浏览型号PIC12C671-04I/SM的Datasheet PDF文件第12页浏览型号PIC12C671-04I/SM的Datasheet PDF文件第13页浏览型号PIC12C671-04I/SM的Datasheet PDF文件第14页  
PIC12C67X and PIC12CE67X
3.2
3.2.1
Checksum
CHECKSUM CALCULATIONS
The least significant 16 bits of this sum is the check-
sum.
The following table describes how to calculate the
checksum for each device. Note that the checksum cal-
culation differs depending on the code protect setting.
Since the program memory locations read out differ-
ently depending on the code protect 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
by reading a device, the entire program memory can
simply be read and summed. The configuration word
and ID locations can always be read.
Note that some older devices have an additional value
added in the checksum. This is to maintain compatibil-
ity with older device programmer checksums.
Checksum is calculated by reading the contents of the
PIC12C67X and PIC12CE67X memory locations and
adding the opcodes up to the maximum user address-
able location, excluding the oscillator calibration loca-
tion in the last address, e.g., 0x3FE for the
PIC12C671/CE673. Any carry bits exceeding 16-bits
are neglected. Finally, the configuration word (appropri-
ately masked) is added to the checksum. Checksum
computation for each member of the PIC12C67X and
PIC12CE67X devices is shown in Table 3-2.
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)
TABLE 3-2:
Device
PIC12C671
PIC12CE673
PIC12C672
PIC12CE674
CHECKSUM COMPUTATION
Code
Protect
OFF
1/2
ALL
OFF
1/2
3/4
ALL
Checksum*
SUM[0x000:0x3FE] + CFGW & 0x3FFF
SUM[0x000:0x1FF] + CFGW & 0x3FFF + SUM_ID
CFGW & 0x3FFF + SUM_ID
SUM[0x000:0x7FE] + CFGW & 0x3FFF
SUM[0x000:0x3FF] + CFGW & 0x3FFF + SUM_ID
SUM[0x000:0x1FF] + CFGW & 0x3FFF + SUM_ID
CFGW & 0x3FFF + SUM_ID
Blank
Value
3B3F
4E5E
3B4E
373F
5D6E
4A5E
374E
Ox25E6 at
0 and max
address
070D
0013
071C
030D
0F23
FC13
031C
Legend: CFGW = Configuration Word
SUM[a:b] = [Sum of locations a through b inclusive]
SUM_ID = ID locations masked by 0xF then made into a 16-bit value with ID0 as the most significant nibble.
For example,
ID0 = 0x12, ID1 = 0x37, ID2 = 0x4, ID3 = 0x26, then SUM_ID = 0x2746.
*Checksum = [Sum of all the individual expressions]
MODULO
[0xFFFF]
+ = Addition
& = Bitwise AND
DS40175A-page 10
©
1998 Microchip Technology Inc.