LCD12864编码显示汉字

合集下载
相关主题
  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

#include <>

#include <>

#define uint unsigned int

#define uchar unsigned char

#define DATA P0 //LCD12864数据线

sbit RS=P2^2; // 数据\指令选择

sbit RW=P2^1; // 读\写选择

sbit EN=P2^0; // 读\写使能

sbit CS1=P2^3; // 片选1

sbit CS2=P2^4; // 片选2

/********************************/

/* 定义中文字库*/

/********************************/

uchar code Hzk[]={

/*-- 文字: 各 --*/

/*-- 宋体12; 此字体下对应的点阵为:宽x高=16x16 --*/

0x00,0x20,0x20,0x10,0x08,0x8F,0xB4,0x44,0x44,0xA4,0x9C,0x04,0x00,0x00,0x00, 0x00,

0x02,0x02,0x02,0x01,0x7F,0x42,0x42,0x42,0x42,0x42,0x42,0x7F,0x01,0x03,0x01, 0x00,

/*-- 文字: 位 --*/

/*-- 宋体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,0xF8,0x28,0x29,0x2E,0x2A,0xF8,0x28,0x2C,0x2B,0x2A,0xF8,0x00,0x00, 0x00,

0x08,0x08,0x0B,0x09,0x09,0x09,0x09,0xFF,0x09,0x09,0x09,0x09,0x0B,0x08,0x08, 0x00,

/*-- 文字: 机 --*/

/*-- 宋体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,0x40,0xB2,0x96,0x9A,0x92,0xF6,0x9A,0x93,0x91,0x99,0x97,0x91,0x90,0x30, 0x00,

0x40,0x20,0xA0,0x90,0x4C,0x47,0x2A,0x2A,0x12,0x1A,0x26,0x22,0x40,0xC0,0x40, 0x00,

/*-- 文字: 好 --*/

/*-- 宋体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,0x20,0x24,0x24,0x24,0x24,0xA4,0xBF,0x64,0x24,0x34,0x28,0x26,0x24,0x20, 0x00,

0x04,0x04,0x04,0x02,0x02,0xFF,0x49,0x49,0x49,0x49,0x49,0x49,0xFF,0x00,0x00, 0x00,

/*-- 文字: 你 --*/

/*-- 宋体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 --*/

0x80,0x40,0xF0,0x1C,0x03,0xF0,0x01,0x0E,0x04,0x00,0x04,0x04,0x04,0xFC,0x00, 0x00,

0x00,0x00,0x7F,0x00,0x00,0x7F,0x00,0x00,0x00,0x00,0x00,0x20,0x40,0x3F,0x00, 0x00,

/*-- 文字: 辛 --*/

/*-- 宋体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,

相关文档
最新文档