- #include "led.h"
- #include "delay.h"
- #define number 8
- #define lum 10
- uchar gewei1=0;
- uchar gewei2=0;
- uchar shiwei1=0;
- uchar shiwei2=0;
- uchar shuju[4]={0,0,0,0} ;
- uchar kong[16][8];
- uchar geweixia[16][8];
- uchar geweishang[16][8];
- uchar shiweixia[16][8];
- uchar shiweishang[16][8];
- uchar geweixia0[][8]=
- {
- {0x0C,0x0C,0x0C,0x18,0x10,0xE0,0x00,0x00},//"0",0//youxia
- {0x30,0x30,0x30,0x38,0x1C,0x07,0x00,0x00},//zuoxia
- {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
- {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
- {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
- {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
- {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
- {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
- };
-
- uchar geweixia1[][8]={
- {0x80,0x80,0x80,0x80,0x80,0xF8,0x00,0x00},//youxia/*"1",1*/
- {0x01,0x01,0x01,0x01,0x01,0x0F,0x00,0x00},//zuoxia
- {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
- {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
- {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
- {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
- {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
- {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
- };
-
- uchar geweixia2[][8]={
- {0x60,0x80,0x00,0x04,0x0C,0xF8,0x00,0x00},/*"2",2*///youxia
- {0x00,0x01,0x06,0x08,0x30,0x3F,0x00,0x00},//zuoxia
- {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
- {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
- {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
- {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
- {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
- {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
- };
-
- uchar geweixia3[][8]={
- {0xF0,0x18,0x0C,0x0C,0x18,0xE0,0x00,0x00},/*"3",3*///youxia
- {0x01,0x00,0x00,0x38,0x30,0x0F,0x00,0x00},//zuoxia
- {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
- {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
- {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
- {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
- {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
- {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
- };
-
- uchar geweixia4[][8]={
- {0x70,0x70,0xFE,0x70,0x70,0xFE,0x00,0x00},/*"4",4*///youxia
- {0x10,0x20,0x7F,0x00,0x00,0x03,0x00,0x00},//zuoxia
- {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
- {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
- {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
- {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
- {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
- {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
- };
- uchar geweixia5[][8]={
- {0x18,0x0C,0x0C,0x0C,0x18,0xE0,0x00,0x00},//"5",5///youxia
- {0x18,0x00,0x00,0x38,0x30,0x0F,0x00,0x00},//zuoxia
- {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
- {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
- {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
- {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
- {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
- {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
- };
- uchar geweixia6[][8]={
- {0x0C,0x0C,0x0C,0x0C,0x18,0xE0,0x00,0x00},/*"6",6*///youxia
- {0x38,0x30,0x30,0x30,0x18,0x07,0x00,0x00},//zuoxia
- {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
- {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
- {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
- {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
- {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
- {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
- };
- uchar geweixia7[][8]={
- {0x80,0x80,0x00,0x00,0x80,0x00,0x00,0x00},/*"7",7*///youxia
- {0x00,0x01,0x03,0x03,0x03,0x03,0x00,0x00},//zuoxia
- {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
- {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
- {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
- {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
- {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
- {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
- };
- uchar geweixia8[][8]={
- {0xE0,0x38,0x0C,0x0C,0x08,0xF0,0x00,0x00},/*"8",8*///youxia
- {0x0D,0x30,0x60,0x60,0x30,0x0F,0x00,0x00},//zuoxia
- {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
- {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
- {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
- {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
- {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
- {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
- };
- uchar geweixia9[][8]={
- {0x2C,0xCC,0x1C,0x18,0x30,0xC0,0x00,0x00},/*"9",9*///youxia
- {0x38,0x0F,0x00,0x00,0x38,0x0F,0x00,0x00},//zuoxia
- {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
- {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
- {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
- {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
- {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
- {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
- };
- /////////////////////////////////////////////
- uchar shiweixia0[][8]={
- {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
- {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
- {0x0C,0x0C,0x0C,0x18,0x10,0xE0,0x00,0x00},//"0",0//youxia
- {0x30,0x30,0x30,0x38,0x1C,0x07,0x00,0x00},//zuoxia
- {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
- {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
- {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
- {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
- };
-
- uchar shiweixia1[][8]={
- {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
- {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
- {0x80,0x80,0x80,0x80,0x80,0xF8,0x00,0x00},//youxia/*"1",1*/
- {0x01,0x01,0x01,0x01,0x01,0x0F,0x00,0x00},//zuoxia
- {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
- {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
- {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
- {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
- };
-
- uchar shiweixia2[][8]={
- {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
- {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
- {0x60,0x80,0x00,0x04,0x0C,0xF8,0x00,0x00},/*"2",2*///youxia
- {0x00,0x01,0x06,0x08,0x30,0x3F,0x00,0x00},//zuoxia
- {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
- {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
- {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
- {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
- };
-
- uchar shiweixia3[][8]={
- {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
- {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
- {0xF0,0x18,0x0C,0x0C,0x18,0xE0,0x00,0x00},/*"3",3*///youxia
- {0x01,0x00,0x00,0x38,0x30,0x0F,0x00,0x00},//zuoxia
- {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
- {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
- {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
- {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
- };
-
- uchar shiweixia4[][8]={
- {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
- {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
- {0x70,0x70,0xFE,0x70,0x70,0xFE,0x00,0x00},/*"4",4*///youxia
- {0x10,0x20,0x7F,0x00,0x00,0x03,0x00,0x00},//zuoxia
- {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
- {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
- {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
- {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
- };
- uchar shiweixia5[][8]={
- {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
- {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
- {0x18,0x0C,0x0C,0x0C,0x18,0xE0,0x00,0x00},//"5",5///youxia
- {0x18,0x00,0x00,0x38,0x30,0x0F,0x00,0x00},//zuoxia
- {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
- {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
- {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
- {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
- };
- uchar shiweixia6[][8]={
- {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
- {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
- {0x0C,0x0C,0x0C,0x0C,0x18,0xE0,0x00,0x00},/*"6",6*///youxia
- {0x38,0x30,0x30,0x30,0x18,0x07,0x00,0x00},//zuoxia
- {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
- {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
- {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
- {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
- };
- uchar shiweixia7[][8]={
- {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
- {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
- {0x80,0x80,0x00,0x00,0x80,0x00,0x00,0x00},/*"7",7*///youxia
- {0x00,0x01,0x03,0x03,0x03,0x03,0x00,0x00},//zuoxia
- {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
- {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
- {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
- {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
- };
- uchar shiweixia8[][8]={
- {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
- {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
- {0xE0,0x38,0x0C,0x0C,0x08,0xF0,0x00,0x00},/*"8",8*///youxia
- {0x0D,0x30,0x60,0x60,0x30,0x0F,0x00,0x00},//zuoxia
- {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
- {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
- {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
- {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
- };
- uchar shiweixia9[][8]={
- {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
- {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
- {0x2C,0xCC,0x1C,0x18,0x30,0xC0,0x00,0x00},/*"9",9*///youxia
- {0x38,0x0F,0x00,0x00,0x38,0x0F,0x00,0x00},//zuoxia
- {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
- {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
- {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
- {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
- };
- ///////////////////////////////////////////////
- uchar geweishang0[16][8]={
- {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
- {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
- {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
- {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
- {0x00,0x00,0x00,0xE0,0x18,0x1C,0x0C,0x0C},//youshang/*"0",0*/
- {0x00,0x00,0x00,0x07,0x18,0x38,0x30,0x30},//zuoshang
- {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
- {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
- };
- uchar geweishang1[16][8]={
- {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
- {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
- {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
- {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
- {0x00,0x00,0x00,0x80,0x80,0x80,0x80,0x80},//youshang/*"1",1*/
- {0x00,0x00,0x00,0x00,0x07,0x01,0x01,0x01},//zuoshang
- {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
- {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
- };
- uchar geweishang2[16][8]={
- {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
- {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
- {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
- {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
- {0x00,0x00,0x00,0xF0,0x18,0x0C,0x18,0x18},//youshang/*"2",2*/
- {0x00,0x00,0x00,0x0F,0x30,0x38,0x10,0x00},//zuoshang
- {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
- {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
- };
- uchar geweishang3[16][8]={
- {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
- {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
- {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
- {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
- {0x00,0x00,0x00,0xE0,0x18,0x18,0x18,0x60},//youshang/*"3",3*/
- {0x00,0x00,0x00,0x0F,0x30,0x38,0x00,0x00},//zuoshang
- {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
- {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
- };
- uchar geweishang4[16][8]={
- {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
- {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
- {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
- {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
- {0x00,0x00,0x00,0x30,0xF0,0x70,0x70,0x70},//youshang/*"4",4*/
- {0x00,0x00,0x00,0x00,0x00,0x01,0x02,0x0C},//zuoshang
- {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
- {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
- };
- uchar geweishang5[16][8]={
- {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
- {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
- {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
- {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
- {0x00,0x00,0x00,0xF8,0x00,0x00,0x00,0xF0},//youshang/*"5",5*/
- {0x00,0x00,0x00,0x1F,0x10,0x10,0x10,0x17},//zuoshang
- {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
- {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
- };
- uchar geweishang6[16][8]={
- {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
- {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
- {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
- {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
- {0x00,0x00,0x00,0xF0,0x18,0x00,0x00,0xF0},//youshang/*"6",6*/
- {0x00,0x00,0x00,0x07,0x08,0x10,0x30,0x37},//zuoshang
- {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
- {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
- };
- uchar geweishang7[16][8]={
- {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
- {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
- {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
- {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
- {0x00,0x00,0x00,0xFC,0x08,0x10,0x20,0x40},//youshang,/*"7",7*/
- {0x00,0x00,0x00,0x1F,0x30,0x20,0x00,0x00},//zuoshang
- {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
- {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
- };
- uchar geweishang8[16][8]={
- {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
- {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
- {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
- {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
- {0x00,0x00,0x00,0xF0,0x08,0x0C,0x08,0x30},//youshang/*"8",8*/
- {0x00,0x00,0x00,0x0F,0x30,0x30,0x38,0x0F},//zuoshang
- {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
- {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
- };
- uchar geweishang9[16][8]={
- {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
- {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
- {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
- {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
- {0x00,0x00,0x00,0xE0,0x18,0x0C,0x0C,0x1C},//youshang/*"9",9*
- {0x00,0x00,0x00,0x0F,0x30,0x30,0x70,0x30},//zuoshang
- {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
- {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
- };
- /////////////////////////////////////////////
- uchar shiweishang0[16][8]={
- {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
- {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
- {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
- {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
- {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
- {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
- {0x00,0x00,0x00,0xE0,0x18,0x1C,0x0C,0x0C},//youshang/*"0",0*/
- {0x00,0x00,0x00,0x07,0x18,0x38,0x30,0x30},//zuoshang
- };
- uchar shiweishang1[16][8]={
- {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
- {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
- {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
- {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
- {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
- {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
- {0x00,0x00,0x00,0x80,0x80,0x80,0x80,0x80},//youshang/*"1",1*/
- {0x00,0x00,0x00,0x00,0x07,0x01,0x01,0x01},//zuoshang
- };
- uchar shiweishang2[16][8]={
- {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
- {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
- {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
- {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
- {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
- {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
- {0x00,0x00,0x00,0xF0,0x18,0x0C,0x18,0x18},//youshang/*"2",2*/
- {0x00,0x00,0x00,0x0F,0x30,0x38,0x10,0x00},//zuoshang
- };
- uchar shiweishang3[16][8]={
- {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
- {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
- {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
- {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
- {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
- {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
- {0x00,0x00,0x00,0xE0,0x18,0x18,0x18,0x60},//youshang/*"3",3*/
- {0x00,0x00,0x00,0x0F,0x30,0x38,0x00,0x00},//zuoshang
- };
- uchar shiweishang4[16][8]={
- {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
- {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
- {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
- {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
- {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
- {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
- {0x00,0x00,0x00,0x30,0xF0,0x70,0x70,0x70},//youshang/*"4",4*/
- {0x00,0x00,0x00,0x00,0x00,0x01,0x02,0x0C},//zuoshang
- };
- uchar shiweishang5[16][8]={
- {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
- {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
- {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
- {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
- {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
- {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
- {0x00,0x00,0x00,0xF8,0x00,0x00,0x00,0xF0},//youshang/*"5",5*/
- {0x00,0x00,0x00,0x1F,0x10,0x10,0x10,0x17},//zuoshang
- };
- uchar shiweishang6[16][8]={
- {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
- {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
- {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
- {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
- {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
- {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
- {0x00,0x00,0x00,0xF0,0x18,0x00,0x00,0xF0},//youshang/*"6",6*/
- {0x00,0x00,0x00,0x07,0x08,0x10,0x30,0x37},//zuoshang
- };
- uchar shiweishang7[16][8]={
- {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
- {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
- {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
- {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
- {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
- {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
- {0x00,0x00,0x00,0xFC,0x08,0x10,0x20,0x40},//youshang,/*"7",7*/
- {0x00,0x00,0x00,0x1F,0x30,0x20,0x00,0x00},//zuoshang
- };
- uchar shiweishang8[16][8]={
- {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
- {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
- {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
- {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
- {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
- {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
- {0x00,0x00,0x00,0xF0,0x08,0x0C,0x08,0x30},//youshang/*"8",8*/
- {0x00,0x00,0x00,0x0F,0x30,0x30,0x38,0x0F},//zuoshang
- };
- uchar shiweishang9[16][8]={
- {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
- {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
- {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
- {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
- {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
- {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
- {0x00,0x00,0x00,0xE0,0x18,0x0C,0x0C,0x1C},//youshang/*"9",9*
- {0x00,0x00,0x00,0x0F,0x30,0x30,0x70,0x30},//zuoshang
- };
- uchar aini[][8]={
- {0x28,0x24,0x24,0x22,0x22,0x20,0xA0,0x40},//youxia/*"Äã",4*/
- {0x91,0x11,0x12,0x12,0x14,0x10,0x10,0x10},//zuoxia
- {0xF8,0x00,0xF0,0x10,0x20,0xC0,0x30,0x0E},//youxia/*"°®",3*/
- {0x7F,0x04,0x07,0x0A,0x11,0x20,0x43,0x1C},//zuoxia
- {0x80,0x80,0x80,0xFE,0x02,0x04,0x20,0x20},//youshang /*"Äã",4*/
- {0x08,0x08,0x08,0x11,0x11,0x32,0x34,0x50},//zuoshang
- {0x08,0xFC,0x10,0x10,0x20,0xFE,0x02,0x04},//youshang /*"°®",3*/
- {0x00,0x01,0x7E,0x22,0x11,0x7F,0x42,0x82},//zuoshang
- };
- uchar shengri[][8]={
- {0x10,0x10,0x10,0x10,0x10,0x10,0xF0,0x10},//youxia/*"èÕ",1*/
- {0x10,0x10,0x10,0x10,0x10,0x10,0x1F,0x10},//zuoxia
- {0x00,0xF8,0x00,0x00,0x00,0x00,0xFE,0x00},//youxia/*"éú",0*/
- {0x01,0x3F,0x01,0x01,0x01,0x01,0xFF,0x00},//zuoxia
- {0x00,0xF0,0x10,0x10,0x10,0x10,0x10,0xF0},//youshang/*"èÕ",1*/
- {0x00,0x1F,0x10,0x10,0x10,0x10,0x10,0x1F},//zuoshang
- {0x00,0x00,0x00,0x00,0xFC,0x00,0x00,0x00},//youshang/*"éú",0*/
- {0x01,0x11,0x11,0x11,0x3F,0x21,0x41,0x81},//zuoshang
-
- };
-
- uchar kuaile[][8]={
- {0x00,0x20,0x10,0x08,0x04,0x04,0x00,0x00},//youxia/*"àÖ",3*/
- {0x01,0x09,0x09,0x11,0x21,0x41,0x05,0x02},//zuoxia
- {0xFE,0x40,0xA0,0xA0,0x10,0x10,0x08,0x06},//youxia/*"¿ì",2*/
- {0x97,0x10,0x10,0x10,0x11,0x11,0x12,0x14},//zuoxia
- {0x20,0xF0,0x00,0x00,0x00,0x00,0x00,0xFC},//youshang/*"àÖ",3*/
- {0x00,0x00,0x1F,0x10,0x11,0x21,0x21,0x3F},//zuoshang
- {0x40,0x40,0x40,0xF8,0x48,0x48,0x48,0x48},//youshang/*"¿ì",2*/
- {0x10,0x10,0x10,0x13,0x18,0x54,0x50,0x50},//zuoshang
- };
- ////////////////////////////////////////////
- uchar juli[16][8]={
- {0x00,0xFC,0x04,0x44,0xE4,0x24,0x14,0x08},//youxia/*"?",1*/
- {0x01,0x7F,0x42,0x44,0x4F,0x44,0x40,0x40},//zuoxia
- {0x04,0x04,0xFC,0x00,0x00,0x00,0xFE,0x00},//youxia/*"?",0*/
- {0x5D,0x51,0x51,0x51,0x5D,0xE1,0x01,0x00},//zuoxia
- {0x00,0x00,0xFE,0x00,0x50,0x90,0x50,0xF0},//youshang/*"àë",1*/
- {0x02,0x01,0xFF,0x00,0x14,0x13,0x14,0x1F},//zuoshang
- {0x00,0xFE,0x00,0x00,0x00,0xFC,0x04,0x04},//youshang/*"¾à",0*/
- {0x00,0x7D,0x45,0x45,0x45,0x7D,0x11,0x11},//zuoshang
- };
- uchar jiesu[16][8]={
- {0x24,0x44,0x7F,0x04,0x04,0x1F,0x00,0x00},//youxia/*"4",3*/
- {0x08,0x08,0x08,0x08,0x08,0x3E,0x00,0x00},//zuoxia/*"1",2*/
- {0x18,0x04,0x02,0x42,0x42,0x3C,0x00,0x00},//youxia/*"3",1*/
- {0x08,0x08,0x08,0x08,0x08,0x3E,0x00,0x00},//zuoxia/*"1",0*/
- {0x00,0x00,0x00,0x04,0x0C,0x0C,0x14,0x24},//youshang/*"4",3*/
- {0x00,0x00,0x00,0x08,0x38,0x08,0x08,0x08},//zuoshang/*"1",2*/
- {0x00,0x00,0x00,0x3C,0x42,0x42,0x02,0x04},//youshang/*"3",1*/
- {0x00,0x00,0x00,0x08,0x38,0x08,0x08,0x08},//zuoshang/*"1",0*/
- };
- uchar yongyuan[][8]={
- {0x20,0x20,0x24,0x24,0x24,0x1C,0x00,0xFE},//youxia/*"Ô¶",7*/
- {0x11,0x11,0x11,0x12,0x12,0x14,0x28,0x47},//zuoxia
- {0x40,0x40,0x20,0x10,0x08,0x06,0x00,0x00},//youxia/*"óà",6*/
- {0x05,0x09,0x09,0x11,0x21,0xC1,0x05,0x02},//zuoxia
- {0x00,0xF8,0x00,0x00,0x00,0xFC,0x20,0x20},//youshang /*"Ô¶",7*/
- {0x00,0x23,0x10,0x10,0x00,0x07,0xF1,0x11},//zuoshang
- {0x00,0x00,0x80,0x00,0x04,0x08,0x90,0xA0},//youshang /*"óà",6*/
- {0x02,0x01,0x00,0x1F,0x01,0x01,0x7D,0x05},//zuoshang
- };
- /////////////////////////////////////////////////////////////
- void gedisplayxia(void)
- { int ii,jj;
- switch(gewei1)
- { case 0:
- for(ii=0;ii<8;ii++)
- for(jj=0;jj<8;jj++)
- {
- geweixia[ii][jj]=geweixia0[ii][jj];
- }
- break;
- case 1:
- for(ii=0;ii<8;ii++)
- for(jj=0;jj<8;jj++)
- {
- geweixia[ii][jj]=geweixia1[ii][jj];
- }
- break;
- case 2:
- for(ii=0;ii<8;ii++)
- for(jj=0;jj<8;jj++)
- { geweixia[ii][jj]=geweixia2[ii][jj];
- }
- break;
- case 3:
- for(ii=0;ii<8;ii++)
- for(jj=0;jj<8;jj++)
- {
- geweixia[ii][jj]=geweixia3[ii][jj];
- }
- break;
- case 4:
- for(ii=0;ii<8;ii++)
- for(jj=0;jj<8;jj++)
- {
- geweixia[ii][jj]=geweixia4[ii][jj];
- }
- break;
-
- case 5:
- for(ii=0;ii<8;ii++)
- for(jj=0;jj<8;jj++)
- {
- geweixia[ii][jj]=geweixia5[ii][jj];
- }
- break;
-
- case 6:
- for(ii=0;ii<8;ii++)
- for(jj=0;jj<8;jj++)
- {
- geweixia[ii][jj]=geweixia6[ii][jj];
- }
- break;
- case 7:
- for(ii=0;ii<8;ii++)
- for(jj=0;jj<8;jj++)
- {
- geweixia[ii][jj]=geweixia7[ii][jj];
- }
- break;
- case 8:
- for(ii=0;ii<8;ii++)
- for(jj=0;jj<8;jj++)
- {
- geweixia[ii][jj]=geweixia8[ii][jj];
- }
- break;
- case 9:
- for(ii=0;ii<8;ii++)
- for(jj=0;jj<8;jj++)
- {
- geweixia[ii][jj]=geweixia9[ii][jj];
- }
- break;
- default: break;
- }
- }
- /////////////////////////////////////////
- void gedisplayshang(void)
- { int ii,jj;
- switch(gewei2)
- { case 0:
- for(ii=0;ii<8;ii++)
- for(jj=0;jj<8;jj++)
- {
- geweishang[ii][jj]=geweishang0[ii][jj];
- }
- break;
- case 1:
- for(ii=0;ii<8;ii++)
- for(jj=0;jj<8;jj++)
- {
- geweishang[ii][jj]=geweishang1[ii][jj];
- }
- break;
- case 2:
- for(ii=0;ii<8;ii++)
- for(jj=0;jj<8;jj++)
- { geweishang[ii][jj]=geweishang2[ii][jj];
- }
- break;
- case 3:
- for(ii=0;ii<8;ii++)
- for(jj=0;jj<8;jj++)
- {
- geweishang[ii][jj]=geweishang3[ii][jj];
- }
- break;
- case 4:
- for(ii=0;ii<8;ii++)
- for(jj=0;jj<8;jj++)
- {
- geweishang[ii][jj]=geweishang4[ii][jj];
- }
- break;
-
- case 5:
- for(ii=0;ii<8;ii++)
- for(jj=0;jj<8;jj++)
- {
- geweishang[ii][jj]=geweishang5[ii][jj];
- }
- break;
-
- case 6:
- for(ii=0;ii<8;ii++)
- for(jj=0;jj<8;jj++)
- {
- geweishang[ii][jj]=geweishang6[ii][jj];
- }
- break;
- case 7:
- for(ii=0;ii<8;ii++)
- for(jj=0;jj<8;jj++)
- {
- geweishang[ii][jj]=geweishang7[ii][jj];
- }
- break;
- case 8:
- for(ii=0;ii<8;ii++)
- for(jj=0;jj<8;jj++)
- {
- geweishang[ii][jj]=geweishang8[ii][jj];
- }
- break;
- case 9:
- for(ii=0;ii<8;ii++)
- for(jj=0;jj<8;jj++)
- {
- geweishang[ii][jj]=geweishang9[ii][jj];
- }
- break;
- default: break;
- }
- }
- //////////////////////////////////////////
- void shidisplayxia(void)
- { int ii,jj;
- switch(shiwei1)
- { case 0:
- for(ii=0;ii<8;ii++)
- for(jj=0;jj<8;jj++)
- {
- shiweixia[ii][jj]=shiweixia0[ii][jj];
- }
- break;
- case 1:
- for(ii=0;ii<8;ii++)
- for(jj=0;jj<8;jj++)
- {
- shiweixia[ii][jj]=shiweixia1[ii][jj];
- }
- break;
- case 2:
- for(ii=0;ii<8;ii++)
- for(jj=0;jj<8;jj++)
- { shiweixia[ii][jj]=shiweixia2[ii][jj];
- }
- break;
- case 3:
- for(ii=0;ii<8;ii++)
- for(jj=0;jj<8;jj++)
- {
- shiweixia[ii][jj]=shiweixia3[ii][jj];
- }
- break;
- case 4:
- for(ii=0;ii<8;ii++)
- for(jj=0;jj<8;jj++)
- {
- shiweixia[ii][jj]=shiweixia4[ii][jj];
- }
- break;
-
- case 5:
- for(ii=0;ii<8;ii++)
- for(jj=0;jj<8;jj++)
- {
- shiweixia[ii][jj]=shiweixia5[ii][jj];
- }
- break;
-
- case 6:
- for(ii=0;ii<8;ii++)
- for(jj=0;jj<8;jj++)
- {
- shiweixia[ii][jj]=shiweixia6[ii][jj];
- }
- break;
- case 7:
- for(ii=0;ii<8;ii++)
- for(jj=0;jj<8;jj++)
- {
- shiweixia[ii][jj]= shiweixia7[ii][jj];
- }
- break;
- case 8:
- for(ii=0;ii<8;ii++)
- for(jj=0;jj<8;jj++)
- {
- shiweixia[ii][jj]=shiweixia8[ii][jj];
- }
- break;
- case 9:
- for(ii=0;ii<8;ii++)
- for(jj=0;jj<8;jj++)
- {
- shiweixia[ii][jj]=shiweixia9[ii][jj];
- }
- break;
- default: break;
- }
- }
- /////////////////////////////////////////////////
- void shidisplayshang(void)
- { int ii,jj;
- switch(shiwei2)
- { case 0:
- for(ii=0;ii<8;ii++)
- for(jj=0;jj<8;jj++)
- {
- shiweishang[ii][jj]=shiweishang0[ii][jj];
- }
- break;
- case 1:
- for(ii=0;ii<8;ii++)
- for(jj=0;jj<8;jj++)
- {
- shiweishang[ii][jj]=shiweishang1[ii][jj];
- }
- break;
- case 2:
- for(ii=0;ii<8;ii++)
- for(jj=0;jj<8;jj++)
- { shiweishang[ii][jj]=shiweishang2[ii][jj];
- }
- break;
- case 3:
- for(ii=0;ii<8;ii++)
- for(jj=0;jj<8;jj++)
- {
- shiweishang[ii][jj]=shiweishang3[ii][jj];
- }
- break;
- case 4:
- for(ii=0;ii<8;ii++)
- for(jj=0;jj<8;jj++)
- {
- shiweishang[ii][jj]=shiweishang4[ii][jj];
- }
- break;
-
- case 5:
- for(ii=0;ii<8;ii++)
- for(jj=0;jj<8;jj++)
- {
- shiweishang[ii][jj]=shiweishang5[ii][jj];
- }
- break;
-
- case 6:
- for(ii=0;ii<8;ii++)
- for(jj=0;jj<8;jj++)
- {
- shiweishang[ii][jj]=shiweishang6[ii][jj];
- }
- break;
- case 7:
- for(ii=0;ii<8;ii++)
- for(jj=0;jj<8;jj++)
- {
- shiweishang[ii][jj]=shiweishang7[ii][jj];
- }
- break;
- case 8:
- for(ii=0;ii<8;ii++)
- for(jj=0;jj<8;jj++)
- {
- shiweishang[ii][jj]=shiweishang8[ii][jj];
- }
- break;
- case 9:
- for(ii=0;ii<8;ii++)
- for(jj=0;jj<8;jj++)
- {
- shiweishang[ii][jj]=shiweishang9[ii][jj];
- }
- break;
- default: break;
- }
- }
- void GPIO_Init1(void)
- {
- GPIO_InitTypeDef GPIO_InitStructure;
- RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOE, ENABLE);
- GPIO_InitStructure.GPIO_Pin = GPIO_Pin_10|GPIO_Pin_12|GPIO_Pin_14; //LED0-->Pe.5 ????
- GPIO_InitStructure.GPIO_Mode = GPIO_Mode_Out_PP; //????
- GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;
- GPIO_Init(GPIOE, &GPIO_InitStructure);
- GPIO_SetBits(GPIOE,GPIO_Pin_10); //Pe.5
- GPIO_SetBits(GPIOE,GPIO_Pin_12); //Pe.5
- GPIO_SetBits(GPIOE,GPIO_Pin_14); //Pe.5
- }
- void MAX7219Init()
- {
- uchar i,j;
- for(i=0;i<5;i++)
- {
- for(j=number;j>0;j--)
- switch(i)
- {
- case 0:Write_Max7219_byte(0x09);Write_Max7219_byte(0x00); break; //òëÂë·½ê½:BCD
- case 1:Write_Max7219_byte(0x0A); Write_Max7219_byte(lum); break; //áá¶è¼¶±e 0-15 1216¼¶
- case 2:Write_Max7219_byte(0x0B);Write_Max7219_byte(0x07); break; //é¨Ãè½çÏT£¬8λÏÔê¾
- case 3:Write_Max7219_byte(0x0C);Write_Max7219_byte(0x01); break; //μôμçÄ£ê½:0,ÆÕí¨Ä£ê½:1
- case 4:Write_Max7219_byte(0x0F); Write_Max7219_byte(0x00);break; //ÏÔê¾2aêÔ:1;2aêÔ½áêø,Õy3£ÏÔê¾:0
- }
- Max7219_pinCS=1; delay_us(1); Max7219_pinCS=0; //ÿD′èë4′Σ¬¸øò»¸öËø′æÂö3å
- }
- }
- ////////////////////////////////////////////////////////////////////////////////////////////
- //--------------------------------------------
- //1|Äü£oÏòMAX7219(U3)D′èë×Ö½ú
- //èë¿ú2Îêy£oDATA
- //3ö¿ú2Îêy£oÎT
- //ËμÃ÷£o
- void Write_Max7219_byte(uchar DATA)
- {
- uchar i;
- for(i=8;i>=1;i--)
- {
- delay_us(1);
- // delay_ms(3);
- Max7219_pinCLK=0;
- Max7219_pinDIN=((DATA>>7)&0x01);
- //delay_ms(5);//¿¼ÂÇμ½1añîμÄ×a»»ËùÂê
- delay_us(1);
- DATA=DATA<<1;
- Max7219_pinCLK=1;
- }
- }
- //D′êy¾Y
- void Write_Max7219(uchar address1,uchar dat1,uchar address2,uchar dat2,uchar address3,uchar dat3,uchar address4,uchar dat4,uchar address5,uchar dat5,uchar address6,uchar dat6,uchar address7,uchar dat7,uchar address8,uchar dat8)
- {
- Max7219_pinCS=0;
- Write_Max7219_byte(address1); //D′èëμØÖ·£¬¼′êyÂë1ü±àoÅ
- Write_Max7219_byte(dat1); //D′èëêy¾Y£¬¼′êyÂë1üÏÔê¾êy×Ö
- Write_Max7219_byte(address2); //D′èëμØÖ·£¬¼′êyÂë1ü±àoÅ
- Write_Max7219_byte(dat2); //D′èëêy¾Y£¬¼′êyÂë1üÏÔê¾êy×Ö
- Write_Max7219_byte(address3); //D′èëμØÖ·£¬¼′êyÂë1ü±àoÅ
- Write_Max7219_byte(dat3); //D′èëêy¾Y£¬¼′êyÂë1üÏÔê¾êy×Ö
- Write_Max7219_byte(address4); //D′èëμØÖ·£¬¼′êyÂë1ü±àoÅ
- Write_Max7219_byte(dat4); //D′èëêy¾Y£¬¼′êyÂë1üÏÔê¾êy×Ö
- Write_Max7219_byte(address5); //D′èëμØÖ·£¬¼′êyÂë1ü±àoÅ
- Write_Max7219_byte(dat5); //D′èëêy¾Y£¬¼′êyÂë1üÏÔê¾êy×Ö
- Write_Max7219_byte(address6); //D′èëμØÖ·£¬¼′êyÂë1ü±àoÅ
- Write_Max7219_byte(dat6); //D′èëêy¾Y£¬¼′êyÂë1üÏÔê¾êy×Ö
- Write_Max7219_byte(address7); //D′èëμØÖ·£¬¼′êyÂë1ü±àoÅ
- Write_Max7219_byte(dat7); //D′èëêy¾Y£¬¼′êyÂë1üÏÔê¾êy×Ö
- Write_Max7219_byte(address8); //D′èëμØÖ·£¬¼′êyÂë1ü±àoÅ
- Write_Max7219_byte(dat8); //D′èëêy¾Y£¬¼′êyÂë1üÏÔê¾êy×Ö
- delay_us(10);
- Max7219_pinCS=1;
- }
- void julizhi(u32 Temp)
- { uchar iii,jjj;
- shuju[0]=Temp/10%10;
- shuju[1]=Temp%10;
- gewei1=shuju[1];
- gewei2=shuju[1];
- shiwei1=shuju[0];
- shiwei2=shuju[0];
- gedisplayxia();
- gedisplayshang();
- shidisplayxia();
- shidisplayshang();
- for(iii=0;iii<8;iii++)
- {
- for(jjj=0;jjj<8;jjj++)
- {
- kong[iii][jjj]=geweixia[iii][jjj]+geweishang[iii][jjj]+shiweixia[iii][jjj]+shiweishang[iii][jjj];
- }
- }
- }
-
- /////////////////////////////////////////////////////////////////
- void display1(void)
- {
- uchar i;
- for(i=0;i<8;i++)
- {
- Max7219_pinCS=0;
- Write_Max7219(i+1,yongyuan[0][i],i+1,yongyuan[1][i],i+1,yongyuan[2][i],
- i+1,yongyuan[3][i],i+1,yongyuan[4][i],i+1,yongyuan[5][i],i+1,yongyuan[6][i],i+1,yongyuan[7][i]);
- delay_us(10);
- Max7219_pinCS=1;
- }
- delay_ms(1000);
- for(i=0;i<8;i++)
- {
- Max7219_pinCS=0;
- Write_Max7219(i+1,kuaile[0][i],i+1,kuaile[1][i],i+1,kuaile[2][i],
- i+1,kuaile[3][i],i+1,kuaile[4][i],i+1,kuaile[5][i],i+1,kuaile[6][i],i+1,kuaile[7][i]);
- delay_us(10);
- Max7219_pinCS=1;
- }
- delay_ms(1000);
- for(i=0;i<8;i++)
- {
- Max7219_pinCS=0;
- Write_Max7219(i+1,juli[0][i],i+1,juli[1][i],i+1,juli[2][i],
- i+1,juli[3][i],i+1,juli[4][i],i+1,juli[5][i],i+1,juli[6][i],i+1,juli[7][i]);
- delay_us(10);
- Max7219_pinCS=1;
- }
- delay_ms(1000);
- for(i=0;i<8;i++)
- {
- Max7219_pinCS=0;
-
- Write_Max7219(i+1,kong[0][i],i+1,kong[1][i],i+1,kong[2][i],
- i+1,kong[3][i],i+1,kong[4][i],i+1,kong[5][i],i+1,kong[6][i],i+1,kong[7][i]);
- delay_us(10);
- Max7219_pinCS=1;
- }
- delay_ms(1000);
- }
复制代码 |