⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ds1822_check_id.asm

📁 web51的开发库
💻 ASM
字号:
	  .global ds1822_check_id	  .section cpu_dir, #alloc	  .word   'd'+'s'+'1'+'8'+'2'+'2'+'_'+'c'+'h'+'e'+'c'+'k'+'_'+'i'+'d'+'.'+'c'+'g'+'i'	  .byte   0x10		  ;cgi	  .byte   0 		  ;reserved	  .word   cgibegin	  .word   cgiend	  .section cpu_files, #alloccgibegin:			;ds1822_a.cgiw	  .pcode ds1822_check_id	  .pcode pretcgiend:	  .text.comm	 ID_DS1822_1,1.comm	 ID_DS1822_2,1.comm	 ID_DS1822_3,1.comm	 ID_DS1822_4,1.comm	 ID_DS1822_5,1.comm	 ID_DS1822_6,1.comm	 ID_DS1822_7,1.comm	 ID_DS1822_8,1;ATTENTION :	It will read correct chip serial number only as the first thing after power up for chip.;			After temperature converting it doesn't measuring ID, only FFds1822_check_id:
	lcall send_string	.asciz  "Chip id : "			; If you dont know ID of yours chips	Mov	A,#0x33	; Return 8. byte CHIP number - only for 1 CHIP on network	lcall	DS1Wr	lcall	DS1Rd	Mov	ID_DS1822_1,A	lcall	DS1Rd	Mov	ID_DS1822_2,A	lcall	DS1Rd	Mov	ID_DS1822_3,A	lcall	DS1Rd	Mov	ID_DS1822_4,A	lcall	DS1Rd	Mov	ID_DS1822_5,A	lcall	DS1Rd	Mov	ID_DS1822_6,A	lcall	DS1Rd	Mov	ID_DS1822_7,A	lcall	DS1Rd	Mov	ID_DS1822_8,ADS1822_Vypis:	Mov	A,#'#'	lcall	sendchar
	mov	A,ID_DS1822_1	lcall	sendHexb	mov	A,ID_DS1822_2	lcall	sendHexb	mov	A,ID_DS1822_3	lcall	sendHexb	mov	A,ID_DS1822_4	lcall	sendHexb	mov	A,#':'	lcall	sendchar	mov	A,ID_DS1822_5	lcall	sendHexb	mov	A,ID_DS1822_6	lcall	sendHexb	mov	A,ID_DS1822_7	lcall	sendHexb	mov	A,ID_DS1822_8	ljmp	sendHexb	;; end

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -