基于51单片机的超声波测距仪LED显示电路的设计
MOV R7,A
MOV R6,A
MOV R5,A
MOV R4,A
MOV 46H,#10H
MULLOOP1:CLR C
MOV A,R4
RLC A
MOV R4,A
MOV A,R5
RLC A
MOV R5,A
MOV A,R6
RLC A
MOV R6,A
MOV A,R7
RLC A
MOV R7,A
MOV A,R0
RLC A
MOV R0,A
MOV A,R1
RLC A
MOV R1,A
JNC MULLOOP2
MOV A,R4
ADD A,R2
MOV R4,A
MOV A,R5
ADDC A,R3
MOV R5,A
MOV A,R6
ADDC A,#00H
MOV R6,A
MOV A,R7
ADDC A,#00H
MOV R7,A
MULLOOP2:DJNZ 46H,MULLOOP1
RET
div4BY2:MOV 46H,#20H
MOV R0,#00H
MOV R1,#00H
divLOOP1:MOV A,R4
RLC A
MOV R4,A
MOV A,R5
RLC A
MOV R5,A
MOV A,R6
RLC A
MOV R6,A
MOV A,R7
RLC A
MOV R7,A
MOV A,R0
RLC A
MOV R0,A
MOV A,R1
RLC A
MOV R1,A
CLR C
MOV A,R0
SUBB A,R3
JC divLOOP2
MOV R0,B
MOV R1,A
divLOOP2:CPL C
DJNZ 46H,divLOOP1
MOV A,R4
RLC A
MOV R4,A
MOV A,R5
RLC A
MOV R5,A
MOV A,R6
RLC A
MOV R6,A
MOV A,R7
RLC A
MOV R7,A
RET
END PIXTEL_MMI_EBOOK_2005>9 /PIXTEL_MMI_EBOOK_2005>
- 关于RTX51 TINY的分析与探讨(05-30)
- 浅析8051模块化编程技巧(05-28)
- 基于DSP和单片机通信的液晶显示设计方案(07-20)
- 锁相环控制及初始化简析(08-27)
- 基于MSP430自动胀管控制器的研究(09-07)
- 嵌入式C实现延时程序的不同变量的区别(03-01)