#include<reg52.h>
#define uchar unsigned char
#define uint unsigned int
sbit KEY1 = P3^4;
sbit KEY2 = P3^5;
sbit KEY3 = P3^6;
sbit IN1 = P1^0;
sbit IN2 = P1^1;
sbit ENA = P1^2;
sfr ldata=0x80;
sbit dula=P2^6;
sbit wela=P2^7;
//sbit lcden=P3^4;
//uchar timer,ms,t_set = 1;
uchar T_N=100;
uchar T_N1=100;
uchar T_H_N=50;
uchar T_H_N1=50;
void msplay(uchar,uchar);
uchar code
x1[]={0x3f,0x06,0x5b,0x4f,0x66,0x6d,0x7d,0x27,0x7f,0x6f,0x77,0x7c,0x39,0x5e,0x79,0x71};
//uchar code
x2[]={0xc0,0xf9,0xa4,0xb0,0x99,0x92,0x82,0xd8,0x80,0x90,0x88,0x83,0xc6,0xa1,0x86,0x8e};
uchar code x3[]={0xfe,0xfd,0xfb,0xf7,0xef,0xdf};
//uchar code x4[]={0x01,0x02,0x04,0x08,0x10,0x20};
void delay(uint z) //延时函数
{
uint x;
for(x=z;x>0;x--);
}
评论0
最新资源