#include #define uint unsigned int#define uchar unsigned charuchar code zou[]={0x01,0x02,0x04,0x08,0x10,0x20,0x40,0x80};//單個從0到7uchar code you[]={0x80,0x40,0x20,0x10,0x08,0x04,0x02,0x01};//單個從7到0uchar code liang0_7[]={0x01,0x03,0x07,0x0f,0x1f,0x3f,0x7f,0xff}; // 逐個點亮0~7uchar code liang7_0[]={0x80,0xc0,0xe0,0xf0,0xf8,0xfc,0xfe,0xff}; // 逐個點亮7~0uchar code mie0_7[]={0xfe,0xfc,0xf8,0xf0,0xe0,0xc0,0x80,0x00}; // 逐個滅0~7uchar code mie7_0[]={0x7f,0x3f,0x1f,0x0f,0x07,0x03,0x01,0x00}; // 逐個滅7~0/***********************************************************/void delay(uint t); //延時void zg(uint t,uchar a);//兩邊逐個亮void qs(uint t,uchar a);//全部閃爍void zgxh(uint t,uchar a); // 逆時針逐個點亮//void zgxh1(uint t,uchar a); // 順時針逐個點亮void djs(uint t,uchar a); //對角閃void lbzgm(uint t,uchar a);//兩邊逐個滅//void sszgm(uint t,uchar a); // 順時針逐個滅void nszgm(uint t,uchar a); // 逆時針逐個滅void sztl(uint t,uchar a);//順時逐個同步亮void nztl(uint t,uchar a);//逆時逐個同步亮void sztm(uint t,uchar a);//順時逐個同步滅void nztm(uint t,uchar a);//逆時逐個同步滅void hwzjl(uint t,uchar a); //橫往中間亮void hwzjm(uint t,uchar a); //橫往中間滅//void swzjl(uint t,uchar a); //豎往中間亮//void swzjm(uint t,uchar a); //豎往中間滅void nzdl(uint t,uchar a); //逆時逐段亮void nzdgl(uint t,uchar a); //逆時逐段一個點亮void jgs(uint t,uchar a); //間隔閃/**********************************************************/void zg(uint t,uchar a)//兩邊逐個亮{uchar i,j;for(j=0;j
評論