用實驗板跑出來是錯誤的~~~請高手大大幫忙看一下!!!
#include<io51.h>
#define mask 0XFF
unsigned char seg={0x81,0xCF,0x92,0x86,0xCC,0xA4,0xA0,0x8F,0x80,0x8C,0x88,0xE0,0xF2,0xC2,0xB0,0xB8,0xFF}; //宣告7段顯示器的數字
int delay(int t){while(t--);
return 0;}
int keyscan(unsigned char dg)
{
unsigned char keyin,key=16;
keyin=P0&0X0F;
if(dg==0X08){
if(keyin==0X0E) key=0;
else if(keyin==0X0D) key=1;
else if(keyin==0X0B) key=2;
else if(keyin==0X07) key=3;
}
else if (dg==0X04){
if(keyin==0X0E) key=4;
e ..
訪客只能看到部份內容,免費 加入會員 或由臉書 Google 可以看到全部內容