“SKU:RB-05L002 LCD12864點(diǎn)陣液晶顯示器”的版本間的差異
(→?產(chǎn)品相關(guān)推薦) |
(→?例子程序3) |
||
第482行: | 第482行: | ||
* 程序效果: | * 程序效果: | ||
[[文件:05L002010.png|600px|縮略圖|居中]] | [[文件:05L002010.png|600px|縮略圖|居中]] | ||
? | + | ==產(chǎn)品相關(guān)推薦== | |
+ | |||
=== 產(chǎn)品資料 === | === 產(chǎn)品資料 === | ||
下載鏈接:https://pan.baidu.com/s/1IzflYbWbI5tNnh3w0XC_Kw | 下載鏈接:https://pan.baidu.com/s/1IzflYbWbI5tNnh3w0XC_Kw |
2021年12月22日 (三) 10:20的最后版本
目錄 |
產(chǎn)品概述
LCD12864 液晶是一種具有 4 位 / 8 位并行、2 線或 3 線串行多種接口方式,內(nèi)部含有國際一級、二級簡體中文庫的點(diǎn)陣圖形液晶顯示模塊;其顯示分辨率為 128 * 64,內(nèi)置 8192 個 16 * 16 點(diǎn)漢字,可構(gòu)成全中文人機(jī)交互圖形界面。可以顯示 8 * 4 行 16 * 16 點(diǎn)陣的漢字,也可完成圖形顯示,低電壓低功耗是它的顯著特點(diǎn)。
產(chǎn)品參數(shù)
- 寬電壓范圍:VDD:3.3V - 5.5V
- 顯示分辨率:128 * 64
- 內(nèi)置漢字字庫,提供 8192 個 16 * 16 點(diǎn)陣漢字
- 內(nèi)置 128 個 16 * 8 點(diǎn)陣字符
- 時鐘頻率:2 MHz
- 視角方向:6 點(diǎn)
- 背光方式:側(cè)面高亮白色LED,功耗僅為普通LED的1/5 - 1/10
- 通訊方式:串行、并行可選
- 內(nèi)置DC - DC轉(zhuǎn)換電路,無需外加電壓
- 工作溫度:0℃ - 55℃
- 存儲溫度:-20℃ - +60℃
- 外形尺寸圖
使用方法
聲明:此款 LCD12864 液晶為未焊接連接件(排針)的版本,所以購買后您需要自行準(zhǔn)備排針焊接,如果您不進(jìn)行接口焊接,可能會出現(xiàn)接觸不良的問題,而導(dǎo)致液晶屏不能正常顯示
軟件使用
- 圖片取模軟件使用方法
說明:如果要使用液晶屏顯示圖片,我們需要使用到圖片取模軟件,大家在頁面最后的相關(guān)資料內(nèi)可以下載
如下圖所示為軟件的操作界面:
(1)設(shè)置輸出格式為:C 語言
(2)點(diǎn)擊重設(shè)參數(shù),設(shè)置輸出大小,這里使用的是 12864 液晶顯示器,所以輸出大小為 X:128、Y:64
(3)點(diǎn)擊載入圖片,將要取模的圖片載入到軟件中
(4)點(diǎn)擊數(shù)據(jù)保存,將取模后的碼值保存到文件中
- 漢字內(nèi)碼提取軟件使用方法
(1)在待處理字符串中輸入要轉(zhuǎn)換內(nèi)碼的文字,例如輸入“奧松機(jī)器人”
(2)點(diǎn)擊轉(zhuǎn)換,轉(zhuǎn)換結(jié)果中會輸出內(nèi)碼值,程序中直接使用即可
如圖所示:
接口說明
12864 液晶串口接口管腳信號說明 | |||
管腳號 | 名稱 | LEVEL | 功能描述 |
1 | GND | 0V | 電源地 |
2 | VCC | +5V | 電源正(3V - 5.5V) |
3 | V0 | - | 對比度亮度調(diào)整 |
4 | RS | H / L | 模組片選端,高電平有效 |
5 | R / W | H / L | 串行數(shù)據(jù)輸入端 |
6 | E | H / L | 串行同步時鐘:上升沿時讀取數(shù)據(jù) |
15 | PSB | L | 串口方式 |
17 | RST | H / L | 復(fù)位端,低電平有效 |
19 | A | 5V | 背光源電壓 +5V |
20 | K | GND | 背光源負(fù)端 0V |
注意:1、實(shí)際應(yīng)用中僅使用串口通訊模式,可以將PSB接固定的低電平
2、模塊內(nèi)部接有上電復(fù)位電路,因此在不需要經(jīng)常復(fù)位的場合,可以將復(fù)位引腳懸空
12864 液晶并行接口管腳信號說明 | |||
管腳號 | 名稱 | LEVEL | 功能描述 |
1 | GND | 0V | 電源地 |
2 | VCC | +5V | 電源正(3V - 5.5V) |
3 | V0 | - | 對比度亮度調(diào)整 |
4 | RS | H / L | RS =“H”,表示 DB7 - DB0 為顯示數(shù)據(jù) RS =“L”, 表示 DB7 - DB0 為顯示指令數(shù)據(jù) |
5 | R / W | H / L | R / W = “H”,E = “H”,數(shù)據(jù)被讀到 DB7 - DB0 R / W = “L”,E = “H - L”,DB7 - DB0的數(shù)據(jù)被寫到 IR 或 DR |
6 | E | H / L | 使能信號 |
7 | DB0 | H / L | 三態(tài)數(shù)據(jù)線 |
7 | DB0 | H / L | 三態(tài)數(shù)據(jù)線 |
8 | DB1 | H / L | 三態(tài)數(shù)據(jù)線 |
9 | DB2 | H / L | 三態(tài)數(shù)據(jù)線 |
10 | DB3 | H / L | 三態(tài)數(shù)據(jù)線 |
11 | DB4 | H / L | 三態(tài)數(shù)據(jù)線 |
12 | DB5 | H / L | 三態(tài)數(shù)據(jù)線 |
13 | DB6 | H / L | 三態(tài)數(shù)據(jù)線 |
14 | DB7 | H / L | 三態(tài)數(shù)據(jù)線 |
15 | PSB | H/L | H:8 位或 4 位并口方式,L:串口方式 |
16 | NC | - | 空腳 |
17 | RST | H / L | 復(fù)位端,低電平有效 |
18 | VOUT | - | LCD 驅(qū)動電壓輸出端 |
19 | A | 5V | 背光源電壓 +5V |
20 | K | GND | 背光源負(fù)端 0V |
注意:1、如果在實(shí)際使用中僅使用并口通訊模式,可以將PSB連接到固定的高電平
2、模塊內(nèi)部有上電復(fù)位電路,所以在不需要經(jīng)常復(fù)位的場合可以將該引腳懸空
3、由于并行方式的接線非常麻煩,所以現(xiàn)在使用較多的為 SPI 的連接方式
例子程序1
- 實(shí)驗?zāi)康模菏褂么型ㄐ诺姆绞皆?LCD12864 液晶上顯示文字和圖片
- 使用硬件:
(1)LCD12864 液晶
(2)Starduino UNO R3 控制器
(3)傳感器擴(kuò)展板 V5.0
- 軟件環(huán)境:Arduino IDE 1.7.10
- 硬件連接:
Starduino UNO R3 硬件連接圖:
實(shí)物連接圖:
- 圖片顯示例程:
#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};//奧松機(jī)器人 unsigned char show1[]="lifestyle201.com"; 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();//清屏 }
- 程序效果:
圖片顯示效果:
文字顯示效果:
例子程序2
- 實(shí)驗?zāi)康模菏褂么型ㄐ诺姆绞皆?LCD12864 液晶上動態(tài)顯示傳感器的值
- 使用硬件:
(1)LCD12864 液晶
(2)Starduino UNO R3 控制器
(3)傳感器擴(kuò)展板 V5.0
(4)光線傳感器
- 軟件環(huán)境:Arduino IDE 1.7.10
- 硬件連接:
Starduino UNO R3 接線圖:
實(shí)物連接圖:
- 例子程序:
#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); }
- 程序效果:
例子程序3
- 實(shí)驗?zāi)康模菏褂貌⑿型ㄐ诺姆绞皆?LCD12864 液晶上顯示文字
- 使用硬件:
(1)LCD12864 液晶
(2)Starduino UNO R3 控制器
(3)傳感器擴(kuò)展板 V5.0
- 軟件環(huán)境:Arduino IDE 1.7.10
- 硬件連接:
硬件連接接線圖:
實(shí)物接線圖:
- 例子程序:
#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 }; //哈爾濱奧松機(jī)器人 unsigned char show1[]="lifestyle201.com"; void setup() { LCDA.Initialise(); // 屏幕初始化 delay(100); } void loop() { LCDA.CLEAR();//清屏 delay(100); LCDA.DisplayString(0,0,show0,AR_SIZE(show0));//第一行第三格開始,顯示文智位機(jī)器人 delay(100); LCDA.DisplayString(2,0,show1,AR_SIZE(show1));;//第三行第二格開始,顯示網(wǎng)址dfrobot.com/ delay(5000); }
- 程序效果:
產(chǎn)品相關(guān)推薦
產(chǎn)品資料
下載鏈接:https://pan.baidu.com/s/1IzflYbWbI5tNnh3w0XC_Kw 提取碼:3g4p