const u8 LED[32]={0xFF,0xFE,0xFD,0xFB,0xF7,0xEF,0xDF,0xBF,0x7F,
0x7F,0xBF,0xDF,0xEF,0xF7,0xFB,0xFD,0xFE,0xFF,
0xFF,0xFE,0xFC,0xF8,0xF0,0xE0,0xC0,0x80,0x00,
0xE7,0xDB,0xBD,0x7E,0xFF};
void led_run()
{
u8 i;
for(i=0;i<32;i++)
{
P0=LED[i];
delay_ms(500);
}上面函数在赛元单片机中运行不正常,在其它单片机中运行正常。
以下拆开这样写运行正常,请问是啥问题?
P0=0XFF;
delay_ms(500);
P0=0XFE;
delay_ms(500);
P0=0XFD;
delay_ms(500);
P0=0XFB;
delay_ms(500);
P0=0XF7;
delay_ms(500);
P0=0XEF;
delay_ms(500);
P0=0XDF;
delay_ms(500);
P0=0XBF;
delay_ms(500);
P0=0X7F;
delay_ms(500); |