參數(shù)資料
型號(hào): DS1990
英文描述: Serial Number iButton
中文描述: 序列號(hào)iButton
文件頁數(shù): 8/10頁
文件大小: 151K
代理商: DS1990
DS1990A
8 of 10
CRC ASSEMBLY LANGUAGE PROCEDURE
Table 1
DO_CRC:
CRC_LOOP:
ZERO:
PUSH ACC
PUSH B
PUSH ACC
MOV
B,#8
XRL
RRC
MOV
JNC
XRL
A,CRC
A
A,CRC
ZERO
A,#18H
RRC
MOV
POP
RR
PUSH
DJNZ
POP
POP
POP
RET
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 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.
相關(guān)PDF資料
PDF描述
DS1990A Serial Number iButton
DS1990A-F5 Serial Number iButton
DS1994L-F5 4kb Plus Time Memory iButton
DS1994 4kb Plus Time Memory iButton
DS1995 16-kbit Memory iButton
相關(guān)代理商/技術(shù)參數(shù)
參數(shù)描述
DS1990A 制造商:DALLAS 制造商全稱:Dallas Semiconductor 功能描述:Serial Number iButton
DS1990A+F3 制造商:Maxim Integrated Products 功能描述:SERL NUMBER IBTN 2PIN F3 MICROCAN - Rail/Tube
DS1990A-F3 功能描述:序列號(hào)注冊(cè) RoHS:否 制造商:Maxim Integrated 數(shù)據(jù)總線寬度: 電源電壓-最大: 電源電壓-最小: 最大工作溫度: 最小工作溫度: 安裝風(fēng)格: 封裝 / 箱體:
DS1990A-F3# 功能描述:序列號(hào)注冊(cè) RoHS:否 制造商:Maxim Integrated 數(shù)據(jù)總線寬度: 電源電壓-最大: 電源電壓-最小: 最大工作溫度: 最小工作溫度: 安裝風(fēng)格: 封裝 / 箱體:
DS1990A-F3/C00+ 功能描述:序列號(hào)注冊(cè) RoHS:否 制造商:Maxim Integrated 數(shù)據(jù)總線寬度: 電源電壓-最大: 電源電壓-最小: 最大工作溫度: 最小工作溫度: 安裝風(fēng)格: 封裝 / 箱體: