SKU:RB-05L002 LCD12864点阵液晶显示器

来自ALSROBOT WiKi
跳转至: 导航搜索
05L00201.png

目录

产品概述

LCD12864 液晶是一种具有 4 位 / 8 位并行、2 线或 3 线串行多种接口方式,内部含有国际一级、二级简体中文库的点阵图形液晶显示模块;其显示分辨率为 128 * 64,内置 8192 个 16 * 16 点汉字,可构成全中文人机交互图形界面。可以显示 8 * 4 行 16 * 16 点阵的汉字,也可完成图形显示,低电压低功耗是它的显著特点。

产品参数

  1. 宽电压范围:VDD:3.3V - 5.5V
  2. 显示分辨率:128 * 64
  3. 内置汉字字库,提供 8192 个 16 * 16 点阵汉字
  4. 内置 128 个 16 * 8 点阵字符
  5. 时钟频率:2 MHz
  6. 视角方向:6 点
  7. 背光方式:侧面高亮白色LED,功耗仅为普通LED的1/5 - 1/10
  8. 通讯方式:串行、并行可选
  9. 内置DC - DC转换电路,无需外加电压
  10. 工作温度:0℃ - 55℃
  11. 存储温度:-20℃ - +60℃
  12. 外形尺寸图
05L00202.png

使用方法

声明:此款 LCD12864 液晶为未焊接连接件(排针)的版本,所以购买后您需要自行准备排针焊接,如果您不进行接口焊接,可能会出现接触不良的问题,而导致液晶屏不能正常显示

软件使用

  • 图片取模软件使用方法

说明:如果要使用液晶屏显示图片,我们需要使用到图片取模软件,大家在页面最后的相关资料内可以下载
如下图所示为软件的操作界面: (1)设置输出格式为:C 语言
(2)点击重设参数,设置输出大小,这里使用的是 12864 液晶显示器,所以输出大小为 X:128、Y:64
(3)点击载入图片,将要取模的图片载入到软件中
(4)点击数据保存,将取模后的码值保存到文件中

05L002008.png
  • 汉字内码提取软件使用方法

(1)在待处理字符串中输入要转换内码的文字,例如输入“奥松机器人”
(2)点击转换,转换结果中会输出内码值,程序中直接使用即可
如图所示:

05L0020009.png

接口说明

12864 液晶串口接口管脚信号说明
管脚号 名称 LEVEL 功能描述
1 GND 0V 电源地
2 VCC +5V 电源正(3V - 5.5V)
3 V0 - 对比度亮度调整
4 RS H / L 模组片选端,高电平有效
5 R / W H / L 串行数据输入端
6 E H / L 串行同步时钟:上升沿时读取数据
15 PSB L 串口方式
17 RST H / L 复位端,低电平有效
19 A 5V 背光源电压 +5V
20 K GND 背光源负端 0V


注意:1、实际应用中仅使用串口通讯模式,可以将PSB接固定的低电平
2、模块内部接有上电复位电路,因此在不需要经常复位的场合,可以将复位引脚悬空

12864 液晶并行接口管脚信号说明
管脚号 名称 LEVEL 功能描述
1 GND 0V 电源地
2 VCC +5V 电源正(3V - 5.5V)
3 V0 - 对比度亮度调整
4 RS H / L RS =“H”,表示 DB7 - DB0 为显示数据
RS =“L”, 表示 DB7 - DB0 为显示指令数据
5 R / W H / L R / W = “H”,E = “H”,数据被读到 DB7 - DB0
R / W = “L”,E = “H - L”,DB7 - DB0的数据被写到 IR 或 DR
6 E H / L 使能信号
7 DB0 H / L 三态数据线
7 DB0 H / L 三态数据线
8 DB1 H / L 三态数据线
9 DB2 H / L 三态数据线
10 DB3 H / L 三态数据线
11 DB4 H / L 三态数据线
12 DB5 H / L 三态数据线
13 DB6 H / L 三态数据线
14 DB7 H / L 三态数据线
15 PSB H/L H:8 位或 4 位并口方式,L:串口方式
16 NC - 空脚
17 RST H / L 复位端,低电平有效
18 VOUT - LCD 驱动电压输出端
19 A 5V 背光源电压 +5V
20 K GND 背光源负端 0V


注意:1、如果在实际使用中仅使用并口通讯模式,可以将PSB连接到固定的高电平
2、模块内部有上电复位电路,所以在不需要经常复位的场合可以将该引脚悬空
3、由于并行方式的接线非常麻烦,所以现在使用较多的为 SPI 的连接方式

例子程序1

  • 实验目的:使用串行通信的方式在 LCD12864 液晶上显示文字和图片
  • 使用硬件:

(1)LCD12864 液晶
(2)Starduino UNO R3 控制器
(3)传感器扩展板 V5.0

  • 软件环境:Arduino IDE 1.7.10
  • 硬件连接:

Starduino UNO R3 硬件连接图:

05L002004.png

实物连接图:

05L002005.png
  • 图片显示例程:
#include "LCD12864RSPI.h"
#define AR_SIZE( a ) sizeof( a ) / sizeof( a[0] )
unsigned char logo0[]={
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,
      0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
      0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
      0x00,0x00,0x01,0xF0,0x00,0x00,0x00,0x00,
      0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
      0x00,0x00,0x03,0xF8,0x00,0x00,0x00,0x00,
      0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
      0x00,0x00,0x03,0xF8,0x00,0x00,0x00,0x00,
      0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
      0x00,0x00,0x07,0xFC,0x00,0x00,0x00,0x00,
      0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
      0x00,0x00,0x07,0xFC,0x00,0x00,0x00,0x00,
      0x00,0x00,0x00,0x00,0xC0,0x00,0x00,0x00,
      0x00,0x00,0x07,0xFC,0x00,0x00,0x00,0x00,
      0x00,0x00,0x00,0x00,0xC0,0x00,0x00,0x00,
      0x00,0x00,0x0F,0xFC,0x00,0x00,0x00,0x00,
      0x00,0x00,0x00,0x00,0xC0,0x00,0x00,0x00,
      0x00,0x00,0x0F,0xFE,0xFF,0xF0,0x00,0x00,
      0x00,0x00,0x00,0x0C,0xD8,0x00,0x00,0x00,
      0x00,0x00,0x1F,0xFF,0xFF,0xFF,0xF0,0x00,
      0x00,0x00,0x00,0x18,0xDC,0x00,0x00,0x00,
      0x00,0x00,0x3F,0xFF,0xFF,0xFF,0xFF,0x80,
      0x00,0x00,0x00,0x18,0xCC,0x00,0x00,0x00,
      0x00,0x01,0xFF,0xFF,0xFF,0xFF,0xFF,0xE0,
      0x00,0x00,0x00,0x38,0xCE,0x00,0x00,0x00,
      0x00,0x03,0xFF,0xFF,0xFF,0xFF,0xFF,0xF8,
      0x00,0x00,0x00,0x30,0xC6,0x00,0x00,0x00,
      0x00,0x07,0xFF,0xFF,0xFF,0xFF,0xFF,0xFC,
      0x00,0x00,0x00,0x60,0xC7,0x00,0x00,0x00,
      0x00,0x0F,0xFF,0xFF,0xFF,0xFF,0xFF,0xFE,
      0x00,0x00,0x00,0x60,0xC3,0x00,0x00,0x00,
      0x00,0x1F,0xFF,0xFF,0xFF,0xFF,0xFF,0xFE,
      0x00,0x00,0x00,0x00,0xC0,0x00,0x00,0x00,
      0x00,0x3F,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
      0x00,0x00,0x00,0x00,0xC0,0x00,0x00,0x00,
      0x00,0xFF,0xFF,0xFF,0x80,0x3F,0xFF,0xFF,
      0xC0,0x00,0x00,0x0F,0x80,0x00,0x00,0x00,
      0x01,0xFF,0xFD,0x80,0x00,0x00,0x7F,0xFF,
      0xF0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
      0x07,0xFF,0xE0,0x00,0x00,0x00,0x0F,0xFF,
      0xF8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
      0x0F,0xFF,0xC0,0x00,0x00,0x00,0x03,0xFF,
      0xFC,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
      0x0F,0xFF,0xC0,0x00,0x00,0x00,0x01,0xFF,
      0xFE,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
      0x1F,0xFF,0xC0,0x03,0x00,0x30,0x00,0xFF,
      0xFE,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
      0x1F,0xFF,0xC0,0x07,0x80,0x78,0x00,0xFF,
      0xFE,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
      0x1F,0xFF,0xC0,0x07,0x80,0x78,0x00,0x7F,
      0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
      0x3F,0xFF,0x80,0x07,0x80,0x7C,0x00,0x7F,
      0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
      0x3F,0xFF,0x80,0x0F,0x80,0x7C,0x00,0x7F,
      0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
      0x3F,0xFF,0x80,0x0F,0x80,0x7C,0x00,0x3F,
      0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
      0x3F,0xFF,0x00,0x0F,0x80,0x7C,0x00,0x3F,
      0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
      0x3F,0xFF,0x00,0x0F,0x80,0x7C,0x00,0x3F,
      0xFF,0x80,0x00,0x00,0x00,0x00,0x00,0x00,
      0x7F,0xFF,0x00,0x0F,0x80,0x7C,0x00,0x3F,
      0xFF,0x80,0x00,0x00,0x00,0x00,0x00,0x00,
      0x7F,0xFF,0x00,0x0F,0x80,0x7C,0x00,0x3F,
      0xFF,0x80,0x00,0x01,0x80,0x00,0x00,0x00,
      0x7F,0xFE,0x00,0x0F,0x80,0x7C,0x00,0x1F,
      0xFF,0x80,0x00,0x3F,0xFE,0x00,0x00,0x00,
      0x7F,0xFE,0x00,0x0F,0x80,0x7C,0x00,0x1F,
      0xFF,0x80,0x00,0x30,0x06,0x00,0x00,0x00,
      0x7F,0xFE,0x00,0x0F,0x80,0x3C,0x00,0x1F,
      0xFF,0x80,0x00,0x3E,0xDE,0x00,0x00,0x00,
      0x7F,0xFE,0x00,0x07,0x00,0x18,0x00,0x1F,
      0xFF,0x80,0x00,0x37,0xF6,0x00,0x00,0x00,
      0x7F,0xFE,0x00,0x00,0x00,0x00,0x00,0x1F,
      0xFF,0x80,0x00,0x3F,0xFE,0x00,0x00,0x00,
      0x7F,0xFE,0x00,0x00,0x00,0x00,0x00,0x1F,
      0xFF,0xC0,0x00,0x33,0xE6,0x00,0x00,0x00,
      0xFF,0xFE,0x00,0x00,0x00,0x00,0x00,0x1F,
      0xFF,0xC0,0x00,0x3E,0xFE,0x00,0x00,0x00,
      0x7F,0xFE,0x00,0x00,0x00,0x00,0x00,0x1F,
      0xFF,0xC0,0x00,0x01,0x80,0x00,0x00,0x00,
      0x7F,0xFE,0x00,0x00,0x00,0x00,0x00,0x1F,
      0xFF,0x80,0x00,0x7F,0xFF,0x00,0x00,0x00,
      0x7F,0xFE,0x00,0x00,0x00,0x00,0x00,0x1F,
      0xFF,0x80,0x00,0x03,0xC0,0x00,0x00,0x00,
      0x3F,0xFF,0x00,0x00,0x00,0x00,0x00,0x3F,
      0xFF,0x00,0x00,0x06,0x70,0x00,0x00,0x00,
      0x3F,0xFF,0x00,0x00,0x00,0x00,0x00,0x3F,
      0xFF,0x00,0x00,0x78,0x0F,0x00,0x00,0x00,
      0x1F,0xFF,0x80,0x00,0x00,0x00,0x00,0x7F,
      0xFE,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
      0x0F,0xFF,0xE0,0x00,0x00,0x00,0x03,0xFF,
      0xFC,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
      0x07,0xFF,0xFF,0x00,0x00,0x00,0x3F,0xFF,
      0xF8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
      0x03,0xFF,0xFF,0xFE,0x00,0x1F,0xFF,0xFF,
      0xF0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
      0x03,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
      0xF0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
      0x03,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
      0xF0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
      0x01,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
      0xE0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
      0x01,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
      0xE0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
      0x00,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
      0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
      0x00,0x7F,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
      0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
      0x00,0x3F,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
      0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
      0x00,0x0F,0xFF,0xFF,0xFF,0xFF,0xFF,0xFC,
      0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
      0x00,0x00,0xFF,0xFF,0xFF,0xFF,0xFF,0xC0,
      0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
      0x00,0x00,0x07,0xFF,0xFF,0xFF,0xFC,0x00,
      0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
      0x00,0x00,0x00,0x07,0xFF,0xF8,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,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
};
void setup()
{
LCDA.Initialise(); // 屏幕初始化
delay(100);
LCDA.DrawFullScreen(logo0);
}
void loop()
{

}
  • 文字显示例程:
#include <LCD12864RSPI.h>
#define AR_SIZE( a ) sizeof( a ) / sizeof( a[0] )    
unsigned char show0[]={0xB0,0xC2,0xCB,0xC9,0xBB,0xFA,0xC6,0xF7,0xC8,0xCB};//奥松机器人
unsigned char show1[]="www.alsrobot.cn";
 void setup()
    {
    LCDA.Initialise(); // 屏幕初始化
    delay(100);
    }    
void loop()
    {
    LCDA.CLEAR();//清屏
    delay(100);
    LCDA.DisplayString(0,0,show0,AR_SIZE(show0));//第1行第1格开始,显示文字
    LCDA.DisplayString(1,0,show1,AR_SIZE(show1));//第2行第1格开始,显示文字
    delay(5000);
    LCDA.CLEAR();//清屏
    }
  • 程序效果:

图片显示效果:

05L002006.png

文字显示效果:

05L002007.png

例子程序2

  • 实验目的:使用串行通信的方式在 LCD12864 液晶上动态显示传感器的值
  • 使用硬件:

(1)LCD12864 液晶
(2)Starduino UNO R3 控制器
(3)传感器扩展板 V5.0
(4)光线传感器

  • 软件环境:Arduino IDE 1.7.10
  • 硬件连接:

Starduino UNO R3 接线图:

05L00205.png


实物连接图:

05L00206.png
  • 例子程序:
#include <LCD12864RSPI.h> 
unsigned char showx[]="Light Sensor=";
int val = 0;
void setup()
{
  LCDA.Initialise(); // 屏幕初始化
}
 
void loop()
{
  double tempx=0;
  char strx[6];
  val = analogRead(A1);
  
  LCDA.CLEAR(); 
  
  LCDA.DisplayString(0,0,showx,13);
  dtostrf(val,6,2,strx);
  LCDA.DisplayString(1,0,(unsigned char *)strx,7);  
  
  delay(300);
}
  • 程序效果:
05L00207.png

例子程序3

  • 实验目的:使用并行通信的方式在 LCD12864 液晶上显示文字
  • 使用硬件:

(1)LCD12864 液晶
(2)Starduino UNO R3 控制器
(3)传感器扩展板 V5.0

  • 软件环境:Arduino IDE 1.7.10
  • 硬件连接:

硬件连接接线图:

05L002012.png

实物接线图:

05L002011.png
  • 例子程序:
#include "LCD12864R.h"
#define AR_SIZE( a ) sizeof( a ) / sizeof( a[0] )
unsigned char show0[]={
  0xB9, 0xFE,
  0xB6, 0xFB,
  0xB1, 0xF5,
  0xB0, 0xC2,
  0xCB, 0xC9,
  0xBB, 0xFA,
  0xC6, 0xF7,
  0xC8, 0xCB
};                    //哈尔滨奥松机器人
unsigned char show1[]="www.alsrobot.cn";
 
void setup()
{
LCDA.Initialise(); // 屏幕初始化
delay(100);
}
 
void loop()
{
LCDA.CLEAR();//清屏
delay(100);
LCDA.DisplayString(0,0,show0,AR_SIZE(show0));//第一行第三格开始,显示文智位机器人
delay(100);
LCDA.DisplayString(2,0,show1,AR_SIZE(show1));;//第三行第二格开始,显示网址dfrobot.com/
delay(5000);
}
  • 程序效果:
05L002010.png

产品相关推荐

Erweima.png