|
#include <reg52.h>
#define uchar unsigned char
#define uint unsigned int
sbit k1=P3^2;
sbit k2=P3^3;
sbit led=P1^0;
uchar code table[]="zz,zy,qc";
void delayms(uint xms)
{
uint i,j;
for(i=xms;i>0;i--)
for(j=110;j>0;j--);
}
void init()
{
TMOD=0x20;
TH1=0xF4;
TL1=0xF4;
TR1=1;
SM0=0;
SM1=1;
EA=1;
ES=1;
}
|
|