#include "SoundPlay.h"
typedef unsigned int u16;
typedef unsigned char u8;
void show(u8 arr[],u8 length,u8 pos,u8 mode);
unsigned char calcArrLen(unsigned char arr[]);
void displayInit(void);
u8 total = 40;
u8 Pai[] = "040P ";
u8 code Number[]="0123456789";
u8 code ShowData[]="Piano Metronome ";
u8 code ShowData11[]="TEST: ";
u8 code ShowData22[]="Metronome: ";
u8 code ShowData1[]="510802023";
u8 code ShowData2[]="Welcome to use ";
u8 code ShowData3[]="press note";
u8 code ShowData4[]="Same song";
u8 code ShowData5[]="Song name";
u8 code ShowData6[]="aiwonijiubaobaowo";
u16 FreqTemp=0;
sbit LED1 = P3^6;
void main()
{
unsigned char i=0,key=0,timer=0,flag1=0;
LED1 = 0;
LcdInit(); //液晶屏初始化
timInit(); //定时器初始化
// AT24C02_Init(); //EEPROM初始化
ledOFF(); //关闭LED灯
InitialSound(); //音乐播放器初始化
displayInit();
while(1)
{
key=key_Scan();
if(key==0x16&&flag==0) //节拍增加
{
total++;
if(total > 210) total = 40;
Pai[0] = Number[total/100];
Pai[1] = Number[total%100/10];
11-10