为什么我8*8的点阵加了延时后只是闪了一下,而不是亮一会儿了呢#include<reg51.h>
#define uchar unsigned char
#define uint unsigned int
uchar code table[]={0xfe,0xfd,0xfb,0xf7,0xef,0xdf,0xbf,0x7f};
uchar code table1[]={0x00,0x00,0x02,0x03,0x02,0x00,0x00,0x00};
uchar code table2[]={0x00,0x00,0x04,0x06,0x04,0x00,0x00,0x00};
void delay(uint z)
{
while(z--);
}void main()
{
uint i; for(i=0;i<8;i++)
{
P2=table
;
P0=table1;
delay(50);
} delay(50000);
for(i=0;i<8;i++)
{
P2=table;
P0=table2;
delay(50);
} delay(50000);
while(1);}
此帖出自小平头技术问答
{
P2=table;
P0=table1;
delay(50);
}
delay(50000);
for(i=0;i<8;i++)
{
P2=table;
P0=table2;
delay(50);
}
delay(50000);
一周热门 更多>