word文档LCD12864原理与应用(源程序+原理图+proteus仿真)

内容

wwweciteducnhttp://luoyong199092qjwmcom/Thursday,April11,2013LCD12864原理与应用1、LCD12864简介:LCD12864分为两种,带字库的和不带字库的,不带字库的液晶显示汉字的时候可以选择自己喜欢的字体。而带字库的液晶,只能显示GB2312字体,当然也可以显示其他的字体,不过是用图片的形式显示。下面介绍不带字库的LCD12864,以Proteus中的AMPIRE128×64为例,如下图所示,它的液晶驱动器为KS0108。引脚功能:引脚符号状态引脚名称功能CS1,CS2输入芯片片选端,都是低电平有效CS1=0开左屏幕,CS1=1关左屏幕CS2=0开右屏幕,CS2=1关右屏幕RS输入数据/命令选择信号RS=1为数据操作,RS=0为写指令或读状态RW输入读写选择信号R/W=1为读选通,R/W=0为写选通E输入读写使能信号在E下降沿,数据被锁存(写)入液晶,在E高电平期间,数据被读出DB0—DB7三态数据总线数据或指令的传送通道RST输入复位信号,低电平时复位复位时,关闭液晶显示,使显示起始行为0,可以跟单片机的复位引脚RST相连,也可以直接接VCC,使之不起作用V0液晶显示器驱动电压-Vout-10VLCD驱动负电压与带字库的液晶不同,此块液晶含有两个液晶驱动器,每块驱动器都控制64*64个点,分为左右两个屏幕显示,总共为128*64个点(即有128×64个点)。这就是为什么AMPIRE128*64有CS1和CS2两个片选端的原因。此液晶有8页,一页有8行点阵点,左右各64列,共128列。如下图所示:自动发货autocad2004使用教程45元长久激活无效立即退款广告正版autocaad下载,autoCAAD2004至CAAD2020免费下载,重装可用。查看详情>wwweciteducnhttp://luoyong199092qjwmcom/Thursday,April11,20132、LCD12864中的几条重要指令(一)行(line)设置命令:由此可见显示的起始行地址为0XC0,共64行,有规律地改变起始行号,可以实现滚屏效果。(二)页(page)设置指令:起始页地址为0XB8,因为液晶有64行点,分为8页,每页就有8行点。(三)列(column)地址设置指令每块驱动器的列地址都是从0X40到0X7F,共64列,所以此液晶共有128列点。(四)读状态指令浩辰CAD看图王_中文免费cad2004_支持cad2004各种格式图纸广告浩辰CAD看图王,正版cad2004软件,告别繁琐的cad2004软件,轻松查看以及编辑cad2004查看详情>wwweciteducnhttp://luoyong199092qjwmcom/Thursday,April11,20133、用LCD12864显示汉字(一)由于这块液晶不带字库,我们就要自己编写字库,编写字库所用的字模提取软件为Zimo21(软件下载地址http://luoyong199092qjwmcom/),LCD1602显示自定义字符的时候也是用它。在取模之前我们要进行一些设定,根据此液晶的显示原理,设置为“纵向取模,字节倒序”,如下图所示:(若不是这样,则取模得到的数据不是我们想要的,将会出现乱码,同样可以在http://luoyong199092qjwmcom/下载到关于字模提取原理文档)字体选择默认的“宋体,常规,小四号”,小四号为16*16大小,如下图所示:CAD软件中文版下载_小白一键安装_永久使用免费下载广告免费的cad,正版软件下载安装;中文版全套版本,一键激活;查看详情>wwweciteducnhttp://luoyong199092qjwmcom/Thursday,April11,2013LCD12864与单片机的连接如下图所示:C程序如下:#include<reg51h>#include<intrinsh>#defineucharunsignedchar#defineuintunsignedint//下面是“欢迎访问伊人憔悴空间”点阵数据,一个汉字有32字节数据组成unsignedcharcodehuan[]=//欢{0x04,0x24,0x44,0x84,0x64,0x9C,0x40,0x30,0x0F,0xC8,0x08,0x08,0x28,0x18,0x00,0x00,0x10,0x08,0x06,0x01,0x82,0x4C,0x20,0x18,0x06,0x01,0x06,0x18,0x20,0x40,0x80,0x00};unsignedcharcodeying[]=//迎cd_2020中文版免费下载_新版免费下载_58元永久使用广告cd,编辑器2020新版免费下载。图纸DWG格式文件的编辑,看图软件,主要为DWG,查看详情>wwweciteducnhttp://luoyong199092qjwmcom/Thursday,April11,2013{0x40,0x40,0x42,0xCC,0x00,0x00,0xFC,0x04,0x02,0x00,0xFC,0x04,0x04,0xFC,0x00,0x00,0x00,0x40,0x20,0x1F,0x20,0x40,0x4F,0x44,0x42,0x40,0x7F,0x42,0x44,0x43,0x40,0x00};unsignedcharcodefang[]=//访{0x40,0x40,0x42,0xCC,0x00,0x08,0x08,0xF8,0x89,0x8E,0x88,0x88,0x88,0x08,0x08,0x00,0x00,0x00,0x00,0x3F,0x90,0x48,0x30,0x0F,0x00,0x40,0x80,0x40,0x3F,0x00,0x00,0x00};unsignedcharcodewen[]=//问{0x00,0xF8,0x01,0x02,0x00,0xE2,0x22,0x22,0x22,0xE2,0x02,0x02,0x02,0xFE,0x00,0x00,0x00,0xFF,0x00,0x00,0x00,0x1F,0x08,0x08,0x08,0x1F,0x00,0x40,0x80,0x7F,0x00,0x00};unsignedcharcodeyi[]=//伊{0x00,0x80,0x60,0xF8,0x07,0x20,0x22,0x22,0xFE,0x22,0x22,0x22,0xFE,0x20,0x20,0x00,0x01,0x00,0x00,0xFF,0x00,0x80,0x42,0x32,0x0F,0x02,0x02,0x02,0x07,0x00,0x00,0x00};unsignedcharcoderen[]=//人{0x00,0x00,0x00,0x00,0x00,0x00,0xC0,0x3F,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x40,0x20,0x10,0x0C,0x03,0x00,0x00,0x00,0x03,0x0C,0x10,0x20,0x40,0x80,0x00};unsignedcharcodeqiao[]=//憔{0xE0,0x00,0xFF,0x10,0x20,0x10,0xFC,0x27,0x24,0x25,0xFE,0x24,0x24,0x24,0x04,0x00,0x01,0x00,0xFF,0x00,0x80,0x60,0x1F,0x29,0xC9,0x09,0x2F,0xC9,0x09,0x29,0xC8,0x00};unsignedcharcodecui[]=//悴{0x80,0x70,0x00,0xFF,0x08,0x90,0x44,0x34,0x45,0x86,0x44,0x34,0x44,0x84,0x00,0x00,0x00,0x00,0x00,0xFF,0x00,0x04,0x04,0x04,0x04,0xFE,0x04,0x04,0x04,0x04,0x04,0x00};unsignedcharcodebai[]=//百{0x02,0x02,0xE2,0x22,0x22,0x32,0x2A,0x26,0x22,0x22,0x22,0x22,0xE2,0x02,0x02,0x00,0x00,0x00,0xFF,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0xFF,0x00,0x00,0x00};unsignedcharcodedu[]=//度{0x00,0x00,0xFC,0x24,0x24,0x24,0xFC,0x25,0x26,0x24,0xFC,0x24,0x24,0x24,0x04,0x00,0x40,0x30,0x8F,0x80,0x84,0x4C,0x55,0x25,0x25,0x25,0x55,0x4C,0x80,0x80,0x80,0x00};

浏览:21
下载量:-
下载币:5
日期:2020-11-18
12
收藏
         投诉 / 报错
  • /12
1
2
3
4
5
6
7
8
9
10
11
12