蜂鸣器发声,k1按钮播放暂停,k2选择歌曲
#include <reg51.h>
#include <intrins.h>
#define uchar unsigned char
#define uint unsigned int
uchar Song_Index = 0,Tone_Index = 0;
sbit SPK = P3^7;
sbit K1 = P1^0;
uchar code DSY_CODE[]=
{
0xc0,0xf9,0xa4,0xb0,0x99,0x92,0x82,0xf8,0x80,0x90
};
uchar code HI_LIST[]=
{
0,266,229,232,233,236,238,240,241,242,244,245,246,247,248
};
uchar code LO_LIST[]=
{
0,4,13,10,20,3,8,6,2,23,5,26,1,4,3
};
uchar code Song[][50]=
{
{
1,2,3,<