#include<reg51.h>#define uchar unsigned char;#define uint unsigned int;sbit S2=P3^4;sbit S3=P3^5;sbit S4=P3^6;sbit S5=P3^7;sbit dula=P2^6;sbit wela=P2^7;uchar i;uchar code table[]={0x3f,0x06,0x5b,0x4f,0x66,0x6d,0x7d,0x07,0x7f,0x6f,0x77,0x7c,0x39,0x5e,0x79,0x71};
void display(uchar i){ dula=1; P0=table; dula=0; wela=1; P0=0xfe; wela=0;}void main(){ if(S2==0) display(1); if(S3==0) display(2); if(S4==0) display(3); if(S5==0) display(4);}
编译提示:17行,syntax error near‘;’
友情提示: 此问题已得到解决,问题已经关闭,关闭后问题禁止继续编辑,回答。
一周热门 更多>