pic12c67x 和 pic12ce67x
ds40175a-页 10
1998 微芯 技术 公司
3.2 Checksum
3.2.1 checksum calculations
Checksum 是 计算 用 读 这 内容 的 这
pic12c67x 和 pic12ce67x 记忆 locations 和
adding 这 opcodes 向上 至 这 最大 用户 地址-
able location, excluding 这 振荡器 校准 loca-
tion 在 这 last 地址, e.g., 0x3fe 为 这
pic12c671/ce673.任何 carry 位 exceeding 16-位
是 neglected. 最终, 这 configuration 文字 (appropri-
ately masked) 是 增加 至 这 checksum. checksum
computation 为 各自 成员 的 这 pic12c67x 和
pic12ce67x 设备 是 显示 在 表格 3-2.
这 checksum 是 计算 用 summing 这 下列的:
• 这 内容 的 所有 程序 记忆 locations
• 这 configuration 文字, appropriately masked
• masked id locations (当 适用)
这 least significant 16 位 的 这个 总 是 这 审查-
总.
这 下列的 表格 describes 如何 至 计算 这
checksum 为 各自 设备. 便条 那 这 checksum cal-
culation differs 取决于 在 这 代号 保护 设置.
自从 这 程序 记忆 locations 读 输出 differ-
ently 取决于 在 这 代号 保护 设置, 这 表格
describes 如何 至 manipulate 这 真实的 程序 mem-
或者y 值 至 simulate 这 值 那 将 是 读
从 一个 保护 设备. 当 calculating 一个 checksum
by 读 一个 设备, 这 全部 程序 记忆 能
simply 是 读 和 summed. 这 configuration 文字
和 id locations 能 总是 是 读.
便条 那 一些 older 设备 有 一个 额外的 值
增加 在 这 checksum. 这个 是 至 维持 compatibil-
ity 和 older 设备 programmer checksums.
表格 3-2: checksum computation
legend: cfgw = configuration 文字
sum[a:b] = [sum 的 locations 一个 通过 b inclusive]
总_id = id locations masked 用 0xf 然后 制造 在 一个 16-位 值 和 id0 作 这 大多数 significant nibble.
为 例子,
id0 = 0x12, id1 = 0x37, id2 = 0x4, id3 = 0x26, 然后 sum_id = 0x2746.
*checksum = [sum 的 所有 这 单独的 expressions]
MODULO
[0xFFFF]
+ = 增加
&放大; = bitwise 和
设备
代号
保护
Checksum*
Blank
值
ox25e6 在
0 和 最大值
地址
PIC12C671
PIC12CE673
止
1/2
所有
sum[0x000:0x3fe] + cfgw &放大; 0x3fff
sum[0x000:0x1ff] + cfgw &放大; 0x3fff + 总_id
cfgw &放大; 0x3fff + 总_id
3B3F
4E5E
3B4E
070D
0013
071C
PIC12C672
PIC12CE674
止
1/2
3/4
所有
sum[0x000:0x7fe] + cfgw &放大; 0x3fff
sum[0x000:0x3ff] + cfgw &放大; 0x3fff + 总_id
sum[0x000:0x1ff] + cfgw &放大; 0x3fff + 总_id
cfgw &放大; 0x3fff + 总_id
373F
5D6E
4A5E
374E
030D
0F23
FC13
031C