unsigned char dz_digis[10][8]= //4X8的数字,用于在16X16点阵上显示数字 { {0x60,0x90,0x90,0x90,0x90,0x90,0x60,0x00},/*"0",0*/ {0x40,0xC0,0x40,0x40,0x40,0x40,0xE0,0x00},/*"1",1*/ {0x60,0x90,0x10,0x20,0x40,0x80,0xF0,0x00},/*"2",2*/ {0x60,0x90,0x10,0x60,0x10,0x90,0x60,0x00},/*"3",3*/ {0x20,0x60,0x60,0xA0,0xA0,0xF0,0x20,0x00},/*"4",4*/ {0xF0,0x80,0x80,0xE0,0x10,0x10,0xE0,0x00},/*"5",5*/ {0x60,0x90,0x80,0xE0,0x90,0x90,0x60,0x00},/*"6",6*/ {0xF0,0x90,0x10,0x20,0x40,0x40,0x40,0x00},/*"7",7*/ {0x60,0x90,0x90,0x60,0x90,0x90,0x60,0x00},/*"8",8*/ {0x60,0x90,0x90,0x70,0x10,0x90,0x60,0x00},/*"9",9*/ };
int main(void) { unsigned int index=0,i=0;
ZNX_Board_Init(); //ZN-X开发板的板级初始化
delay_init(); //延时函数初始化 uart_init(115200);
printf("*********************** \r\n"); printf("This is LedMatrix Test \r\n"); printf("*********************** \r\n");
DZ_Init(); //初始化点阵,启动点阵动态扫描
while(1) { LoadValue(index++); //更新显示缓冲数组的内容 delay_ms(500); } } |