边显示滚动汉字边播放音乐的汇编程序

发布者:神光骑士最新更新时间:2012-08-18 来源: 51hei关键字:滚动汉字  播放音乐  汇编程序 手机看文章 扫描二维码
随时随地手机看文章
//------------------------------------------
//51hei-5开发板测试程序.ASM
//    <<音乐播放器>>
//硬件说明:12M晶振/MCU:89C51
//编写人:李春起
//编定日期:2009.11.24
//修改日志:2010.01.05
//         2010.01.11   加暂停功能
//         2010.01.16   加第三首歌曲
//         2010.01.17   加第四首歌曲
//         2010.01.18   加第五首歌曲
//         2010.02.19   去除休止时杂声
//         2010.03.02   定时器T1中断显示
//------------------------------------------
//已用寄存器:
//R0 R1 R2  R4 R5 R6 R7
//-------------------------------------------
    YY EQU P3.1 ;音乐输出口
ORG 0000H
LJMP MAIN  ;跳到主函数
ORG 000BH  ;定时器入口
LJMP T00   ;跳到定时器中断服务子程序
ORG 001BH
LJMP T11
ORG 0020H ;程序存放起始
MAIN:
     MOV TMOD,#11H
MOV IP,#08H
// MOV IE,#08AH
     MOV TH0,R0
MOV TL0,R1
MOV TH1,#15H
MOV TL1,#0A0H
     SETB ET0
CLR  TR0
CLR  TR1
SETB ET1
SETB EA
SETB YY
MOV R7,#00H ;歌曲选择
MOV 30H,#00H
MOV 31H,#24
MOV 32H,#00H ;显示扫描数
MOV 40H,#40
MOV R3,#00H

//========笑脸====================
MAKK: ACALL DELAY1
MAIN0:
     MOV A,R7
CJNE A,#00H,LMA1
CLR TR0
XIAN00:
     MOV A,30H
MOV DPTR,#TAB10
MOVC A,@A+DPTR
MOV P0,A
MOV A,30H
MOV DPTR,#TAB11
MOVC A,@A+DPTR
MOV P1,A
MOV A,30H
MOV DPTR,#TAB12
MOVC A,@A+DPTR
MOV P2,A
MA0D:MOV 54H,#20
     JB P3.2,MA0D1
     ACALL WDELAY
     INC R7
CJNE R7,#04H,LMA0
MOV R7,#00H
LJMP LMA0
MA0D1:DJNZ 54H,MA0D1
MOV P0,#0FFH
     MOV P1,#0FH
MOV P2,#00H
DJNZ 31H,XIAN00
MOV 31H,#24
     INC 30H
     MOV A,30H
CJNE A,#13,XIAN01
DJNZ 41H,XIA01
MOV 41H,#20
LJMP XIAN01
XIA01:MOV 30H,#0
     LJMP XIAN00
XIAN01:
     CJNE A,#25, ENDD0
MOV 41H,#40
MOV 30H,#0
ENDD0:LJMP XIAN00
LMA1:LJMP MAIN1
LMA0:LJMP MAIN0

//========第一首===========================
MAIN1:SETB TR1
     MOV P0,#0FFH
     MOV P1,#0FH
MOV P2,#00H
     MOV 30H,#00H //奏第一首循环
MOV A,R7
CJNE A,#01H,MAIN2;下一首
LOOP:SETB TR0
     MOV A,30H
     MOV DPTR,#TAB1
MOVC A,@A+DPTR   ;取定时器高八位数据
JZ RERT
LOO1: MOV R0,A
MOV A,30H
MOV DPTR,#TAB2
MOVC A,@A+DPTR    ;取定时器低八位数据
MOV R1,A
MOV TH0,R0
     MOV TL0,R1
ANL A,R0
CJNE A,#0FFH,NCA ;遇0FFH歌曲结束
LJMP ENDD
NCA: MOV A,30H
     MOV DPTR,#TAB3
MOVC A,@A+DPTR ;取节拍时值
MOV R2,A
DELA:ACALL DELAY100
DEL1:DJNZ R2,DELA
     INC 30H
LJMP LOOP

RERT:CLR TR0 ;休止
     SETB YY
     LJMP LOO1

ENDD:CLR TR0
     ACALL DELAY1000
LJMP MAIN1 ;奏完返回

//========第二首===========================
MAIN2:
      MOV P0,#0FFH
      MOV P1,#0FH
  MOV P2,#00H
      MOV 30H,#00H  //奏第二首循环
      MOV A,R7
  CJNE A,#02H,LMAIN0
LOOOP:SETB TR0
     MOV A,30H
     MOV DPTR,#TAB4
MOVC A,@A+DPTR   ;取定时器高八位数据
JZ RERT1
LOOO1: MOV R0,A
MOV A,30H
MOV DPTR,#TAB5
MOVC A,@A+DPTR    ;取定时器低八位数据
MOV R1,A
MOV TH0,R0
     MOV TL0,R1
ANL A,R0
CJNE A,#0FFH,NCA1 ;遇0FFH歌曲结束
LJMP ENDD1
NCA1: MOV A,30H
     MOV DPTR,#TAB6
MOVC A,@A+DPTR ;取节拍时值
MOV R2,A
DELA1:ACALL DELAY100
DEL11:DJNZ R2,DELA1
     INC 30H
LJMP LOOOP

RERT1:CLR TR0 ;休止
     SETB YY
     LJMP LOOO1

ENDD1:CLR TR0
     ACALL DELAY1000
LJMP MAIN1 ;奏完返回
LMAIN0:LJMP MAIN4

//=======第三首==================================
MAIN4:MOV P0,#0FFH
      MOV P1,#0FH
  MOV P2,#00H
      MOV 30H,#00H  //奏第三首循环
      MOV A,R7
  CJNE A,#03H,LMAIN4
LOO1P:SETB TR0
     MOV A,30H
     MOV DPTR,#TAB13
MOVC A,@A+DPTR   ;取定时器高八位数据
JZ RERT2
LOO11: MOV R0,A
MOV A,30H
MOV DPTR,#TAB14
MOVC A,@A+DPTR    ;取定时器低八位数据
MOV R1,A
MOV TH0,R0
     MOV TL0,R1
ANL A,R0
CJNE A,#0FFH,NCA4 ;遇0FFH歌曲结束
LJMP ENDD4
NCA4: MOV A,30H
     MOV DPTR,#TAB15
MOVC A,@A+DPTR ;取节拍时值
MOV R2,A
DELA31:ACALL DELAY100
DEL31:DJNZ R2,DELA31
     INC 30H
LJMP LOO1P

RERT2:CLR TR0 ;休止
     SETB YY
     LJMP LOO11

ENDD4:CLR TR0
     ACALL DELAY1000
LJMP MAIN4 ;奏完返回
LMAIN4:LJMP MAIN5[page]

//=======第四首==================================
MAIN5:MOV P0,#0FFH
      MOV P1,#0FH
  MOV P2,#00H
      MOV 30H,#00H  //奏第四首循环
      MOV A,R7
  CJNE A,#04H,LMAIN5  
LOO2P:SETB TR0
     MOV A,30H
     MOV DPTR,#TAB16
MOVC A,@A+DPTR   ;取定时器高八位数据
JZ RERT3
LOO21: MOV R0,A
MOV A,30H
MOV DPTR,#TAB17
MOVC A,@A+DPTR    ;取定时器低八位数据
MOV R1,A
MOV TH0,R0
     MOV TL0,R1
ANL A,R0
CJNE A,#0FFH,NCA5 ;遇0FFH歌曲结束
LJMP ENDD5
NCA5: MOV A,30H
     MOV DPTR,#TAB18
MOVC A,@A+DPTR ;取节拍时值
MOV R2,A
DELA41:ACALL DELAY100
DEL41:DJNZ R2,DELA41
     INC 30H
LJMP LOO2P

RERT3:CLR TR0 ;休止
     SETB YY
     LJMP LOO21

ENDD5:CLR TR0
     ACALL DELAY1000
LJMP MAIN5 ;奏完返回
LMAIN5:LJMP MAIN6

//=======第五首==================================
MAIN6:MOV P0,#0FFH
      MOV P1,#0FH
  MOV P2,#00H
      MOV 30H,#00H  //奏第五首循环
      MOV A,R7
  CJNE A,#05H,LMAIN6
LOO4P:SETB TR0
     MOV A,30H
     MOV DPTR,#TAB19
MOVC A,@A+DPTR   ;取定时器高八位数据
JZ RERT4
LOO31: MOV R0,A
MOV A,30H
MOV DPTR,#TAB20
MOVC A,@A+DPTR    ;取定时器低八位数据
MOV R1,A
MOV TH0,R0
     MOV TL0,R1
ANL A,R0
CJNE A,#0FFH,NCA6 ;遇0FFH歌曲结束
LJMP ENDD6
NCA6: MOV A,30H
     MOV DPTR,#TAB21
MOVC A,@A+DPTR ;取节拍时值
MOV R2,A
DELA51:ACALL DELAY100
DEL51:DJNZ R2,DELA51
     INC 30H
LJMP LOO4P

RERT4:CLR TR0 ;休止
     SETB YY
     LJMP LOO31

ENDD6:CLR TR0
     ACALL DELAY1000
LJMP MAIN6 ;奏完返回
LMAIN6:CLR TR1
      LJMP MAIN3

//======流动汉字=================================
MAIN3:
      MOV A,R7
  CJNE A,#06H,LMA3
  SJMP XIAN
LMA3:LJMP MAKK
XIAN:CLR TR0
     MOV A,30H
MOV DPTR,#TAB7
MOVC A,@A+DPTR
MOV P0,A
MOV A,30H
MOV DPTR,#TAB8
MOVC A,@A+DPTR
MOV P1,A
MOV A,30H
MOV DPTR,#TAB9
MOVC A,@A+DPTR
MOV P2,A
//--------------------------------------
MA3D://扫描按键延时
     MOV 53H,#5
MA3D2:
     JB P3.2,LMA03 ;按键
     LCALL WDELAY
     INC R7
CJNE R7,#04H,MA32
MOV R7,#00H
MA32:LJMP  MAKK
LMA03:JB P3.3,MA3D1
      LCALL WDELAY
      LCALL SIMAIN1   ;跳到显示死循环子程序
MA3D1:DJNZ 53H,MA3D2
//---------------------------------------
MOV P0,#0FFH
     MOV P1,#0FH
MOV P2,#00H
DJNZ 31H,XIAN
MOV 31H,#24
     INC 30H
     MOV A,30H
CJNE A,#13,XIAN1
DJNZ 40H,XIA1
MOV 40H,#100
LJMP XIAN1
XIA1:MOV 30H,#0
     LJMP MAIN3
XIAN1:
     CJNE A,#25, XIAN2
MOV 36H,#13
DJNZ 40H,XIA2
MOV 40H,#100
LJMP XIAN2
XIA2:MOV 30H,#13
     LJMP MAIN3
XIAN2:
     CJNE A,#37,XIAN3
  MOV 36H,#25
DJNZ 40H,XIA3
MOV 40H,#100
LJMP XIAN3
XIA3:MOV 30H,#25
     LJMP MAIN3
XIAN3:
     CJNE A,#49,XIAN4
  MOV 36H,#37
DJNZ 40H,XIA4
MOV 40H,#100
LJMP XIAN4
XIA4:MOV 30H,#37
     LJMP MAIN3
XIAN4:
     CJNE A,#61,XIAN5
MOV 36H,#49
DJNZ 40H,XIA5
MOV 40H,#100
LJMP XIAN5
XIA5:MOV 30H,#49
     LJMP MAIN3
XIAN5:
     CJNE A,#73,XIAN6
MOV 36H,#61
DJNZ 40H,XIA6
MOV 40H,#100
LJMP XIAN6
XIA6:MOV 30H,#61
LJMP MAIN3
XIAN6:
     CJNE A,#85,XIAN7
  MOV 36H,#73
DJNZ 40H,XIA7
MOV 40H,#100
LJMP XIAN7
XIA7:MOV 30H,#73
     LJMP MAIN3
XIAN7:
     CJNE A,#97,XIAN8
MOV 36H,#85
DJNZ 40H,XIA8
MOV 40H,#100
LJMP XIAN8
XIA8:MOV 30H,#85
     LJMP MAIN3
XIAN8:
     CJNE A,#109,XIAN9
MOV 36H,#97
DJNZ 40H,XIA9
MOV 40H,#100
LJMP XIAN9
XIA9:MOV 30H,#97
     LJMP MAIN3
XIAN9:
     CJNE A,#121,XIAN10
MOV 36H,#109
DJNZ 40H,XIA10
MOV 40H,#100
LJMP XIAN10
XIA10:MOV 30H,#109
      LJMP MAIN3
XIAN10:
     CJNE A,#133,XIAN11
MOV 36H,#121
DJNZ 40H,XIA11
MOV 40H,#100
LJMP XIAN11
XIA11:MOV 30H,#121
      LJMP MAIN3
XIAN11:
       CJNE A,#145,END30
/*   MOV 36H,#133
       DJNZ 40H,XIA12
   MOV 40H,#100
   LJMP XIAN12
XIA12:MOV 30H,#133
      LJMP MAIN3
XIAN12:
       CJNE A,#157,XIAN13
   MOV 36H,#145
       DJNZ 40H,XIA13
   MOV 40H,#100
   LJMP XIAN13
XIA13:MOV 30H,#145
      LJMP MAIN3
XIAN13:
       CJNE A,#169,XIAN14
   MOV 36H,#157
       DJNZ 40H,XIA14
   MOV 40H,#100
   LJMP XIAN14
XIA14:MOV 30H,#157
      LJMP MAIN3
XIAN14:    
     CJNE A,#181,END30 */
   MOV 36H,#0
MOV 30H,#0

END30:LJMP MAIN3

//=======显示死循环子程序========================
SIMAIN1:MOV 30H,36H
MOV 37H,#12
SIMAIN2:MOV A,30H
MOV DPTR,#TAB7
MOVC A,@A+DPTR
MOV P0,A
MOV A,30H
MOV DPTR,#TAB8
MOVC A,@A+DPTR
MOV P1,A
MOV A,30H
MOV DPTR,#TAB9
MOVC A,@A+DPTR
MOV P2,A
//-----------------
YANSI:MOV 38H,#200
YANS1:JB P3.3,YANS2
      LCALL WDELAY
      LJMP SIMRET
YANS2:DJNZ 38H,YANS1
//-----------------
  INC 30H
     MOV P0,#0FFH
     MOV P1,#0FH
MOV P2,#00H
DJNZ 37H,SIMAIN2
     LJMP SIMAIN1
SIMRET:RET

//=====定时器中断服务子程序======================
T00:MOV TH0,R0
    MOV TL0,R1
CPL YY
    RETI


//==========定时器T1溢出中断服务子程序============
T11:MOV TH1,#15H
    MOV TL1,#0A0H
CJNE R3,#1,NET10
     MOV P2,#06H
     MOV P0,#55H
NET10:CJNE R3,#10,NET11
MOV P2,#09H
MOV P0,#0AAH
NET11:CJNE R3,#20,NET12
     MOV R3,#0
NET12:
    INC R3
// INC 30H    //下一显示值
RETI
   

//======延时子程序================================
//-------含按键------------
DELAY1000:MOV R4,#10
DELAY100: MOV R5,#6
DELAY1:   MOV R6,#10
DELAY2: JB P3.2,DJNN
        ACALL WDELAY
         INC R7
CJNE R7,#08h,LJ
MOV R7,#00H
LJ:     LJMP MAIN0
DJNN:   JB P3.3,DJNN1
ACALL WDELAY
LCALL YINYEXI
DJNN1:  DJNZ R6,DELAY2
DJNZ R5,DELAY1
DJNZ R4,DELAY100
RET
//-------500MS--------------
WDELAY:MOV 50H,#5
WDELA1:MOV 51H,#250
WDELA2:MOV 52H,#100
WDELA3:NOP
NOP
DJNZ 52H,WDELA3
DJNZ 51H,WDELA2
DJNZ 50H,WDELA1
RET
    
//======音乐暂停等待==============================
YINYEXI:
       CLR TR0
   MOV P0,#0F6H
   MOV P1,#0FH
   MOV P2,#3FH
   JB P3.3,YINYEXI
   ACALL WDELAY
   MOV P0,#0FFH
   MOV P2,#00H
   SETB TR0
   RET
//===========================================================
//<<月亮代表我的心>> 数据表
TAB1:     //定时器高八位数据
    DB 00H,0FBH,0FCH,0FDH,0FDH,0FCH,0FCH,0FDH,0FDH,00H
DB   0FDH,0FDH,0FEH,0FEH,0FDH,0FDH,0FDH,0FDH,0FCH,0FCH
DB   0FCH,0FCH,0FDH,0FCH,0FCH,0FCH,0FCH,0FCH,0FDH,0FCH  
DB   0FCH,0FBH,0FCH,0FDH,0FCH,00H,0FBH,0FCH,0FDH,0FDH
DB   0FCH,0FCH,0FDH,0FDH,00H,0FDH,0FDH,0FEH,0FEH,0FDH  
DB   0FDH,0FDH,0FDH,0FCH,0FCH,0FCH,0FCH,0FDH,0FCH,0FCH  
DB   0FCH,0FCH,0FCH,0FDH,0FCH,0FBH,0FCH,0FCH,0FCH,0FCH    
DB   0FDH,0FDH,0FDH,0FCH,0FCH,0FDH,0FCH,0FBH,0FCH,0FBH    
DB   0FCH,0FBH,0FBH,0FDH,0FDH,0FDH,0FCH,0FCH,0FDH,0FCH  
DB   0FBH,0FCH,0FCH,0FCH,0FCH,0FCH,0FDH,0FCH,00H,0FBH
DB   0FCH,0FDH,0FDH,0FCH,0FCH,0FDH,0FDH,0FDH,0FDH,0FEH
DB   0FEH,0FDH,0FDH,0FDH,0FDH,0FCH,0FCH,0FCH,0FCH,0FDH  
DB   0FCH,0FCH,0FCH,0FCH,0FCH,0FDH,0FCH,0FBH,0FCH,0FCH
DB   0FCH,0FCH,0FFH
TAB2:    //定时器低八位数据
DB   00H,04H,44H,09H,82H,44H,0CH,09H,82H,00H 
DB   82H,0CDH,06H,22H,0CDH,0CDH,82H,09H,0ACH,44H
DB   44H,44H,09H,0ACH,44H,44H,44H,0ACH,09H,0ACH
DB   44H,8FH,0ACH,09H,0ACH,00H,04H,44H,09H,82H
DB   44H,0CH,09H,82H,00H,82H,0CDH,06H,22H,0CDH
DB   0CDH,82H,09H,0ACH,44H,44H,44H,09H,0ACH,44H
DB   44H,44H,0ACH,09H,0ACH,90H,0CH,44H,0ACH,44H
DB   09H,82H,09H,0ACH,44H,82H,0CH,90H,0CH,90H
DB   0CH,90H,05H,09H,82H,09H,0ACH,44H,82H,0CH
DB   90H,0CH,44H,44H,44H,0ACH,09H,0ACH,00H,05H
DB   44H,09H,82H,44H,0CH,09H,82H,82H,0C8H,06H
DB   22H,0C8H,0C8H,82H,09H,0ACH,44H,44H,44H,09H
DB   0ACH,44H,44H,44H,0ACH,09H,0ACH,90H,0CH,44H
   DB   0ACH,44H,0FFH  
TAB3: //节拍时值表
db   4,4,12,4,12,4,12,4,8,4
db   4,4,8,12,4,4,28,4,4,12
db   4,8,4,4,12,4,8,4,4,8
db   4,8,4,4,24,4,4,12,4,12
db   4,12,4,8,4,4,4,8,12,4
db   4,28,4,4,12,4,8,4,4,12
db   4,8,4,4,8,4,8,4,4,24
  db   4,4,12,4,8,8,24,4,4,12
  db   4,12,8,24,8,12,4,8,8,24
db   4,4,12,4,8,4,4,24,4,4
  db   12,4,12,4,12,4,12,4,12,4
db   12,4,4,20,4,4,12,4,8,4
db   4,12,4,8,4,4,12,4,8,4
db   4,24[page]
 
//==============笑脸================================================
TAB10: //P0口
DB 0FFH,0FFH,0FFH,0FFH,0FFH,0FEH,0FDH,0FBH,0F7H,0EFH,0DFH,0BFH,7FH
DB 0FFH,0FFH,0FFH,0FFH,0FEH,0FDH,0FBH,0F7H,0EFH,0DFH,0BFH,7FH
TAB11: //P1口
DB 0FH,8EH,4DH,0ABH,57H,5FH,9FH,9FH,5FH,5FH,0AFH,4FH,8FH
DB 8EH,4DH,0ABH,97H,9FH,9FH,9FH,9FH,9FH,0AFH,4FH,8FH
TAB12: //P2口
DB  0FH,87H,88H,50H,20H,0A4H,0E8H,0E8H,0A4H,20H,50H,88H,87H
DB  87H,88H,50H,20H,0A4H,0E8H,0E8H,0A4H,20H,50H,88H,87H

//=============汉字==============================================
TAB7: //P0口
DB 0FFH,  0FFH,0FFH,0FFH,0FFH,0FEH,0FDH,0FBH,0F7H,0EFH,0DFH,0BFH,7FH
DB 0FFH,0FFH,0FFH,0FFH,0FEH,0FDH,0FBH,0F7H,0EFH,0DFH,0BFH,7FH
DB  0FFH,0FFH,0FFH,0FFH,0FEH,0FDH,0FBH,0F7H,0EFH,0DFH,0BFH,7FH
DB  0FFH,0FFH,0FFH,0FFH,0FEH,0FDH,0FBH,0F7H,0EFH,0DFH,0BFH,7FH
DB  0FFH,0FFH,0FFH,0FFH,0FEH,0FDH,0FBH,0F7H,0EFH,0DFH,0BFH,7FH
DB  0FFH,0FFH,0FFH,0FFH,0FEH,0FDH,0FBH,0F7H,0EFH,0DFH,0BFH,7FH
DB  0FFH,0FFH,0FFH,0FFH,0FEH,0FDH,0FBH,0F7H,0EFH,0DFH,0BFH,7FH
DB  0FFH,0FFH,0FFH,0FFH,0FEH,0FDH,0FBH,0F7H,0EFH,0DFH,0BFH,7FH
DB  0FFH,0FFH,0FFH,0FFH,0FEH,0FDH,0FBH,0F7H,0EFH,0DF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,2BH,0A7H,0AFH,0FFH,0AFH,0AFH,2FH,0FH,0FH,0FH //春
DB 0EH,0DH,4BH,47H,0EFH,4FH,4FH,8FH,8FH,8FH,0FH,0FH  //起
DB 0EH,0FDH,5BH,57H,5FH,0FFH,0FH,4FH,4FH,0CFH,4FH,0FH //题
// DB 0CEH,2DH,02BH,27H,4FH,8FH,8FH,4FH,2FH,2FH,2FH,0CFH //心形
TAB9: //P2口
DB  00H,  08H,04H,0FEH,05H,08H,43H,3EH,02H,3EH,23H,30H,00H //祝
DB  00H,09H,0AH,7FH,2AH,08H,0FH,09H,7FH,09H,0FH,00H  //钟
DB  00H,02H,01H,7FH,02H,22H,22H,3FH,22H,22H,02H,00H   //仕
DB  80H,40H,3FH,88H,6AH,0FFH,2AH,0FFH,6AH,0BEH,88H,00H //廉
// DB 00H,21H,20H,20H,24H,24H,3FH,24H,24H,20H,20H,00H //生
// DB 00H,00H,00H,3FH,22H,22H,22H,22H,3FH,00H,00H,00H  //日
DB  00H,2AH,5AH,0FFH,1AH,2AH,40H,3FH,02H,7EH,02H,00H   //新
DB  08H,09H,0FH,09H,09H,09H,0FFH,09H,09H,09H,08H,00H    //看
DB 01H,06H,7FH,22H,14H,0CH,07H,0CH,14H,27H,24H,00H //快
DB 00H,23H,12H,0EH,22H,7FH,06H,0AH,13H,22H,00H,00H //乐
  DB 03H,04H,08H,10H,20H,60H,20H,10H,08H,04H,02H,01H  //心形
// DB 00H,00H,11H,11H,12H,52H,0FBH,1AH,16H,11H,11H,00H //李
// DB 00H,12H,0AH,0FEH,0ABH,0AAH,0AAH,0FEH,0AH,12H,00H,00H //春
DB 40H,21H,1DH,09H,1FH,25H,41H,5DH,54H,53H,58H,00H   //起
DB  84H,45H,35H,3DH,55H,95H,84H,0AFH,9DH,91H,0AFH,80H //题
// DB 03H,04H,08H,10H,20H,60H,20H,10H,08H,04H,02H,01H  //心形

//<<我说我的眼里只有你>>
TAB13://定时器高八位初值
      DB 00H,0FAH,0FAH,0FBH,0FBH,0FCH,0FCH,0FCH,0FCH,0FDH
  DB 0FDH,0FDH,0FCH,0FCH,0FCH,0FCH,0FBH,0FCH,0FCH,0FBH
  DB 0FDH,0FDH,0FDH,0FDH,0FDH,0FDH,0FCH,0FAH,0FAH,0FBH
  DB 0FBH,0FCH,0FCH,0FCH,0FCH,0FDH,0FDH,0FDH,0FCH,0FCH
  DB 0FCH,0FCH,0FBH,0FDH,0FDH,00H,0FCH,0FDH,0FDH,0FDH
  DB 0FCH,0FCH,00H,0FCH,0FCH,0FDH,0FCH,0FDH,0FCH,0FDH
  DB 00FDH,0FCH,00H,0FCH,0FDH,0FDH,0FDH,0FDH,0FDH,0FDH
  DB 0FDH,0FDH,00H,0FDH,0FDH,0FDH,0FDH,0FDH,0FDH,0FDH
  DB 0FDH,0FDH,0FDH,0FCH,0FDH,0FDH,0FDH,0FDH,0FCH,0FCH
  DB 0FCH,0FDH,0FDH,0FDH,0FCH,0FCH,0FDH,0FCH,0FDH,0FCH
  DB 0FDH,0FDH,0FCH,00H,0FCH,0FDH,0FDH,0FDH,0FDH,0FDH
  DB 0FDH,0FDH,0FDH,00H,0FDH,0FDH,0FDH,0FDH,0FDH,0FDH
  DB 0FDH,0FDH,0FDH,0FDH,0FCH,0FDH,0FDH,0FDH,0FDH,0FCH
  DB 0FCH,0FCH,0FDH,0FDH,0FDH,0FDH,0FDH,0FCH,0FDH,0FFH
TAB14://定时器低八位初值
      DB  00H,15H,67H,04H,04H,44H,0ACH,44H,0ACH,09H
  DB  34H,82H,88H,0ACH,44H,0CH,90H,0CH,44H,04H
  DB  0C8H,82H,34H,09H,34H,09H,0ACH,15H,67H,04H
  DB  04H,44H,0ACH,44H,0ACH,09H,34H,82H,88H,0ACH
  DB  44H,0CH,90H,0C8H,82H,00H,0ACH,09H,34H,09H
  DB  0ACH,44H,00H,44H,0ACH,09H,0ACH,09H,0ACH,09H
  DB  82H,0ACH,00H,0ACH,09H,34H,09H,34H,09H,34H
  DB  0C8H,09H,00H,09H,34H,082H,34H,09H,34H,82H
  DB  82H,34H,09H,0ACH,09H,34H,34H,09H,0ACH,44H
  DB  0ACH,09H,0C8H,82H,44H,0ACH,09H,0ACH,09H,0ACH
  DB  09H,82H,0ACH,00H,0ACH,09H,34H,09H,34H,09H
  DB  34H,0C8H,09H,00H,09H,34H,82H,34H,09H,34H
  DB  82H,82H,34H,09H,0ACH,09H,34H,34H,09H,0ACH
  DB  44H,0ACH,09H,0C8H,82H,34H,09H,0ACH,09H,0FFH
TAB15://节拍时值表
  db  4,4,4,8,4,4,8,4,4,4
  db  4,4,4,8,4,4,8,4,4,4
  db  4,4,4,8,4,4,8,4,4,8
  db  4,4,8,4,4,4,4,4,4,8
  db  4,4,8,6,8,4,2,2,6,6
  db  4,20,4,4,4,2,2,2,2,4
  db  4,8,4,2,2,2,2,2,2,4
  db  4,8,4,2,2,2,2,2,2,6
     db  2,2,2,2,2,6,2,2,2,2
    db  2,4,4,8,4,4,2,2,2,2
    db  4,4,8,4,2,2,2,2,2,2
  db  4,4,8,4,2,2,2,2,2,2
  db  6,2,2,2,2,2,6,2,2,2
  db  2,2,4,4,8,2,4,2,64

// <<阿里山的姑娘>>
TAB16://定时器高八位数据
   DB  00H,0FDH,0FDH,0FDH,0FCH,0FDH,0FDH,0FDH,0FDH,0FDH
   DB  0FCH,0FDH,0FDH,0FDH,0FDH,0FCH,0FCH,0FBH,0FCH,0FCH
   DB  0FCH,0FBH,0FBH,0FBH
   DB   0FDH,0FDH,0FDH,0FDH,0FDH,0FDH,0FDH,0FDH,0FCH,0FCH
   DB   0FDH,0FCH,0FBH,0FBH,0FCH,0FCH,0FCH,0FDH,0FDH,0FDH
   DB   0FDH,0FCH,0FDH,0FCH,0FCH,0FCH,0FCH,0FCH,0FBH,0FBH
   DB   0FBH,0FBH,0FCH,0FBH,0FBH,0FBH,0FCH,0FDH,0FCH,0FCH
   DB   0FCH,0FDH,0FDH,0FDH,0FCH,0FDH,0FCH,0FBH,0FCH,0FCH
   DB   0FCH,0FBH,0FBH,0FBH,0FDH,0FDH,0FDH,0FDH,0FDH,0FDH
   DB   0FDH,0FCH,0FDH,0FCH,0FDH,0FCH,0FBH,0FBH,0FCH,0FCH
   DB   0FCH,0FDH,0FDH,0FDH,0FDH,0FCH,0FDH,0FCH,0FCH,0FCH
   DB   0FCH,0FCH,0FBH,0FBH,0FBH,0FDH,0FCH,0FDH,0FDH,0FDH
   DB   0FDH,0FDH,0FCH,0FDH,0FDH,0FDH,0FCH,0FBH,0FCH,0FCH
   DB   0FCH,0FBH,0FBH,0FBH,0FDH,0FDH,0FDH,0FDH,0FDH,0FDH
   DB   0FDH,0FCH,0FDH,0FCH,0FDH,0FCH,0FBH,0FBH,0FCH,0FCH
   DB   0FDH,0FDH,0FDH,0FDH,0FCH,0FDH,0FDH,0FDH,0FDH
   DB   00H,0FDH,0FDH,0FDH,0FDH,0FDH,0FEH,0FEH,0FEH
   DB   0FDH,0FDH,0FDH,0FDH,0FDH,0FEH,0FDH,0FDH,0FCH,0FDH
   DB   0FDH,0FDH,0FCH,0FDH,0FCH,0FBH,0FDH,0FCH,0FDH,0FDH
   DB   0FCH,0FDH,0FBH,0FCH,0FDH,0FCH,0FCH,0FBH,0FFH   //  0FBH,0FBH,
TAB17://定时器低八位数据
   DB  00H,09H,82H,09H,0ACH,09H,82H,0C8H,82H,09H
   DB  0ACH,09H,82H,09H,09H,0ACH,0ACH,90H,44H,0ACH
   DB  44H,90H,04H,90H 
   DB   0C8H,0C8H,0C8H,82H,82H,09H,09H,09H,0ACH,0ACH
   DB   09H,44H,90H,90H,0ACH,0ACH,0ACH,09H,82H,09H
   DB   09H,0ACH,09H,0ACH,44H,44H,0ACH,44H,90H,04H 
   DB   90H,90H,44H,90H,90H,04H,0ACH,09H,0ACH,44H
   DB   0ACH,09H,82H,09H,0ACH,09H,0ACH,90H,44H,0ACH
   DB   44H,90H,04H,90H,0C8H,0C8H,0C8H,82H,82H,09H
   DB   09H,0ACH,09H,0ACH,09H,44H,90H,90H,0ACH,0ACH
   DB   0ACH,09H,82H,09H,09H,0ACH,09H,0ACH,44H,44H 
   DB   0ACH,44H,90H,04H,90H,09H,0ACH,09H,82H,0C8H
   DB   82H,09H,0ACH,09H,82H,09H,0ACH,90H,44H,0ACH
   DB   44H,90H,04H,90H,0C8H,0C8H,0C8H,82H,82H,09H
   DB   09H,0ACH,09H,0ACH,09H,44H,90H,90H,0ACH,0ACH
   DB   09H,82H,09H,82H,0ACH,09H,82H,0C8H,0C8H
   DB   00H,0C8H,0C8H,0C8H,0C8H,0C8H,22H,57H,22H
   DB   0C8H,82H,09H,0C8H,82H,22H,0C8H,82H,0ACH,09H 
   DB   82H,82H,0ACH,09H,0ACH,90H,09H,0ACH,09H,82H
   DB   0ACH,09H,90H,44H,09H,0ACH,44H,90H,0FFH //   90H,90H ,
TAB18://节拍时值表
     DB  2,2,1,1,2,2,2,1,1,2
DB  2,12,2,2,3,1,3,1,2,1
DB  1,2,2,16
DB  2,2,2,2,2,2,4,2,2,2
DB  2,2,2,4,3,1,2,2,2,2
DB  4,3,1,2,2,2,1,1,2,2
DB  16,2,1,1,2,2,2,1,1,2
DB  2,12,2,2,2,2,2,2,2,1
DB  1,2,2,16,2,2,2,2,2,2
DB  4,2,2,2,2,2,2,4,3,1
DB  2,2,2,2,4,3,1,2,2,2
DB  1,1,2,2,16,4,2,2,2,1
DB  1,2,2,12,2,2,5,2,2,1
DB  1,2,2,16,3,1,2,2,2,2
DB  4,3,1,3,1,2,2,4,4,2
DB  2,4,2,2,8,5,2,16,12
DB  12,3,1,2,2,2,2,2,2
DB  4,2,2,4,2,2,4,2,2,2
DB  2,2,2,2,2,4,4,2,2,4
DB  2,2,2,2,2,1,1,16   //,4,8

//<<犯错>>
TAB19://定时器高八位数据
      DB  00H,0FBH,0FBH,0FCH,0FCH,0FDH,0FDH,0FDH,0FCH,0FCH
  DB  0FDH,0FCH,0FCH,0FDH,0FDH,0FDH,0FDH,0FDH,0FDH,0FDH
  DB  0FDH,0FDH,0FCH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,90H,04H
  DB  0C8H,82H,09H,0ACH,0ACH,09H,  00H
    db  04H,90H,44H,0ACH,82H,09H,09H,0ACH,0ACH,09H
  db  44H,0ACH,09H,82H,0C8H,82H,82H,09H,09H,82H
  db  09H,0ACH,44H,09H,0ACH,44H,0ACH,90H,04H,0C8H
  db  82H,09H,0ACH,44H,44H,00H,22H,06H,0C8H,0C8H
  db  0C8H,0C8H,09H,82H,0C8H,82H,00H,09H,82H,0C8H
  db  22H,22H,22H,85H,57H,22H,00H,82H,0C8H,22H
  db  22H,22H,57H,0C8H,82H,09H,82H,00H,09H,82H
  db  0C8H,22H,22H,22H,0C8H,0C8H,82H,22H,06H,0C8H
  db  0C8H,0C8H,0C8H,09H,82H,0C8H,82H,00H,09H,82H
  db  0C8H,22H,22H,22H,85H,57H,22H,00H,82H,0C8H
  db  22H,22H,22H,57H,0C8H,82H,09H,82H,00H,09H
  db  82H,0C8H,22H,22H,0C8H,82H,0C8H,06H,0C8H,82H
  db  04H,90H,44H,0ACH,82H,09H,09H,0ACH,0ACH,09H
  db  44H,0ACH,09H,82H,0C8H,82H,82H,09H,09H,82H
  db  09H,0ACH,44H,09H,0ACH,44H,0ACH,90H,04H,0C8H
  db  82H,09H,0ACH,44H,00H,0FFH
TAB21://节拍时值表
      DB  2,2,2,2,2,4,4,4,2,2
  DB  8,2,2,2,2,4,4,4,2,2
  DB  8,2,2,2,2,4,2,4,4,2
  DB  4,4,2,2,4,16,8
  DB  2,2,2,2,4,4,4,2,2,8
  DB  2,2,2,2,4,4,4,2,2,8
  DB  2,2,2,2,4,2,4,4,2,4
  DB  4,4,2,2,16,8,4,2,2,4
  DB  2,2,4,2,2,8,4,2,2,4
  DB  2,2,4,2,2,8,4,2,2,4
  DB  4,4,4,2,2,2,2,4,2,2
  DB  4,2,2,2,4,2,8,4,2,2
  DB  4,2,2,4,2,2,8,4,2,2
  DB  4,2,2,4,2,2,8,4,2,2
  DB  4,4,4,4,2,2,2,2,4,2
  DB  2,4,4,4,2,2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H,0FDH,0FDH,0FDH,0FEH,0FDH,0FEH,0FDH,0FDH
DB  0FEH,0FEH,0FDH,0FDH,00H,0FDH,0FDH,0FDH,0FEH,0FDH
DB  0FEH,0FDH,0FDH,0FEH,0FEH,0FEH,0FEH,0FEH,0FEH,00H
DB  00H,0FDH,0FDH,0FDH,0FEH,0FDH,0FEH,0FDH,0FDH,0FEH
DB  0FEH,0FEH,0FEH,0FEH,0FEH,0FEH,0FEH,0FEH,0FEH,0FEH
DB  0FEH,0FEH,0FEH,0FDH,0FDH,0FEH,0FEH,0FEH,0FEH,0FEH
   DB  0FEH,00H   ,0FFH    */
TAB5:    //定时器低八位数据
DB  00H,09H,09H,09H,82H,022H,00H,82H,82H,22H
DB  82H,0C8H,00H,34H,34H,09H,82H,22H,57H,57H
DB  22H,00H,22H,57H,85H,06H,06H,0C8H,06H,00H
DB  82H,82H,0C8H,22H,22H,0C8H,57H,22H,82H,82H
DB  85H,9AH,85H,85H,57H,0C8H,22H,0A7H,0C8H,82H
DB  00H,09H,09H,09H,82H,022H,00H,82H,82H,22H
DB  82H,0C8H,00H,34H,34H,09H,82H,22H,57H,57H
DB  22H,00H,22H,57H,85H,06H,06H,0C8H,06H,00H
DB  82H,82H,0C8H,22H,22H,0C8H,57H,22H,82H,82H
DB  85H,9AH,85H,85H,57H,0C8H,22H,00H,82H,0C8H

DB  22H,22H,22H,57H,85H,85H,85H,85H,57H,85H
DB  85H,0C1H,0C1H,0C1H,0C1H,85H,57H,57H,57H,57H
DB  57H,57H,0C1H,0C1H,82H,82H,57H,22H,22H,82H
DB  82H,9AH,85H,57H,0A7H,82H,22H,57H,85H,85H
DB  85H,85H,57H,85H,85H,0C1H,0C1H,82H,82H,85H  
  DB  57H,57H,57H,22H,57H,57H ,0ffh  /*   ,0C1H,0C1H,82H 82H
DB  57H,22H,22H,82H,82H,85H,85H,57H,22H,22H
     DB  00H,00H,82H,82H,0C8H,22H,0C8H,22H,82H,82H
DB  9AH,85H,82H,82H,00H,82H,82H,0C8H,22H,0C8H
DB  22H,82H,82H,85H,57H,57H,22H,57H,85H,00H
DB  00H,82H,82H,0C8H,22H,0C8H,22H,82H,82H,85H
DB  85H,57H,22H,85H,85H,0C1H,85H,57H,22H,57H
DB  22H,85H,22H,0C8H,82H,85H,9AH,85H,57H,22H
DB  57H,00H   ,0FFH     */
TAB6: //节拍时值表
db  4,2,2,4,2,18,4,2,2,4
db  2,18,4,2,2,4,4,4,2,6
  db  4,4,2,2,4,2,6,2,8,4
db  2,2,4,4,4,4,4,10,4,4
db  4,4,4,16,4,4,16,4,4,24
db  4,2,2,4,2,18,4,2,2,4
db  2,18,4,2,2,4,4,4,2,6
db  4,4,2,2,4,2,6,2,8,4
db  2,2,4,4,4,4,4,10,4,4
  db  4,4,4,16,4,4,8,6,2,4

  db  4,16,6,2,8,4,4,4,2,2
  db  2,2,4,4,2,2,4,2,6,2
db  2,2,2,4,4,2,2,4,2,6
db  2,2,4,4,4,16,8,8,4,4
db  4,2,2,2,2,4,4,2,2,6
  db  2,4,2,2,2,2/*,4,4,2 ,2
  db  6,2,4,2,2,2,6,6,2,24
db  8,4,2,2,2,2,2,6,2,2
db  4,8,4,24,4,2,2,2,2,2
  db  6,2,2,2,6,4,4,4,12,8
db  4,2,2,2,2,2,6,2,2,2
  db  6,4,4,4,4,4,4,2,6,4
  db  4,2,18,2,2,6,2,4,12,8
db  8,8 */

END ;程序结束
关键字:滚动汉字  播放音乐  汇编程序 引用地址:边显示滚动汉字边播放音乐的汇编程序

上一篇:TLC5615简易数控电压表
下一篇:nRF2401无线通信模块调试

推荐阅读最新更新时间:2024-03-16 13:06

51单片机+DS18B20温控保温汇编程序
;DS18B20和AT89C2051制作的热水器程序!两位数码管显示温度,设定温度时数码管成闪烁状态,延时几秒后跳转到被测温度;DS18B20的正电源就是红线接+5伏,兰线接地,黄线接P3.2,红线和黄线之间接一个4.7K的上拉电阻 ;这是关于DS18B20的读写程序,数据脚P3.2,晶振12MHz ;温度传感器18B20汇编程序,采用器件默认的12位转化,最大转化时间750微秒 ;可以将检测到的温度直接显示到AT89C2051的p1口输数码管段码到两位一体数码管上 ;显示温度00到99度,很准确哦~~无需校正! ;p3.1驱动加热管装置,让温度保温在0-99度内 ;p3.0保温指示灯,p3.4是温度设定按键加1度;p3.5是温度
[单片机]
51单片机时钟汇编程序
终于到了 感动ing...自己也可以DIY一个电子时钟了。 电路板和原件要另外找,南宁市的电子元件稀少得真难找啊,弄好后焊接,看来要找个好点的焊台,这样焊接电路时比较方便。 电路如下: ;简单的89C2051时钟程序 ;显示方式为.12:34之12小时制 ;P1口输出段数据,P3口输出位数据 ;P1.7为秒点,P3.7为PM输出 ;P3.4校时,P3.5校分 ;晶振12MHz flash equ 31h sec equ 32h ;定义秒存储位置 min equ 33h ;定义分存储位置 hour equ 34h hourk bit p3.4 ;调时按钮 mink bit
[单片机]
基于单片机的点阵式LED滚动汉字显示屏仿真设计
  1.引言   点阵式 led 组成的汉字 显示屏 在公共场所应用非常广泛。例如,车站发车时间提示、股票大厅中的股票价格 显示 板、商场的活动广告栏、候机厅的起飞时间表。点阵显示器的特点是可以按照需要的大小、形状和颜色进行组合,用单片机控制实行各种文字或图型的变化,达到广告宣传和提示的目的。   Proteus是一款新颖的 嵌入式系统 软硬件设计仿真平台,特别适用于单片机仿真,能够在线、实时仿真多种类型的单片机,诸如MCS-51系列单片机、P IC 单片机、AVR单片机等,能够像硬件仿真器一样进行软硬件调试,而没必要花钱去购买和维护价格不菲的仿真器,对于初学单片机的人来说,既减少了学习成本,又达到了良好的学习效果。   2.
[单片机]
基于单片机的点阵式LED<font color='red'>滚动</font><font color='red'>汉字</font>显示屏仿真设计
T0作定时器汇编程序(查询法)
单片机T0作定时器实现数码管显示的汇编程序(查询法) 电路是:P0口接数码管的字型码笔段,P2口接数码管的数位选择端. SECOND EQU 30H TCOUNT EQU 31H ORG 00H START: MOV SECOND,#00H MOV TCOUNT,#00H MOV TMOD,#01H MOV TH0,#(65536-50000)/256 MOV TL0,#(65536-50000) MOD 256 SETB TR0 DISP: MOV A,SECOND MOV B,#10 DIV A B
[单片机]
P89LPC932A1测脉冲宽度汇编程序
/********************CCU_Capture.asm*************************** ;程序功能:对一方波的每一次电平跳变进行捕获,并用捕获值计算方波 的脉冲宽度,占空比,周期或其他。 ;************************************************************/ $NOMOD51 $INCLUDE(REG932.INC) ICRAH_DAT1 DATA 41H ;第一次捕获值高字节 ICRAL_DAT1 DATA 42H ;第一次捕获值低字节 ICRAH_DAT2 DATA 43H ;第二次捕获值高字节 ICRAL_DAT2 DATA 4
[单片机]
节能音乐手机步入新时代:NXP 创造史上最长播放时间
专用协处理器实现高质量便携式音乐播放器,播放时间最长可达100小时 中国,北京, 2007年3月2日 – NXP 半导体公司(前身为飞利浦半导体公司)今天发布了一个音乐手机解决方案,它能在电话上体现个人音乐播放器的美妙体验,同时还能提供长达100小时的播放时间。除了更长的播放时间外,消费者还将能够享受到一款最先进的音乐播放器所能带来的其他好处,同时也能使用其手机的标准功能,如内容的高速下载等。 新推出的Nexperia?移动多媒体处理器PNX0150充当独立于主处理器的专用节能协处理器,使音乐手机的应用程序具有并行计算的功能和效率。该协处理器使电话在播放和录制音乐的同时,能够更明确地访问存储媒介,而电池耗电量最多仅有12毫安
[新品]
DSP的汇编程序优化
1 引言   数字信号处理器(DSP)相对于模拟信号处理器有很大的优越性,表现在精度高,灵活性大,可靠性好,易于大规模集成等方面。随着半导体制造工艺的发展和计算机体系结构的改进,数字信号处理器的功能越来越强大,对信号处理系统的研究重点又重新回到软件算法上,而不再像过去那样过多地考虑硬件的可实现性。随着DSP运算能力的不断提高,能够实时处理的信号带宽也大大增加,数字信号处理的研究重点也由最初的非实时性应用转向高速实时应用。   目前大多数DSP虽然都支持C语言编程,但是在实际工程应用中,最常用的方法是用C语言编写流程控制。搭建工程框架,具体的算法模块及比较耗时的功能模块还是采用汇编语言来编写。这是因为C语言虽然具有易读性、可
[嵌入式]
C编写8051单片机音乐播放程序
#define uchar unsigned char //定义一下方便使用 #define uint unsigned int #define ulong unsigned long #include reg52.h //包括一个52标准内核的头文件 char code dx516 _at_ 0x003b;//这是为了仿真设置的 sbit BEEP=P1^7; //喇叭输出脚 sbit P10=P1^0; sbit K1= P3^2; sbit K2= P3^5; sbit K3= P2^4; sbit K4= P2^5; uchar th0_f; //在中断中装载的T0的值高8位 uchar tl0_f;
[单片机]
小广播
添点儿料...
无论热点新闻、行业分析、技术干货……
热门活动
换一批
更多
设计资源 培训 开发板 精华推荐

最新单片机文章
何立民专栏 单片机及嵌入式宝典

北京航空航天大学教授,20余年来致力于单片机与嵌入式系统推广工作。

更多精选电路图
换一换 更多 相关热搜器件
更多每日新闻
随便看看
电子工程世界版权所有 京B2-20211791 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号 Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved