const unsigned char hz_buf[4][32]= //汉字的字模数据 { { 0x10,0x00,0x13,0xFE,0x12,0x00,0xFE,0x00,0x12,0xFC,0x16,0x00,0x1B,0xFE,0x12,0xC0, 0x32,0xA4,0xD2,0xA6,0x12,0x98,0x12,0x88,0x14,0x88,0x14,0xA6,0x58,0xC4,0x20,0x80,/*"振",0*/ }, { 0x01,0x00,0x01,0x04,0xFF,0xFE,0x01,0x00,0x02,0x00,0x3F,0xFC,0x24,0x24,0x22,0x44, 0x2F,0xF4,0x21,0x04,0x3F,0xFC,0x21,0x04,0x21,0x04,0x21,0x14,0x21,0x08,0x00,0x00,/*"南",1*/ }, { 0x01,0x00,0x01,0x00,0x01,0x00,0x3F,0xF8,0x21,0x08,0x21,0x08,0x3F,0xF8,0x21,0x08, 0x21,0x08,0x21,0x08,0x3F,0xF8,0x21,0x08,0x01,0x02,0x01,0x02,0x00,0xFE,0x00,0x00,/*"电",2*/ }, { 0x00,0x00,0x3F,0xF0,0x00,0x20,0x00,0x40,0x00,0x80,0x01,0x00,0x01,0x00,0x01,0x04, 0xFF,0xFE,0x01,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x05,0x00,0x02,0x00,/*"子",3*/ } };
int main(void) { unsigned int index=0;
ZNX_Board_Init(); //ZN-X开发板的板级初始化
delay_init(); //延时函数初始化 uart_init(38400);
printf("*********************** \r\n"); printf("This is LedMatrix Test \r\n"); printf("*********************** \r\n");
DZ_Init(); //初始化点阵,启动点阵动态扫描
while(1) { DZ_UpdateBuffer(hz_buf[index++]); //将汉字的字模数据更新到显示缓冲数组中 index%=4; //对i取4的余,使其在0~3变化 delay_ms(500); } } |