#include<reg52.h>
#include<intrins.h>
#define uchar unsigned char
#define uint unsigned int
sbit we = P2^7;
sbit du = P2^6;
sbit S2 = P3^0;
sbit S3 = P3^1;
sbit S4 = P3^2;
sbit S5 = P3^3;
void delay (uint z)
{
uint x,y;
for(x = z;x>0;x--)
for(y = 114;y>0;y--);
}
uchar code leddata[]={
0x3F, //"0"
0x06, //"1"
0x5B, //"2"
0x4F, //"3"
0x66, //"4"
0x6D, //"5"
0x7D, //"6"
0x07, //"7"
0x7F, //"8"
#include<intrins.h>
#define uchar unsigned char
#define uint unsigned int
sbit we = P2^7;
sbit du = P2^6;
sbit S2 = P3^0;
sbit S3 = P3^1;
sbit S4 = P3^2;
sbit S5 = P3^3;
void delay (uint z)
{
uint x,y;
for(x = z;x>0;x--)
for(y = 114;y>0;y--);
}
uchar code leddata[]={
0x3F, //"0"
0x06, //"1"
0x5B, //"2"
0x4F, //"3"
0x66, //"4"
0x6D, //"5"
0x7D, //"6"
0x07, //"7"
0x7F, //"8"