main.c
#include <stc15f2k60s2.h>
#include <juzhen.h>
unsigned char display[]={
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff};
unsigned char smg[]={
0xc0,0xf9,0xa4,0xb0,0x99,0x92,0x82,0xf8,0x80,0x90,0xff};
unsigned char cun[8]={
10,10,10,10,10,10,10,10};
unsigned char hw;
void Timer0Init();
void huanwei();
void main()
{
Timer0Init();EA=1;ET0=1;
P2=0XA0;P0=0X00;P2=0X1f;
while(1)
{
huanwei();
anjian();
xianshi();
}
}
void huanwei()
{
unsigned char h;
if((k<=8)&(hw==1))
{
hw=0;
for(h=k-1;h>0;h--)
{
cun[h]=cun[h-1];
}
cun[0]=key;
}
}
void xianshi()
{
if(k=&#