单片机数字音乐盒设计 第2页
dl: mov R5,#0ah
dl2: mov R6,#63
dl3: nop
nop
djnz R6,dl3
djnz R5,dl2
CLR RS0
RET
;---------------------------------------------------
;30H-37H初值为零
;----------------------------------------------------
initil:
mov r3,#08h
mov r0,#30h
m1: mov @r0,#00h
inc r0
djnz r3,m1
RET
;----------------------------------------------------
;显示
;---------------------------------------------------
modd:
MOV P0,#8EH
CALL ENABLE
mov A,37H
mov DPTR,#TABLE3
MOVC A,@A+DPTR
CALL WRITE2
RET
;--------------------------------------------------
;开机提示字
;-------------------------------------------------
kaiji: mov a,37h
毕业论文
http://www.youerw.com/;写数据
CALL WRITE1
DFF: RET
;----------------------------------------------
;按键值播放歌曲
;----------------------------------------------
SOP: mov a,37h
cjne a,#01h,A11
LCALL MODD
MOV 52H,#HIGH TABLE10
MOV 53H,#LOW TABLE10
LCALL INITILE2
lcall MAIN0
A11: CJNE A,#02H,A22
LCALL MODD
MOV 52H,#HIGH TABLE20
MOV 53H,#LOW TABLE20
LCALL 本文源自优文论文网INITILE2
lcall MAIN0
A22: CJNE A,#03H,A33
LCALL MODD
MOV 52H,#HIGH TABLE30
MOV 53H,#LOW TABLE30
LCALL INITILE2
lcall MAIN0
A33: CJNE A,#04H,A44
LCALL MODD
MOV 52H,#HIGH TABLE40
MOV 53H,#LOW TABLE40
LCALL INITILE2
lcall MAIN0
A44: CJNE A,#05H,A55
LCALL MODD
MOV 52H,#HIGH TABLE50
MOV 53H,#LOW TABLE50
LCALL INITILE2
lcall MAIN0
A55: CJNE A,#06H,A66
LCALL MODD
MOV 52H,#HIGH TABLE60
MOV 53H,#LOW TABLE60
LCALL INITILE2
lcall MAIN0
A66: CJNE A,#07H,A77
LCALL MODD
MOV 52H,#HIGH TABLE70
MOV 53H,#LOW TABLE70
LCALL INITILE2
lcall MAIN0
A77: CJNE A,#08H,A88
LCALL MODD
MOV 52H,#HIGH TABLE80
MOV 53H,#LOW TABLE80
LCALL INITILE2
lcall MAIN0
A88: CJNE A,#09H,A99
LCALL MODD
MOV 52H,#HIGH TABLE90
MOV 53H,#LOW TABLE90
LCALL INITILE2
lcall MAIN0
毕业论文
http://www.youerw.com/ LCALL MODD
MOV 52H,#HIGH TABLE100
MOV 53H,#LOW TABLE100
LCALL INITILE2
lcall MAIN0
AAA: RET
;******************************************
INITILE2:
MOV L50MS,#20
MOV L1MS,#00H
MOV L250MS,#00H
MOV SEC,#00H
MOV MIN,#00H
MOV HOU,#00H
MOV A,HOU
MOV B,#10
DIV AB
ADD A,#30H ;将BCD吗转化为ASIIC码
MOV P0,#0C8H ;显示小时十位
CALL ENABLE
CALL WRITE2
MOV A,B
ADD A,#30H
MOV P0,#0C9H ;显示小时个位
CALL ENABLE
CALL WRITE2
MOV A,#3AH
MOV P0,#0DH ;显示冒号
CALL ENABLE
CALL WRITE2
上一页 [1] [2] [3] [4] 下一页
单片机数字音乐盒设计 第2页下载如图片无法显示或论文不完整,请联系qq752018766