|
马上注册,结交更多好友,享用更多功能^_^
您需要 登录 才可以下载或查看,没有账号?立即注册
x
- #include <REGX52.H>
- sbit WE = P2^7; //?????????? ??? WE???? ????? P2^7???? ??U8???????
- sbit DU = P2^6; //?????????? ??? DU???? ????? P2^7???? ??U9???????
- #define uchar unsigned char //???(?????,????,???????)?????uchar???unsigned char ???????uchar num???unsigned char num;
- #define uint unsigned int //???(???????)
- uint num; //????num
- uchar code table[] = { //??0~f???
- 0x3f,0x06,0x5b,0x4f,
- 0x66,0x6d,0x7d,0x07,
- 0x7f,0x6f,0x77,0x7c,
- 0x39,0x5e,0x79,0x71};
- void delay(uint z) //????
- {
- unsigned int x,y;
- for(x = z;x>0;x--)
- for(y=144;y>0;y--);
- }
- void main() //???
- {
- while(1) //?????
- {
- for(num=0;num<19;num++) //16??????
- {
- WE = 1; //??U8???(U8???)
- P0 = 0x00; //??????,??8????
- WE = 0; //??U8???
- delay(1000); //??????
-
- DU = 1; //??U9???(U9???)
- P0 = table[num]; //??????,???????
- DU = 0; //??U9???
- }
- }
- }
复制代码
为什么用keil会报错,怎么修改 |
|