通过C编写C语言程序,单片机 uchar code table0[]={0xfe,0xfd,0xfb,0xf7,0xef,0xdf,0xbf,0x7f};//从低位往高位移一个灯
6 uchar code table1[]={0x7f,0xbf,0xdf,0xef,0xf7,0xfb,0xfd,0xfe};//从高位往低位移一个灯
7
8 uchar code table2[]={0xfe,0xfc,0xf8,0xf0,0xe0,0xa0,0x80,0x00};//从低位到高位逐步全部点亮
9 uchar code table3[]={0x7f,0x3f,0x1f,0x0f,0x07,0x03,0x01,0x00};//从高位到低位逐步全部点亮
10
11 uchar code table4[]={0x01,0x03,0x07,0x0f,0x1f,0x3f,0x7f,0xff};//从低位到高位逐步全部熄灭
12 uchar code table5[]={0x80,0xa0,0xe0,0xf0,0xf8,0xfa,0xfe,0xff};//从高位到低位逐步全部熄灭
13
14 uchar code table6[]={0x01,0x02,0x04,0x08,0x10,0x20,0x40,0x80};//从低位到高位,灭一个灯移动
15 uchar code table7[]={0x80,0x40,0x20,0x10,0x08,0x04,0x02,0x01};//从高位到低位,灭一个灯移动
2021-11-03 11:25:14
75KB
单片机
c语言
1