oled屏幕配套取字模软件使用

oled屏幕配套取字模软件使用

作者:李剀 出处:https://www.cnblogs.com/kevin-nancy/p/10531368.html
欢迎转载,但也请保留上面这段声明。谢谢!

 

 

 **PC2LCD2002取模方式设置:阴码+逐列式+顺向+C51格式**

附: 代码
 1 //24*24的OLED汉字点阵,包括三个汉字:开、发、板。这三个汉字的点阵库,是利用PCtoLCD2002生产的,
 2 //软件设置的取模方式同OLED实验ASCII的取模方式一模一样,字体采用12*大小,一个汉字点阵占用24字节。
 3 const unsigned char OLED_HZK_TBL[14][24]=
 4 {
 5   {0x00,0x00,0x1F,0x80,0x11,0x00,0x11,0x00,0x11,0x00,0xFF,0xF0,0x11,0x00,0x11,0x00,0x11,0x00,0x1F,  0x80,0x00,0x00,0x00,0x00},/*"中",0*/
 6     
 7   {0xFF,0xF0,0x80,0xA0,0xA4,0xA0,0xA4,0xA0,0xA4,0xA0,0xBF,0xA0,0xA4,0xA0,0xA6,0xA0,0xA5,0xA0,0x80,  0xA0,0xFF,0xF0,0x00,0x00},/*"国",1*/
 8 
 9     
10 };

 

同理,若想要32个字节的汉字矩阵,可以将字宽,字高都设为16。 其他大小的也可以这样去设置

 

PS : 32字节矩阵,字高字宽设为16之后,还得新建一个数组存储。 二维数组列设为36,如下

1 const unsigned char OLED_HZK_TBL[14][36]=
2 {
3   {0x00,0x00,0x00,0x00,0x0F,0xF0,0x08,0x20,0x08,0x20,0x08,0x20,0x08,0x20,0xFF,0xFF,0x08,0x20,0x08,0x20,0x08,0x20,0x08,0x20,0x0F,0xF0,0x00,0x00,0x00,0x00,0x00,0x00},/*"中",0*/
4     
5   {0x00,0x00,0x7F,0xFF,0x40,0x02,0x48,0x12,0x49,0x12,0x49,0x12,0x49,0x12,0x4F,0xF2,0x49,0x12,0x49,0x52,0x49,0x32,0x48,0x12,0x40,0x02,0x7F,0xFF,0x00,0x00,0x00,0x00},/*"国",1*/
6 
7     
8 };

 

posted @ 2019-03-14 16:52  K35inL  阅读(8483)  评论(0编辑  收藏  举报