?? display.h
字號:
unsigned char code number[10]={0x28,0xeb,0x32,0xa2,0xe1,
0xa4,0x24,0xea,0x20,0xa0}; // 0 1 2 3 4 5 6 7 8 9
#define one P2_4
#define two P2_5
#define three P2_6
#define four P2_7
#define Port P0
unsigned char i;
void playdelay()
{
for(i=0;i<250;i++);
}
display(unsigned int m)
{
unsigned char x;
one=1;two=1;three=1;four=1;
x=m/1000;
Port=number[x];
one=0;
playdelay();
x=m%1000/100;
Port=number[x];
one=1;two=0;
playdelay();
x=m%100/10;
Port=number[x];
two=1;three=0;
playdelay();
x=m%10;
Port=number[x];
three=1;four=0;
playdelay();
four=1;
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -