上个NOKIA 5110 LCD显示用的GB2312字库,包括12*12和16*16及24*24点阵数据.
12*12从0x00开始,一个字占24字节。
16*16从0x2FEB0开始,一个字占32字节。
24*24从0x6FCF0开始,一个字占72字节。
读取程序参考:
如 read_hz("编");将会把点阵读取到 u8 sz_zitibuffer[72]里
void read_hz(unsigned char *zi)
{
unsigned char zi_h,zi_l;
zi_h = zi[0];
zi_l = zi[1];
//12*12
SPI_FLASH_BufferRead(sz_zitibuffer,(unsigned long int)(((zi_h-0xa1)*94)+(zi_l-0xa1))*24,24);
//16*16
//SPI_FLASH_BufferRead(sz_zitibuffer,(unsigned long int)(((zi_h-0xa1)*94)+(zi_l-0xa1))*32+(unsigned long int)0x2FEB0,32);
//24*24
//SPI_FLASH_BufferRead(sz_zitibuffer,(unsigned long int)(((zi_h-0xa1)*94)+(zi_l-0xa1))*72+(unsigned long int)0x6FCF0,72);
}
转载
|