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

DS1990A-F5 参数 Datasheet PDF下载

DS1990A-F5图片预览
型号: DS1990A-F5
PDF下载: 下载PDF文件 查看货源
内容描述: 序列号iButton [Serial Number iButton]
分类和应用: 存储内存集成电路可编程只读存储器电动程控只读存储器电可擦编程只读存储器
文件页数/大小: 10 页 / 154 K
品牌: DALLAS [ DALLAS SEMICONDUCTOR ]
 浏览型号DS1990A-F5的Datasheet PDF文件第2页浏览型号DS1990A-F5的Datasheet PDF文件第3页浏览型号DS1990A-F5的Datasheet PDF文件第4页浏览型号DS1990A-F5的Datasheet PDF文件第5页浏览型号DS1990A-F5的Datasheet PDF文件第6页浏览型号DS1990A-F5的Datasheet PDF文件第7页浏览型号DS1990A-F5的Datasheet PDF文件第9页浏览型号DS1990A-F5的Datasheet PDF文件第10页  
DS1990A
CRC ASSEMBLY LANGUAGE PROCEDURE
Table 1
DO_CRC:
PUSH
PUSH
PUSH
MOV
XRL
RRC
MOV
JNC
XRL
RRC
MOV
POP
RR
PUSH
DJNZ
POP
POP
POP
RET
ACC
B
ACC
B,#8
A,CRC
A
A,CRC
ZERO
A,#18H
A
CRC,A
ACC
A
ACC
B,CRC_LOOP
ACC
B
ACC
; save the accumulator
; save the B register
; save bits to be shifted
set shift=8bits
;
; calculate CRC
; move it to the carry
; get the last CRC value
; skip if data=0
; update the CRC value
;
; position the new CRC
; store the new CRC
; get the remaining bits
; position the next bit
; save the remaining bits
; repeat for eight bits
; clean up the stack
; restore the B register
; restore the accumulator
CRC_LOOP:
ZERO:
CRC GENERATION
To validate the data transmitted from the DS1990A, the bus master may generate a CRC value from the
data as it is received. This generated value is compared to the value stored in the last eight bits of the
DS1990A. The bus master computes the CRC over the 8-bit family code and all 48 ID number data bits,
but
not
over the stored CRC value itself. If the two CRC values match, the transmission is error-free.
An example of how to generate the CRC using assembly language software is shown in Table 1. This
assembly language code is written for the DS5000 Soft microcontroller which is compatible with the
8031/51 Microcontroller family. The procedure DO_CRC calculates the cumulative CRC of all the bytes
passed to it in the accumulator. It should be noted that the variable CRC needs to be initialized to 0 before
the procedure is executed. Each byte of the data is then placed in the accumulator and DO-CRC is called
to update the CRC variable. After all the data has been passed to DO_CRC, the variable CRC will contain
the result. The equivalent polynomial function of this software routine is:
CRC = x
8
+ x
5
+ x
4
+ 1
For more details, see the Book of DS19xx iButton Standards.
8 of 10