#include <reg52.h>
#define uchar unsigned char
#define uint unsigned int
uchar KY;
//uchar num=0;
uchar disp=0;
uchar code a[]={
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x44,0x00,0x54,0xff,0x54,0x15,0x7f,0x55,
0x54,0x95,0x54,0x7f,0x44,0x00,0x20,0x09,
0x28,0x49,0x27,0x89,0xe4,0x7f,0x34,0x09,
0x2c,0x09,0xe0,0x1f,0x00,0x01,0x00,0x00,
0x10,0x40,0x10,0x22,0xf0,0x15,0x1f,0x08,
0x10,0x16,0xf0,0x61,0x80,0x20,0x88,0x18,
0x88,0x06,0x88,0x01,0xff,0xff,0x88,0x01,
0x88,0x06,0x88,0x18,0x80,0x20,0x00,0x00,
0x80,0x00,0x82,0x00,0x82,0x00,0x82,0x00,
0x82,0x00,0x82,0x40,0x82,0x80,0xe2,0x7f,
0xa2,0x00,0x92,0x00,0x8a,0x00,0x86,0x00,
0x82,0x00,0x80,0x00,0x80,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
};
/*****延时程序*****/
void Delay(uint n)
{
uint x;
for(x=0;x<n;x++);
}
void play()
{
uchar i;
/*if(num>10)
{disp++;num=0;}
if(disp>1) disp=0;*/
Delay(4000);
for(i=0;i<64;i++)
{
P1=~a[i*2];
P2=~a[i*2+1];
Delay(200);
}
}
void main(void)
{
IT0=1;
EX0=1;
EA=1;
KY=0;
while(1)
{
}
}
void cut(void) interrupt 0 using 1 //中断服务//
{
KY=~KY;
if(KY==0)
{
play();
// num++;
}
}