STM32LCD显示汉字
不能字符串显示,毕竟不是存了字库,只能显示单个汉字,这种需要我们自己去取模,然后存放到数组,基于正点原子的例程改的,要注意的是一个汉字在数组中全部数据是全存在一起的,如下,size=24,一个汉字字节长度为72,size=16,一个汉字字节长度为32,由u8 csize=(size/8+((size%8)?1:0))(size)这个式子给出
const unsigned char hz32[30][72]={
{
0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x02,0x00,0x07,0x04,0x00,0x19,0x08,0x00,0x71,
0x18,0x00,0x11,0x30,0x00,0x13,0xE7,0xFC,0x1F,0x44,0x88,0x11,0x44,0x88,0x11,0x24,
0x88,0x11,0x3C,0x88,0x01,0x14,0x88,0x01,0x04,0x88,0x1F,0xFC,0x88,0x10,0x24,0x88,
0x10,0x24,0x88,0x10,0x27,0xFE,0x10,0x24,0x0C,0x10,0x20,0x00,0x1F,0xF0,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,/“智”,0,size = 24*/
},
{undefined
0x00,0x02,0x00,0x0C,0x3F,0xF1,0x24,0x01,0x24,0x21,0x24,0x32,0x3F,0xAA,0xA4,0xA4,
0x64,0xA4,0x24,0xA4,0x3F,0xAA,0x24,0x32,0x24,0x01,0x24,0x01,0x20,0x01,0x00,0x00
/*“度”,2,size =16 */
}
};
|
|