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

SN8F2251B 参数 Datasheet PDF下载

SN8F2251B图片预览
型号: SN8F2251B
PDF下载: 下载PDF文件 查看货源
内容描述: 8位微控制器 [8-Bit Micro-Controller]
分类和应用: 微控制器
文件页数/大小: 133 页 / 1554 K
品牌: SONIX [ SONIX TECHNOLOGY COMPANY ]
 浏览型号SN8F2251B的Datasheet PDF文件第17页浏览型号SN8F2251B的Datasheet PDF文件第18页浏览型号SN8F2251B的Datasheet PDF文件第19页浏览型号SN8F2251B的Datasheet PDF文件第20页浏览型号SN8F2251B的Datasheet PDF文件第22页浏览型号SN8F2251B的Datasheet PDF文件第23页浏览型号SN8F2251B的Datasheet PDF文件第24页浏览型号SN8F2251B的Datasheet PDF文件第25页  
SN8F2250B Series  
USB 2.0 Full-Speed 8-Bit Micro-Controller  
2.1.1.5 CHECKSUM CALCULATION  
The last ROM addresses are reserved area. User should avoid these addresses (last address) when calculate the  
Checksum value.  
¾
Example: The demo program shows how to calculated Checksum from 00H to the end of user’s code.  
MOV  
A,#END_USER_CODE$L  
B0MOV  
MOV  
END_ADDR1, A  
A,#END_USER_CODE$M  
; Save low end address to end_addr1  
B0MOV  
CLR  
CLR  
END_ADDR2, A  
Y
Z
; Save middle end address to end_addr2  
; Set Y to 00H  
; Set Z to 00H  
@@:  
MOVC  
B0BSET  
ADD  
FC  
DATA1, A  
A, R  
; Clear C flag  
; Add A to Data1  
MOV  
ADC  
JMP  
DATA2, A  
END_CHECK  
; Add R to Data2  
; Check if the YZ address = the end of code  
AAA:  
INCMS  
JMP  
JMP  
Z
@B  
Y_ADD_1  
; Z=Z+1  
; If Z != 00H calculate to next address  
; If Z = 00H increase Y  
END_CHECK:  
MOV  
A, END_ADDR1  
CMPRS  
JMP  
A, Z  
AAA  
; Check if Z = low end address  
; If Not jump to checksum calculate  
MOV  
CMPRS  
JMP  
A, END_ADDR2  
A, Y  
AAA  
; If Yes, check if Y = middle end address  
; If Not jump to checksum calculate  
; If Yes checksum calculated is done.  
JMP  
CHECKSUM_END  
Y_ADD_1:  
INCMS  
NOP  
Y
; Increase Y  
JMP  
@B  
; Jump to checksum calculate  
CHECKSUM_END:  
END_USER_CODE:  
; Label of program end  
SONiX TECHNOLOGY CO., LTD  
Page 21  
Version 1.1