基于单片机 C52 的音乐播放 C 语言程序 //此程序在硬件上调试通过 //本程序的单片机晶振采用 11.0592M #include "reg52.h" #include "intrins.h" //#define uchar unsigned char //#define uint unsigned int sbit BEEP = P1^0; sbit S1 = P3^3; sbit S2 = P3^5; unsigned char timer0h,timer0l,timer0h1,timer0h2,timer0l1,timer0l2,time1,time2; //void Delay_MS(); 保存了 4 个八度的 28个频率数据 unsigned char code FREQH[]= { 0xf2,0xf3,0xf5,0xf5,0xf6,0xf7,0xf8