微波EDA网,见证研发工程师的成长!
首页 > 硬件设计 > 嵌入式设计 > 51单片机控制蜂鸣器播放5首歌曲汇编程序

51单片机控制蜂鸣器播放5首歌曲汇编程序

时间:11-28 来源:互联网 点击:

1FH

TAB_TONE7: DB 0,20,19,17,20,19,17,20,20,19,20,20,19,17,20,19,17,16,16,15,16 ;虹彩妹妹

DB 17,17,19,20,22,20,19,17,17,19,15,17,17,17,17,17,13,13,12,13

DB 1FH

TAB_TONE8: DB 0,10,12,12,10, 13,13,14,13,13,13,12, 15,15,15,15,13,15,13, 12

DB 10,12,12,12,10, 13,13,14,13,13,13,12, 15,15,15,15,13,13,15,16

DB 19,19,19,19,19,17,16, 15,15,15,13,15,13,15, 16,16,16,16,15,17,16, 16

DB 17,17,17,17,16,15,15,15,16,15,13,12, 12,12,12,13,12,16,17,15

DB 1FH

TAB_TONE9: DB 0,00H

DB 1FH

TAB_TONE10: DB 0,00H

DB 1FH

;-------(实际音高表,每个音高包括两个延时值)-----------------

;第一个音符为6,7。。。

TAB_TONE: DB 29, 41, 11, 99, 131,6, 233,2, 13, 62

DB 14, 54, 233,1, 89, 5, 79, 5, 18, 27 ;( 高1)

DB 15, 29, 18, 21, 17, 21, 12, 27, 103, 1

DB 13, 19, 10,24 , 11,19

;----------------------乐曲播放速度表-----------------------

TAB_SPEED: DB 00H , 0C3H, 84H, 0E0H, 84H, 0D0H, 0EFH, 0CDH, 84H, 0CDH

DB 00H, 0C7H, 84H, 0CDH, 84H, 0CFH, 84H, 0CDH, 84H, 6DH

;-----------------------乐曲初值地址表----------------------------

TAB_NUM_L: DW TAB_L0, TAB_L1, TAB_L2, TAB_L3, TAB_L4, TAB_L5

DW TAB_L6, TAB_L7, TAB_L8, TAB_L9, TAB_L10

TAB_NUM_T: DW TAB_TONE0, TAB_TONE1, TAB_TONE2, TAB_TONE3, TAB_TONE4

DW TAB_TONE5, TAB_TONE6, TAB_TONE7, TAB_TONE8, TAB_TONE9

DW TAB_TONE10

NOP

NOP

END

Copyright © 2017-2020 微波EDA网 版权所有

网站地图

Top