while
(1)
{
P0=0xFF;
switch
(i)
{
case
0: IO0_OUT();P0=LedChar[0];
break
;
case
1: IO0_OUT();P0=LedChar[1];
break
;
case
2: IO0_OUT();P0=LedChar[2];
break
;
case
3: IO0_OUT();P0=LedChar[3];
break
;
case
4: IO1_OUT();P0=LedChar[3];
break
;
case
5: IO2_OUT();P0=LedChar[3];
break
;
case
6: IO3_OUT();P0=LedChar[3];
break
;
case
7: IO4_OUT();P0=LedChar[3];
break
;
case
8: IO5_OUT();P0=LedChar[3];
break
;
case
9: IO5_OUT();P0=LedChar[4];
break
;
case
10:IO5_OUT();P0=LedChar[5];
break
;
case
11:IO5_OUT();P0=LedChar[0];
break
;
case
12:IO4_OUT();P0=LedChar[0];
break
;
case
13:IO3_OUT();P0=LedChar[0];
break
;
case
14:IO2_OUT();P0=LedChar[0];
break
;
case
15:IO1_OUT();P0=LedChar[0];
break
;
}
if
(KEY4==0)i++;
if
(i>=16)i=0;
delay_ms(30);
}