这是的一段12864测试程序,我就奇了怪了?

2019-07-18 12:13发布

本帖最后由 YANGZHIMIN 于 2015-5-1 02:02 编辑

原来程序中的字库代码,他的字库编码怎么和通常的不同,而程序就认这个
/********************************/
/*  定义中文字库  */
/********************************/
uchar code Hzk[]={
/*--  文字:  各  --*/
/*--  宋体12;  此字体下对应的点阵为:宽x高=16x16   --*/
0x20,0x00,0x20,0x00,0xE0,0x0F,0x30,0x04,0x48,0x04,0x46,0x02,0x80,0x01,0x60,0x06,
0x18,0x78,0xF7,0x2F,0x10,0x08,0x10,0x08,0x10,0x08,0x10,0x08,0xF0,0x0F,0x00,0x00,/*"各",0*/
/*--  文字:  位  --*/
/*--  宋体12;  此字体下对应的点阵为:宽x高=16x16   --*/
0x00,0xC0,0x30,0xEC,0x03,0x2A,0xC8,0x09,0x0A,0x0E,0x08,0xE8,0x48,0x08,0x00,0x00,
0x01,0x00,0x00,0x7F,0x20,0x20,0x20,0x27,0x20,0x30,0x2E,0x21,0x20,0x20,0x20,0x00,
/*--  文字:  单  --*/
/*--  宋体12;  此字体下对应的点阵为:宽x高=16x16   --*/
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,/*" ",0*/
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,/*" ",1*/
/*--  文字:  机  --*/
/*--  宋体12;  此字体下对应的点阵为:宽x高=16x16   --*/
0x08,0x08,0xC8,0xFF,0x48,0x88,0x08,0x00,0xFE,0x02,0x02,0x02,0xFE,0x00,0x00,0x00,
0x04,0x03,0x00,0xFF,0x00,0x41,0x30,0x0C,0x03,0x00,0x00,0x00,0x3F,0x40,0x78,0x00,
/*--  文字:  爱  --*/
/*--  宋体12;  此字体下对应的点阵为:宽x高=16x16   --*/
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,/*" ",0*/
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,/*" ",1*/

/*--  文字:  好  --*/
/*--  宋体12;  此字体下对应的点阵为:宽x高=16x16   --*/
0x10,0x10,0xF0,0x1F,0x10,0xF0,0x80,0x82,0x82,0x82,0xF2,0x8A,0x86,0x82,0x80,0x00,
0x80,0x43,0x22,0x14,0x0C,0x73,0x20,0x00,0x40,0x80,0x7F,0x00,0x00,0x00,0x00,0x00,
/*--  文字:  者  --*/
/*--  宋体12;  此字体下对应的点阵为:宽x高=16x16   --*/
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,/*" ",0*/
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,/*" ",1*/
/*--  文字:  你  --*/
/*--  宋体12;  此字体下对应的点阵为:宽x高=16x16   --*/
0x80,0x40,0xF0,0x2C,0x43,0x20,0x98,0x0F,0x0A,0xE8,0x08,0x88,0x28,0x1C,0x08,0x00,
0x00,0x00,0x7F,0x00,0x10,0x0C,0x03,0x21,0x40,0x3F,0x00,0x00,0x03,0x1C,0x08,0x00,
/*--  文字:  们  --*/
/*--  宋体12;  此字体下对应的点阵为:宽x高=16x16   --*/
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,/*" ",0*/
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,/*" ",1*/
/*--  文字:  辛  --*/
/*--  宋体12;  此字体下对应的点阵为:宽x高=16x16   --*/
0x80,0x84,0x84,0x94,0xA4,0xC4,0x85,0x86,0x84,0xC4,0xA4,0x94,0x84,0x84,0x80,0x00,
0x00,0x04,0x04,0x04,0x04,0x04,0x04,0xFF,0x04,0x04,0x04,0x04,0x04,0x00,0x00,0x00,
/*--  文字:  苦  --*/
/*--  宋体12;  此字体下对应的点阵为:宽x高=16x16   --*/
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,/*" ",0*/
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,/*" ",1*/
/*--  宋体12;  此字体下对应的点阵为:宽x高=16x16   --*/
0x00,0x02,0x02,0x02,0x02,0x02,0x02,0xF2,0x12,0x0A,0x0A,0x06,0x06,0x02,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x40,0x80,0x7F,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
/*--  文字:  希  --*/
/*--  宋体12;  此字体下对应的点阵为:宽x高=16x16   --*/
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,/*" ",0*/
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,/*" ",1*/

/*--  文字:  望  --*/
/*--  宋体12;  此字体下对应的点阵为:宽x高=16x16   --*/
0x04,0x04,0xFC,0x85,0x46,0x24,0x04,0x80,0x7E,0x2A,0x2A,0xAA,0xAA,0xFE,0x00,0x00,
0x00,0x40,0x42,0x4A,0x4A,0x4A,0x4A,0x7E,0x4A,0x4A,0x4A,0x4A,0x4A,0x42,0x40,0x00,
/*--  文字:  大  --*/
/*--  宋体12;  此字体下对应的点阵为:宽x高=16x16   --*/
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,/*" ",0*/
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,/*" ",1*/
/*--  文字:  家  --*/
/*--  宋体12;  此字体下对应的点阵为:宽x高=16x16   --*/
0x00,0x18,0x04,0x14,0x94,0x94,0xD5,0xB6,0x14,0x14,0x94,0x04,0x14,0x0C,0x04,0x00,
0x00,0x29,0x29,0x15,0x14,0x4A,0x89,0x44,0x3F,0x06,0x09,0x09,0x10,0x30,0x10,0x00,
/*--  文字:  能  --*/
/*--  宋体12;  此字体下对应的点阵为:宽x高=16x16   --*/
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,/*" ",0*/
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,/*" ",1*/
/*--  文字:  多  --*/
/*--  宋体12;  此字体下对应的点阵为:宽x高=16x16   --*/
0x00,0x00,0x00,0x20,0x90,0x88,0x54,0x53,0xA2,0x22,0x12,0x0A,0x06,0x00,0x00,0x00,
0x00,0x81,0x89,0x89,0x44,0x44,0x42,0x25,0x29,0x11,0x11,0x09,0x05,0x03,0x01,0x00,
/*--  文字:  多  --*/
/*--  宋体12;  此字体下对应的点阵为:宽x高=16x16   --*/
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,/*" ",0*/
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,/*" ",1*/
/*--  文字:  交  --*/
/*--  宋体12;  此字体下对应的点阵为:宽x高=16x16   --*/
0x00,0x08,0x88,0x48,0x38,0x28,0x09,0x0E,0x0C,0x08,0x98,0x28,0x68,0x48,0x08,0x00,
0x00,0x80,0x80,0x40,0x41,0x22,0x14,0x18,0x0C,0x16,0x23,0x61,0xC0,0x40,0x00,0x00,
/*--  文字:  流  --*/
/*--  宋体12;  此字体下对应的点阵为:宽x高=16x16   --*/
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,/*" ",0*/
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,/*" ",1*/
/*--  文字:  学  --*/
/*--  宋体12;  此字体下对应的点阵为:宽x高=16x16   --*/
0x40,0x30,0x10,0x12,0x5C,0x54,0x50,0x51,0x5E,0xD4,0x50,0x18,0x57,0x32,0x10,0x00,
0x00,0x02,0x02,0x02,0x02,0x02,0x42,0x82,0x7F,0x02,0x02,0x02,0x02,0x02,0x02,0x00,
/*--  文字:  习  --*/
/*--  宋体12;  此字体下对应的点阵为:宽x高=16x16   --*/
0x40,0x30,0x10,0x12,0x5C,0x54,0x50,0x51,0x5E,0xD4,0x50,0x18,0x57,0x32,0x10,0x00,
0x00,0x02,0x02,0x02,0x02,0x02,0x42,0x82,0x7F,0x02,0x02,0x02,0x02,0x02,0x02,0x00,
/*--  文字:  24   --*/
/*--  宋体12;  此字体下对应的点阵为:宽x高=16x16   --*/
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
};
下面是我做的代码
个(0) 位(1) 单(2) 片(3) 机(4) 爱(5) 好(6) 者(7) 你(8) 们(9) 辛(10) 苦(11) 希(12) 望(13) 大(14) 家(15)
交(16) 流(17) 学(18) 习(19)
{0x00,0x00,0x80,0x00,0x80,0x00,0x40,0x00,0x20,0x00,0x10,0x00,0x0C,0x00,0xE3,0x7F},
{0x04,0x00,0x08,0x00,0x10,0x00,0x20,0x00,0x60,0x00,0xC0,0x00,0x40,0x00,0x00,0x00},/*"个",0*/
{0x00,0x01,0xC0,0x00,0x30,0x00,0xEC,0x7F,0x03,0x20,0x2A,0x20,0xC8,0x20,0x09,0x27},
{0x0A,0x20,0x0E,0x30,0x08,0x2E,0xE8,0x21,0x48,0x20,0x08,0x20,0x00,0x20,0x00,0x00},/*"位",1*/
{0x00,0x08,0x00,0x08,0xF8,0x0B,0x28,0x09,0x29,0x09,0x2E,0x09,0x2A,0x09,0xF8,0xFF},
{0x28,0x09,0x2C,0x09,0x2B,0x09,0x2A,0x09,0xF8,0x0B,0x00,0x08,0x00,0x08,0x00,0x00},/*"单",2*/
{0x00,0x80,0x00,0x40,0x00,0x30,0xFE,0x0F,0x10,0x01,0x10,0x01,0x10,0x01,0x10,0x01},
{0x10,0x01,0x1F,0x01,0x10,0x01,0x10,0xFF,0x10,0x00,0x18,0x00,0x10,0x00,0x00,0x00},/*"片",3*/
{0x08,0x04,0x08,0x03,0xC8,0x00,0xFF,0xFF,0x48,0x00,0x88,0x41,0x08,0x30,0x00,0x0C},
{0xFE,0x03,0x02,0x00,0x02,0x00,0x02,0x00,0xFE,0x3F,0x00,0x40,0x00,0x78,0x00,0x00},/*"机",4*/
{0x00,0x40,0x40,0x20,0xB2,0xA0,0x96,0x90,0x9A,0x4C,0x92,0x47,0xF6,0x2A,0x9A,0x2A},
{0x93,0x12,0x91,0x1A,0x99,0x26,0x97,0x22,0x91,0x40,0x90,0xC0,0x30,0x40,0x00,0x00},/*"爱",5*/
{0x10,0x80,0x10,0x43,0xF0,0x22,0x1F,0x14,0x10,0x0C,0xF0,0x73,0x80,0x20,0x82,0x00},
{0x82,0x40,0x82,0x80,0xF2,0x7F,0x8A,0x00,0x86,0x00,0x82,0x00,0x80,0x00,0x00,0x00},/*"好",6*/
{0x00,0x04,0x20,0x04,0x24,0x04,0x24,0x02,0x24,0x02,0x24,0xFF,0xA4,0x49,0xBF,0x49},
{0x64,0x49,0x24,0x49,0x34,0x49,0x28,0x49,0x26,0xFF,0x24,0x00,0x20,0x00,0x00,0x00},/*"者",7*/
{0x80,0x00,0x40,0x00,0xF0,0x7F,0x2C,0x00,0x43,0x10,0x20,0x0C,0x98,0x03,0x0F,0x21},
{0x0A,0x40,0xE8,0x3F,0x08,0x00,0x88,0x00,0x28,0x03,0x1C,0x1C,0x08,0x08,0x00,0x00},/*"你",8*/
{0x80,0x00,0x40,0x00,0xF0,0x7F,0x1C,0x00,0x03,0x00,0xF0,0x7F,0x01,0x00,0x0E,0x00},
{0x04,0x00,0x00,0x00,0x04,0x00,0x04,0x20,0x04,0x40,0xFC,0x3F,0x00,0x00,0x00,0x00},/*"们",9*/
{0x80,0x00,0x84,0x04,0x84,0x04,0x94,0x04,0xA4,0x04,0xC4,0x04,0x85,0x04,0x86,0xFF},
{0x84,0x04,0xC4,0x04,0xA4,0x04,0x94,0x04,0x84,0x04,0x84,0x00,0x80,0x00,0x00,0x00},/*"辛",10*/
{0x40,0x00,0x44,0x00,0x44,0x00,0x44,0x7E,0x44,0x22,0x5F,0x22,0x44,0x22,0xF4,0x23},
{0x44,0x22,0x44,0x22,0x5F,0x22,0x44,0x7E,0x44,0x00,0x44,0x00,0x44,0x00,0x00,0x00},/*"苦",11*/
{0x20,0x08,0x20,0x04,0x30,0x02,0x30,0x01,0xA9,0x3F,0x6A,0x01,0x3A,0x01,0x24,0x01},
{0xE4,0xFF,0x2A,0x01,0x29,0x21,0x30,0x61,0x20,0x3F,0x20,0x00,0x20,0x00,0x00,0x00},/*"希",12*/
{0x04,0x00,0x04,0x40,0xFC,0x42,0x85,0x4A,0x46,0x4A,0x24,0x4A,0x04,0x4A,0x80,0x7E},
{0x7E,0x4A,0x2A,0x4A,0x2A,0x4A,0xAA,0x4A,0xAA,0x4A,0xFE,0x42,0x00,0x40,0x00,0x00},/*"望",13*/
{0x20,0x00,0x20,0x80,0x20,0x40,0x20,0x20,0x20,0x10,0x20,0x0C,0xA0,0x03,0x7F,0x00},
{0xA0,0x01,0x20,0x06,0x20,0x08,0x20,0x30,0x20,0x60,0x20,0xC0,0x20,0x40,0x00,0x00},/*"大",14*/
{0x00,0x00,0x18,0x29,0x04,0x29,0x14,0x15,0x94,0x14,0x94,0x4A,0xD5,0x89,0xB6,0x44},
{0x14,0x3F,0x14,0x06,0x94,0x09,0x04,0x09,0x14,0x10,0x0C,0x30,0x04,0x10,0x00,0x00},/*"家",15*/
{0x00,0x00,0x08,0x80,0x88,0x80,0x48,0x40,0x38,0x41,0x28,0x22,0x09,0x14,0x0E,0x18},
{0x0C,0x0C,0x08,0x16,0x98,0x23,0x28,0x61,0x68,0xC0,0x48,0x40,0x08,0x00,0x00,0x00},/*"交",16*/
{0x10,0x04,0x60,0x04,0x01,0xFC,0x86,0x03,0x60,0x40,0x04,0x30,0x44,0x0F,0x64,0x00},
{0x55,0x00,0x4E,0x7F,0x44,0x00,0x64,0x3F,0xC4,0x40,0x04,0x40,0x04,0x70,0x00,0x00},/*"流",17*/
{0x40,0x00,0x30,0x02,0x10,0x02,0x12,0x02,0x5C,0x02,0x54,0x02,0x50,0x42,0x51,0x82},
{0x5E,0x7F,0xD4,0x02,0x50,0x02,0x18,0x02,0x57,0x02,0x32,0x02,0x10,0x02,0x00,0x00},/*"学",18*/
{0x00,0x00,0x00,0x00,0x02,0x04,0x02,0x0C,0x0A,0x04,0x12,0x02,0x22,0x02,0x62,0x01},
{0x02,0x01,0x82,0x00,0x82,0x20,0x42,0x40,0x02,0x80,0xFE,0x7F,0x00,0x00,0x00,0x00},/*"习",19*/

多出几个大括弧,可以省略,在别的机子中用我的字模无问题,在他的程序就不认了,必须他原来的字模,我试了几次,也不晓得他的编码怎么回事
新建 文本文档.JPG
友情提示: 此问题已得到解决,问题已经关闭,关闭后问题禁止继续编辑,回答。
该问题目前已经被作者或者管理员关闭, 无法添加新回复
9条回答
luck_fuwei
1楼-- · 2019-07-18 14:13
没遇见过,坐等大神,当然了,你可以参考下这本书,我读着不错               《新概念51单片机C语言教程》 郭天祥 电子工业出版社
武力戡乱
2楼-- · 2019-07-18 15:41
/*--  文字:  爱  --*/
/*--  宋体12;  此字体下对应的点阵为:宽x高=16x16   --*/
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,/*" ",0*/
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,/*" ",1*/
这都能实现吗?
另外你要看他程序里面的取模方式!
小海子
3楼-- · 2019-07-18 17:17
郭天祥的不错,你可以看看他的书
YANGZHIMIN
4楼-- · 2019-07-18 18:58
 精彩回答 2  元偷偷看……
YANGZHIMIN
5楼-- · 2019-07-18 22:12
武力戡乱 发表于 2015-5-1 12:58
/*--  文字:  爱  --*/
/*--  宋体12;  此字体下对应的点阵为:宽x高=16x16   --*/
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,/*" ",0*/

哪里加过空行,
武力戡乱
6楼-- · 2019-07-18 22:48
YANGZHIMIN 发表于 2015-5-3 11:00
哪里加过空行,

/*--  文字:  大  --*/
/*--  宋体12;  此字体下对应的点阵为:宽x高=16x16   --*/
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,/*" ",0*/
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,/*" ",1*/
这个哈!全空哈!
还有16*16可以显示一个字,12*12也可以,但是如果是8*16没法显示一个完整的汉字!

一周热门 更多>