#include
#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