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

📄 testgsmmodem.a51

📁 gsm based sms using microntroller. contains some important subroutine were i was tested.
💻 A51
字号:
ORG	0000H
		
		
		mov tmod,#020h
		mov th1,#0fdh
		mov scon,#50h
		setb tr1
		mov dptr,#mydata
here1:		clr a
		movc a,@a+dptr
		jz here2
		acall send
		acall delay
		inc dptr
		sjmp here1
		call recv
		call recv
		


here2:		MOV R0,#30h

		call recv
		MOV @R0,a
		cjne @r0,#'+',here2
		INC R0
		call recv
		MOV @R0,a
		cjne @r0,#'C',here2
		INC R0
		call recv
		MOV @R0,a
		cjne @r0,#'M',here2
		INC R0
		call recv
		MOV @R0,a
		cjne @r0,#'T',here2
		mov b,#9
zz:		inc R0
		call recv
		mov @R0,a
		djnz b,zz		

		mov r1,#3ch
		cjne @r1,#'1',here2


		mov dptr,#mydata1
her:		clr a
		movc a,@a+dptr
		cjne a,#0dh,here6
		acall send
		inc dptr
		sjmp her
	
here6:		mov b,#56
here61:		MOV R0,#40h
here62:		call recv
		mov @R0,a
		djnz b,here62
		cjne @r0,#'+',here6
	
		mov p0,a
		call delay
		jmp $
             
		

		
send:		mov sbuf,a
h_2:		jnb ti,h_2
		clr ti
		ret

recv:		
		jnb ri,recv
		mov a,sbuf
		clr ri
		ret



  
delay:  mov r3,#200
h1:     djnz r3,h1
	ret
		
		org 100h
mydata: DB'AT',0dh,0
mydata1 : DB'AT+CMGR=1',0dh,0
mydata2 : DB'AT+CMGR=1',0dh,0

END

⌨️ 快捷键说明

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