时钟+秒表+流水灯的单片机汇编程序
KK13:RET
//=====流水灯子程序===========================
LED: MOV A,#0feH
MOV 41H,#08H
MOV P0,#0FFH
LED1:
MOV P1,A
MOV R3,#100
D0: ACALL DELAY
DJNZ R3,D0
MOV R3,41H
DJNZ R3,AAA
LJMP BB
AAA:RL A
MOV 41H,R3
ACALL KEY
LJMP LED1
BB:
MOV 41H,#07H
CC: MOV P1,A
MOV R3,#30
D1: ACALL DELAY
DJNZ R3,D1
MOV R3,41H
DJNZ R3,DD
LJMP LED0
DD:RR A
MOV 41H,R3
ACALL KEY
LJMP CC
LED0:RET
//=====延时子程序==============================
DELAY:MOV R1,#250
DEL1:NOP
NOP
NOP
NOP
DJNZ R1,DEL1
RET
//====调用时钟显示作延时========================
DELAY1:MOV R2,#20
DELA3: ACALL MAIN2
DJNZ R2,DELA3
RET
//====调用秒表显示作延时========================
DELAY3:MOV R2,#20
DELA5:ACALL MAIN3
DJNZ R2,DELA5
RET
//====调用延时子程序作延时======================
DELAY2:MOV R2,#100
DELA4:ACALL DELAY
DJNZ R2,DELA4
RET
//======共阳数码管段码表=================================
TAB:DB 0C0H,0F9H,0A4H,0B0H,99H,92H,82H,0F8H,80H,90H,87H
END
- 基于TMS320C62X DSP的混合编程研究(07-12)
- Linux 汇编语言开发指南(03-30)
- DSP的汇编程序优化(08-01)
- 浅析8051模块化编程技巧(05-28)
- 如何将汇编语言与C语言整合至DSP (06-29)
- 基于DSP的汇编程序优化(01-10)