“(SKU:RB-05L003)LCD12864點陣液晶擴展板”的版本間的差異

來自ALSROBOT WiKi
跳轉(zhuǎn)至: 導航、 搜索
?相關問題解答
?例子程序
 
(未顯示2個用戶的9個中間版本)
第18行: 第18行:
 
# 模塊尺寸:93×70×22mm
 
# 模塊尺寸:93×70×22mm
 
# 視域尺寸:73×39mm
 
# 視域尺寸:73×39mm
?
==使用方法==
+
==發(fā)貨清單==
?
工作于并行模式時的引腳定義:
+
* 12864 液晶擴展版 * 1個
?
* PIN1------ GND 電源接入 -, 一般接0V。  
+
* 6P 雙頭線 * 1條
 +
* 14P 雙頭線 * 1條
 +
==12864液晶屏接口定義==
 +
* PIN1------GND 電源接入 -, 一般接0V。  
 
* PIN2------電源接入 +, 一般接5V。  
 
* PIN2------電源接入 +, 一般接5V。  
 
* PIN3------對比度調(diào)整端,VDD和GND接可調(diào)電阻兩端,中間抽頭接至V0。  
 
* PIN3------對比度調(diào)整端,VDD和GND接可調(diào)電阻兩端,中間抽頭接至V0。  
第40行: 第43行:
 
* PIN19 ----LED+ ,背光 +,一般接5V。  
 
* PIN19 ----LED+ ,背光 +,一般接5V。  
 
* PIN20 ----LED- ,背光 -,一般接GND。
 
* PIN20 ----LED- ,背光 -,一般接GND。
?
==應用例程==
+
==使用方法==
?
===示例代碼===
+
===使用硬件===
?
<pre style='color:blue'>/************************************************************
+
* Carduino UNO 控制器 * 1個
?
機器人基地 RobotBase www.robatbase.cn
+
* LCD12864 點陣液晶擴展版 * 1個
?
目    的:  12864LCD_Parallel功能測試實驗例程
+
* USB 數(shù)據(jù)線 * 1條
?
目標系統(tǒng):  Carduino Mega168/Arduino Mega168/Mega328/Mega1280控制器
+
* V5.0傳感器擴展板 * 1個
?
應用軟件:  Arduino 0023
+
===例子程序===
?
功能描述:  顯示完整字符
+
基本功能的調(diào)試,需要將下列程序上傳到 Carduino 控制器中
?
發(fā)布時間:  2015-01-28
+
* [http://www.alsrobot.cn/wiki/index.php/Arduino%E5%85%A5%E9%97%A8%E6%95%99%E7%A8%8B#Arduino.E7.82.B9.E4.BA.AELED.E5.AE.9E.E9.AA.8C 點擊此處 Arduino 入門教程]查看程序上傳方法
?
說    明:  若用于商業(yè)用途,請保留此段文字或注明代碼來源
+
* 示例程序下載鏈接:https://pan.baidu.com/s/1ELRxz-P0e6xtV29VhoSRIQ?pwd=j0mq 提取碼:j0mq
?
              哈爾濱奧松機器人科技有限公司保留所有版權(quán)
+
*點此下載12864液晶擴展板使用解碼和取模軟件鏈接:https://pan.baidu.com/s/1_DywFvwE4KrrClWyr0kPow?pwd=0vcq 提取碼:0vcq
?
************************************************************/
+
將下載到的程序壓縮文件解壓到 RB-05L003_LCD_12864_Module_v3.0 文件夾下,解壓的文件夾粘貼到 Arduino IDE 軟件的 libraries 文件中(·····\arduino-1.7.6\libraries),
?
#include "PIC.h"
+
啟動 Arduino IDE 選擇文件 -- 示例 -- RB-05L003_LCD_12864_Module_v3.0 -- 對應示例,就可以實現(xiàn)代碼測試。
?
int RS = 2;
+
?
int RW = 3;
+
?
int E = 4;
+
?
//DB should be an unseparated group of pins
+
?
unsigned char DB[] = {
+
?
  6,7,8,9,10,11,12,13};  //wire these to DB6~13 on LCD.
+
?
//基本指令集預定義
+
?
#define LCD_DATA              1         //數(shù)據(jù)位
+
?
#define LCD_COMMAND            0 //命令位
+
?
#define LCD_CLEAR_SCREEN      0x01 //清屏
+
?
#define LCD_ADDRESS_RESET      0x02 //地址歸零
+
?
#define LCD_BASIC_FUNCTION   0x30 //基本指令集
+
?
#define LCD_EXTEND_FUNCTION   0x34 //擴充指令集
+
  
?
//擴展指令集預定義
+
====串行顯示漢字====
?
#define LCD_AWAIT_MODE 0x01 //待命模式
+
<pre style='color:blue'>
?
#define LCD_ROLLADDRESS_ON 0x03 //允許輸入垂直卷動地址
+
#include "LCD12864RSPI.h"
?
#define LCD_IRAMADDRESS_ON 0x02 //允許輸入IRAM地址
+
#define AR_SIZE( a ) sizeof( a ) / sizeof( a[0] )
?
#define LCD_SLEEP_MODE 0x08 //進入睡眠模式
+
unsigned char show0[]={
?
#define LCD_NO_SLEEP_MODE 0x0c //脫離睡眠模式
+
  0xB9, 0xFE, 0xB6, 0xFB,0xB1, 0xF5, 0xB0, 0xC2, 0xCB, 0xC9, 0xBB, 0xFA, 0xC6, 0xF7, 0xC8, 0xCB}; //哈爾濱奧松機器人
?
#define LCD_GRAPH_ON 0x36 //打開繪圖模式
+
unsigned char show1[]="m.lifestyle201.com";
?
#define LCD_GRAPH_OFF 0x34 //關閉繪圖模式
+
 
void setup()
 
void setup()
 
{
 
{
?
  LCD_Init();
+
LCDA.Initialise(); // 屏幕初始化
?
  LCD_ClearRam();
+
delay(100);
?
  // lcd.LCD_DisplayStrings_WithAddress(0x90,"ST7920 testing... processing");
+
?
  // pinMode(13,OUTPUT);
+
 
}
 
}
 +
 
void loop()
 
void loop()
 
{
 
{
?
  LCD_DisplayStrings_WithAddress(0x80,"  Welcome to  ");
+
LCDA.CLEAR();//清屏
?
  LCD_DisplayStrings_WithAddress(0x90,"www.robotbase.cn");
+
delay(100);
?
  LCD_DisplayStrings_WithAddress(0x88,"LCD 12864 Module");
+
LCDA.DisplayString(0,0,show0,AR_SIZE(show0));//第一行第三格開始,顯示文智位機器人
?
  LCD_DisplayStrings_WithAddress(0x98,"ST7920 testing..");
+
delay(100);
?
  delay(5000);
+
LCDA.DisplayString(2,0,show1,AR_SIZE(show1));;//第三行第二格開始,顯示網(wǎng)址dfrobot.com/
?
  LCD_ClearRam();
+
delay(5000);
?
  chsDisplay_16bit(0x80, 0xb4f2);//
+
?
  chsDisplay_16bit(0x81, 0xd4ec);//造
+
?
  chsDisplay_16bit(0x82, 0xb9fa);//國
+
?
  chsDisplay_16bit(0x83, 0xc4da);//內(nèi)
+
?
  chsDisplay_16bit(0x84, 0xcde2);//外
+
?
  chsDisplay_16bit(0x85, 0xd7ee);//最
+
?
  chsDisplay_16bit(0x86, 0xb4f3);//
+
?
  chsDisplay_16bit(0x90, 0xbbfa);//機
+
?
  chsDisplay_16bit(0x91, 0xc6f7);//器
+
?
  chsDisplay_16bit(0x92, 0xc8cb);//人
+
?
  chsDisplay_16bit(0x93, 0xc5e4);//配
+
?
  chsDisplay_16bit(0x94, 0xbcfe);//件
+
?
  chsDisplay_16bit(0x95, 0xc9cc);//商
+
?
  chsDisplay_16bit(0x96, 0xb3c7);//
+
?
  chsDisplay_16bit(0x88, 0xb8fc);//更
+
?
  chsDisplay_16bit(0x89, 0xb6e0);//多
+
?
  chsDisplay_16bit(0x8a, 0xd7ca);//資
+
?
  chsDisplay_16bit(0x8b, 0xd1b6);//訊
+
?
  chsDisplay_16bit(0x8c, 0xc7eb);//請
+
?
  chsDisplay_16bit(0x8d, 0xb5c7);//登
+
?
  chsDisplay_16bit(0x8e, 0xc2bc);//錄
+
?
  LCD_DisplayStrings_WithAddress(0x98,"www.robotbase.cn");
+
?
  delay(5000);
+
?
  LCD_ClearRam();
+
?
  LCD_ImgDisplay_from_flash(logo);
+
?
  delay(5000);
+
?
  LCD_ClearRam();
+
?
  LCD_ImgDisplay_from_flash(QQ);
+
?
  delay(5000);
+
?
  LCD_ClearRam();
+
 
}
 
}
?
void LCD_Init(void)
+
</pre>
 +
====串行圖片顯示====
 +
<pre style='color:blue'>
 +
#include "LCD12864RSPI.h"
 +
#define AR_SIZE( a ) sizeof( a ) / sizeof( a[0] )
 +
unsigned char logo0[]={                                        //笑臉
 +
0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
 +
      0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
 +
      0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
 +
      0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
 +
      0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
 +
      0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
 +
      0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
 +
      0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
 +
      0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
 +
      0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
 +
      0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
 +
      0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
 +
      0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xF9,
 +
      0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
 +
      0xFF,0xFF,0xFF,0xFF,0xBF,0xFF,0xFF,0xFA,
 +
      0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
 +
      0xFF,0xFF,0xFF,0xFF,0xBF,0xFF,0xFF,0xF6,
 +
      0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
 +
      0xFF,0xFF,0xFF,0xFF,0xBF,0xFF,0xFF,0xEE,
 +
      0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
 +
      0xFF,0xFF,0xFF,0xFC,0x00,0x00,0x00,0xEE,
 +
      0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
 +
      0xFF,0xFF,0xFF,0xFF,0x3F,0xFF,0xFF,0x00,
 +
      0x00,0x00,0x01,0xFF,0xFF,0xFF,0xFF,0xFF,
 +
      0xFF,0xFF,0xFF,0xFC,0xBF,0xFF,0xFF,0xBF,
 +
      0x7F,0xFF,0xFD,0xFF,0xFF,0xFF,0xFF,0xFF,
 +
      0xFF,0xFF,0xFF,0xF9,0xBF,0xFF,0xFF,0xBF,
 +
      0x7F,0xFF,0xFD,0xFF,0xFF,0xFF,0xFF,0xFF,
 +
      0xFF,0xFF,0xFF,0xF3,0x7F,0xFF,0xFF,0x7F,
 +
      0xBF,0xFF,0xFB,0xFF,0xFF,0xFF,0xFF,0xFF,
 +
      0xFF,0xFF,0xFF,0xE7,0x7F,0xFF,0xFE,0xFF,
 +
      0xBF,0xFF,0xF9,0xFF,0xFF,0xFF,0xFF,0xFF,
 +
      0xFF,0xFF,0xFF,0xDF,0x7F,0xFF,0xFC,0xFF,
 +
      0xBF,0xFF,0xFA,0x7F,0xFF,0xFF,0xFF,0xFF,
 +
      0xFF,0xFF,0xFF,0xBF,0x7F,0xFF,0xFD,0xFF,
 +
      0xBF,0xFF,0xFB,0x9F,0xFF,0xFF,0xFF,0xFF,
 +
      0xFF,0xFF,0xFF,0x7F,0x7F,0xFF,0xFB,0xFF,
 +
      0xDF,0xFF,0xF7,0xE7,0xFF,0xFF,0xFF,0xFF,
 +
      0xFF,0xFF,0xFC,0xFF,0x7F,0xFF,0xF3,0xFF,
 +
      0xDF,0xFF,0xF7,0xF9,0xFF,0xFF,0xFF,0xFF,
 +
      0xFF,0xFF,0xF9,0xFF,0x7F,0xFF,0xF7,0xFF,
 +
      0xDF,0xFF,0xF7,0xFE,0x7F,0xFF,0xFF,0xFF,
 +
      0xFF,0xFF,0xF3,0xFF,0x7F,0xFF,0xEF,0xFF,
 +
      0xEF,0xFF,0xF7,0xFF,0x9F,0xFF,0xFF,0xFF,
 +
      0xFF,0xFF,0xE7,0xFF,0x7F,0xFF,0xCF,0xFF,
 +
      0xEF,0xFF,0xEF,0xFF,0xE7,0xFF,0xFF,0xFF,
 +
      0xFF,0xFF,0xDF,0xFF,0x7F,0xFF,0xDF,0xFF,
 +
      0xEF,0xFF,0xEF,0xFF,0xF9,0xFF,0xFF,0xFF,
 +
      0xFF,0xFF,0xBF,0xFF,0x7F,0xFF,0xBF,0xFF,
 +
      0xF7,0xFF,0xEF,0xFF,0xFE,0x7F,0xFF,0xFF,
 +
      0xFF,0xFF,0x7F,0xFE,0xFF,0xFF,0x3F,0xFF,
 +
      0xF7,0xFF,0xEF,0xFF,0xFF,0x9F,0xFF,0xFF,
 +
      0xFF,0xFE,0xFF,0xFE,0xFF,0xFF,0x7F,0xFF,
 +
      0xF7,0xFF,0xDF,0xFF,0xFF,0xE7,0xFF,0xFF,
 +
      0xFF,0xF9,0xFF,0xFE,0xFF,0xFE,0xFF,0xFF,
 +
      0xF7,0xFF,0xDF,0xFF,0xFF,0xF9,0xFF,0xFF,
 +
      0xFF,0xF3,0xFF,0xFE,0xFF,0xFC,0xFF,0xFF,
 +
      0xFB,0xFF,0xDF,0xFF,0xFF,0xFE,0x7F,0xFF,
 +
      0xFF,0xE7,0xFF,0xFE,0xFF,0xFD,0xFF,0xFF,
 +
      0xFB,0xFF,0xDF,0xFF,0xFF,0xFF,0x9F,0xFF,
 +
      0xFF,0xCF,0xFF,0xFE,0xFF,0xFB,0xFF,0xFF,
 +
      0xFB,0xFF,0x9F,0xE0,0x00,0x00,0x03,0xFF,
 +
      0xFF,0xBF,0xFF,0xFE,0xE0,0x00,0x00,0x00,
 +
      0x00,0x00,0x00,0x1F,0xFF,0xFF,0xC1,0xFF,
 +
      0xF8,0x00,0x00,0x00,0x1F,0xF7,0xFF,0xFF,
 +
      0xFD,0xFF,0xBF,0xFF,0xFF,0xFF,0x1C,0xFF,
 +
      0xFF,0xFF,0xFF,0xFE,0xFF,0xEF,0xFF,0xFF,
 +
      0xFD,0xFF,0xBF,0xFF,0xFF,0xFC,0xFF,0xFF,
 +
      0xFF,0xBF,0xFF,0xFE,0xFF,0xCF,0xFF,0xFF,
 +
      0xFD,0xFF,0xBF,0xFF,0xFF,0xF3,0xFF,0xFF,
 +
      0xFF,0xDF,0xFF,0xFE,0xFF,0xDF,0xFF,0xFF,
 +
      0xFE,0xFF,0x7F,0xFF,0xFF,0xCF,0xFF,0xFF,
 +
      0xFF,0xEF,0xFF,0xFE,0xFF,0xBF,0xFF,0xFF,
 +
      0xFE,0xFF,0x7F,0xFF,0xFF,0x3F,0xFF,0xFF,
 +
      0xFF,0xF7,0xFF,0xFD,0xFF,0x3F,0xFF,0xFF,
 +
      0xFE,0xFF,0x7F,0xFF,0xFC,0xFF,0xFF,0xFF,
 +
      0xFF,0xFB,0xFF,0xFD,0xFF,0x7F,0xFF,0xFF,
 +
      0xFF,0x7F,0x7F,0xFF,0xF3,0xFF,0xFF,0xFF,
 +
      0xFF,0xFD,0xFF,0xFD,0xFE,0xFF,0xFF,0xFF,
 +
      0xFF,0x7E,0xFF,0xFF,0xCF,0xFF,0xFF,0xFF,
 +
      0xFF,0xFE,0xFF,0xFD,0xFC,0xFF,0xFF,0xFF,
 +
      0xFF,0x7E,0xFF,0xFF,0x3F,0xFF,0xFF,0xFF,
 +
      0xFF,0xFE,0x7F,0xFD,0xFD,0xFF,0xFF,0xFF,
 +
      0xFF,0x7E,0xFF,0xF8,0xFF,0xFF,0xFF,0xFF,
 +
      0xFF,0xFF,0x3F,0xFD,0xFB,0xFF,0xFF,0xFF,
 +
      0xFF,0xBE,0xFF,0xE3,0xFF,0xFF,0xFF,0xFF,
 +
      0xFF,0xFF,0x9F,0xFD,0xF7,0xFF,0xFF,0xFF,
 +
      0xFF,0xBD,0xFF,0x9F,0xFF,0xFF,0xFF,0xFF,
 +
      0xFF,0xFF,0xCF,0xFD,0xF7,0xFF,0xFF,0xFF,
 +
      0xFF,0xBD,0xFE,0x7F,0xFF,0xFF,0xFF,0xFF,
 +
      0xFF,0xFF,0xE7,0xFD,0xEF,0xFF,0xFF,0xFF,
 +
      0xFF,0xDD,0xF9,0xFF,0xFF,0xFF,0xFF,0xFF,
 +
      0xFF,0xFF,0xF3,0xFD,0xDF,0xFF,0xFF,0xFF,
 +
      0xFF,0xDD,0xE7,0xFF,0xFF,0xFF,0xFF,0xFF,
 +
      0xFF,0xFF,0xF9,0xFD,0xDF,0xFF,0xFF,0xFF,
 +
      0xFF,0xDB,0x9F,0xFF,0xFF,0xFF,0xFF,0xFF,
 +
      0xFF,0xFF,0xFC,0xFD,0xBF,0xFF,0xFF,0xFF,
 +
      0xFF,0x80,0x7F,0xFF,0xFF,0xFF,0xFF,0xFF,
 +
      0xFF,0xFF,0xFE,0x7B,0x7F,0xFF,0xFF,0x80,
 +
      0x00,0x69,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
 +
      0xFF,0xFF,0xFF,0x3B,0x7F,0xC0,0x00,0x3F,
 +
      0xFF,0xE3,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
 +
      0xFF,0xFF,0xFF,0xBA,0x80,0x3F,0xFF,0xFF,
 +
      0xFF,0x03,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
 +
      0xFF,0xFF,0xFF,0xD9,0xFF,0xFF,0xFF,0xFF,
 +
      0xFE,0x77,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
 +
      0xFF,0xFF,0xFF,0xE9,0xFF,0xFF,0xFF,0xFF,
 +
      0xFF,0xF7,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
 +
      0xFF,0xFF,0xFF,0xF3,0xFF,0xFF,0xFF,0xFF,
 +
      0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
 +
      0xFF,0xFF,0xFF,0xFB,0xFF,0xFF,0xFF,0xFF,
 +
      0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
 +
      0xFF,0xFF,0xFF,0xFD,0xFF,0xFF,0xFF,0xFF,
 +
      0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
 +
      0xFF,0xFF,0xFF,0xFE,0xFF,0xFF,0xFF,0xFF,
 +
      0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
 +
      0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
 +
      0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
 +
      0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
 +
      0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
 +
      0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
 +
      0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
 +
      0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
 +
      0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
 +
      0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
 +
      0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
 +
      0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
 +
      0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF
 +
};
 +
void setup()
 
{
 
{
?
  pinMode(E,OUTPUT);
+
LCDA.Initialise(); // 屏幕初始化
?
  pinMode(RS,OUTPUT);
+
delay(100);
?
  pinMode(RW,OUTPUT);
+
?
  pinMode(6,OUTPUT);
+
?
  pinMode(7,OUTPUT);
+
?
  pinMode(8,OUTPUT);
+
?
  pinMode(9,OUTPUT);
+
?
  pinMode(10,OUTPUT);
+
?
  pinMode(11,OUTPUT);
+
?
  pinMode(12,OUTPUT);
+
?
  pinMode(13,OUTPUT);
+
?
  delay(100);
+
?
  LCD_Write(0,0x30); //基本指令動作 
+
?
  LCD_Write(0,0x02); //地址歸位 
+
?
  LCD_Write(0,0x0C);  //開顯示,關游標
+
?
  LCD_Write(0,0x01);//清屏,地址指針指向00H
+
?
  LCD_Write(0,0x06);      //光標的移動方向
+
?
  LCD_Write(0,0x80);          //設定顯示的起始地址
+
 
}
 
}
?
void LCD_Write( unsigned char Data_Command , unsigned char uc_Content )
+
void loop()
?
{
+
?
  digitalWrite(RW,LOW); //RW = 0;  //寫模式
+
?
  if(Data_Command)
+
?
  {
+
?
    digitalWrite(RS,HIGH); //RS = 1;  //數(shù)據(jù)
+
?
  }
+
?
  else
+
?
  {
+
?
    digitalWrite(RS,LOW); //RS = 0; //指令
+
?
  }
+
?
 
+
?
  unsigned char i;
+
?
  for (i=DB[0]; i <= DB[7]; i++)
+
?
  {
+
?
    digitalWrite(i,uc_Content & 0x01);
+
?
    uc_Content >>= 1;
+
?
  }//發(fā)送數(shù)據(jù)
+
?
  digitalWrite(E,HIGH); //E = 1;
+
?
  delay(5); //延時
+
?
  digitalWrite(E,LOW); //E = 0;
+
?
}
+
?
void LCD_ClearRam(void)
+
 
{
 
{
?
  LCD_Write(LCD_COMMAND,LCD_BASIC_FUNCTION); //基本指令集
+
LCDA.DrawFullScreen(logo0);
?
  LCD_Write(LCD_COMMAND,LCD_CLEAR_SCREEN); //清屏
+
delay(5000);
 
}
 
}
?
void LCD_DDRAM_AddressSet(unsigned char ucDDramAdd)
+
</pre>
 +
====并行顯示====
 +
<pre style='color:blue'>
 +
#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,0xF7,
 +
0xC8, 0xCB};                    //哈爾濱奧松機器人
 +
unsigned char show1[]="m.lifestyle201.com";
 +
 +
void setup()
 
{
 
{
?
  LCD_Write(LCD_COMMAND,LCD_BASIC_FUNCTION); //基本指令集
+
LCDA.Initialise(); // 屏幕初始化
?
  LCD_Write(LCD_COMMAND,ucDDramAdd); //設定DDRAM地址到地址計數(shù)器AC
+
delay(100);
 
}
 
}
?
void LCD_CGRAM_AddressSet(unsigned char ucCGramAdd)
+
 +
void loop()
 
{
 
{
?
  LCD_Write(LCD_COMMAND,LCD_BASIC_FUNCTION); //基本指令集
+
LCDA.CLEAR();//清屏
?
  LCD_Write(LCD_COMMAND,ucCGramAdd); //設定CGRAM地址到地址計數(shù)器AC
+
delay(100);
 +
LCDA.DisplayString(0,0,show0,AR_SIZE(show0));//第一行第三格開始,顯示文智位機器人
 +
delay(100);
 +
LCDA.DisplayString(2,0,show1,AR_SIZE(show1));;//第三行第二格開始,顯示網(wǎng)址dfrobot.com/
 +
delay(5000);
 
}
 
}
?
void LCD_GDRAM_AddressSet(unsigned char ucGDramAdd)
+
</pre>
?
{
+
?
  LCD_Write(LCD_COMMAND,LCD_EXTEND_FUNCTION); //擴展指令集
+
?
  LCD_Write(LCD_COMMAND,ucGDramAdd);
+
?
}
+
?
void chsDisplay_8bit(unsigned char ucAdd, unsigned char code)
+
?
{
+
?
  LCD_Write(LCD_COMMAND,LCD_BASIC_FUNCTION);  //基本指令動作 
+
?
  LCD_DDRAM_AddressSet(ucAdd);
+
?
  LCD_Write(LCD_DATA, code);
+
?
}
+
?
void chsDisplay_16bit(unsigned char ucAdd, unsigned int code)
+
?
{
+
?
  LCD_Write(LCD_COMMAND,LCD_BASIC_FUNCTION);  //基本指令動作 
+
?
  LCD_DDRAM_AddressSet(ucAdd);
+
?
  unsigned char temp;
+
?
  delay(2);
+
?
  temp = (code&0xFF00)>>8;
+
?
  LCD_Write(1,temp);
+
?
 
+
?
  temp = code&0x00FF;
+
?
  LCD_Write(1,temp);
+
?
}
+
?
void LCD_DisplayStrings_WithAddress(unsigned char ucAdd,const char *p)
+
?
{
+
?
  unsigned char length;
+
?
  length = strlen(p);
+
?
  LCD_Write(LCD_COMMAND,LCD_BASIC_FUNCTION);  //基本指令動作 
+
?
  LCD_DDRAM_AddressSet(ucAdd);
+
?
  for( ;  length ; length -- )
+
?
    LCD_Write(LCD_DATA, *(p++));
+
?
}
+
?
void LCD_GraphModeSet(unsigned char Select)
+
?
{
+
?
  LCD_Write(LCD_COMMAND,LCD_EXTEND_FUNCTION); //擴展指令集
+
?
  if(Select)
+
?
  {
+
?
    LCD_Write(LCD_COMMAND,LCD_GRAPH_ON); //打開繪圖模式
+
?
  }
+
?
  else
+
?
  {
+
?
    LCD_Write(LCD_COMMAND,LCD_GRAPH_OFF); //關閉繪圖模式
+
?
  }
+
?
}
+
?
void LCD_ImgDisplay(unsigned char *img)
+
?
{
+
?
  unsigned char i,j;
+
?
  LCD_GraphModeSet(0x00); //先關閉圖形顯示功能
+
?
  for(j=0;j<32;j++)
+
?
  {
+
?
    for(i=0;i<8;i++)
+
?
    {
+
?
      LCD_Write(LCD_COMMAND,0x80+j); //設定垂直坐標
+
?
      LCD_Write(LCD_COMMAND,0x80+i); //設定水平坐標
+
?
      LCD_Write(LCD_DATA,img[j*16+i*2]); //放入數(shù)據(jù)高字節(jié)
+
?
      LCD_Write(LCD_DATA,img[j*16+i*2+1]); //放入數(shù)據(jù)低字節(jié)
+
?
    }
+
?
  }
+
?
  for(j=32;j<64;j++)
+
?
  {
+
?
    for(i=0;i<8;i++)
+
?
    {
+
?
      LCD_Write(LCD_COMMAND,0x80+j-32);
+
?
      LCD_Write(LCD_COMMAND,0x88+i);
+
?
      LCD_Write(LCD_DATA,img[j*16+i*2]);
+
?
      LCD_Write(LCD_DATA,img[j*16+i*2+1]);
+
?
    }
+
?
  }
+
?
  LCD_GraphModeSet(0x01);//最后打開圖形顯示功能
+
?
}
+
?
void LCD_ImgDisplay_from_flash(unsigned char *img)
+
?
{
+
?
  unsigned char *data = img;
+
?
  unsigned char i,j;
+
?
  LCD_GraphModeSet(0x00);
+
?
 
+
?
  for(i=0;i<32;i++)     
+
?
  {
+
?
    LCD_Write(LCD_COMMAND,0x80|i); 
+
?
    LCD_Write(LCD_COMMAND,0x80);   
+
?
    for(j=0;j<16;j++)         
+
?
    {                       
+
?
      LCD_Write(LCD_DATA,pgm_read_byte(data++));
+
?
    }
+
?
  }
+
  
?
  for(i=0;i<32;i++)             
 
?
  {
 
?
    LCD_Write(LCD_COMMAND,0x80|i);       
 
?
    LCD_Write(LCD_COMMAND,0x88);         
 
?
    for(j=0;j<16;j++)               
 
?
    {
 
?
      LCD_Write(LCD_DATA,pgm_read_byte(data++));
 
?
    }
 
?
  }
 
?
  LCD_GraphModeSet(0x01);             
 
?
  LCD_Write(LCD_COMMAND,LCD_BASIC_FUNCTION);
 
?
}</pre>
 
 
===程序效果===
 
===程序效果===
?
字跡顯示清晰
+
以上三個測試例程,分別通過串行和并行通信方式進行顯示,文字顯示:“奧松機器人,m.lifestyle201.com”,圖片顯示為位圖,通過下載解碼和取模軟件可以輕松編程。
?
[[文件:RB-05L0031.jpg|500px|縮略圖|居中]]
+
==視頻演示==
 +
[[File:12864 ye jing.png|400px|左|link=http://v.youku.com/v_show/id_XMTc2Mzk2MDI4.html?from=y1.7-2]]
 +
[[File:iic1602 01.png|400px|居中|link=http://v.youku.com/v_show/id_XMjQzMjMzOTky.html?from=y1.7-2]]
 +
<br/>
  
 
==產(chǎn)品相關推薦==
 
==產(chǎn)品相關推薦==
第285行: 第261行:
 
===購買地址===
 
===購買地址===
 
[http://m.lifestyle201.com/goods-128.html LCD12864點陣液晶擴展板]
 
[http://m.lifestyle201.com/goods-128.html LCD12864點陣液晶擴展板]
?
=====周邊產(chǎn)品推薦===
+
===周邊產(chǎn)品推薦===
 
[http://m.lifestyle201.com/goods-663.html Raspberry Pi 樹莓派 2代 B+ 7寸液晶屏 LCD電容觸摸 高清顯示器]
 
[http://m.lifestyle201.com/goods-663.html Raspberry Pi 樹莓派 2代 B+ 7寸液晶屏 LCD電容觸摸 高清顯示器]
 
<br/>
 
<br/>
第292行: 第268行:
 
[http://www.makerspace.cn/forum.php?mod=viewthread&tid=3997&highlight=12864 Arduino驅(qū)動控制12864液晶屏]<br/>
 
[http://www.makerspace.cn/forum.php?mod=viewthread&tid=3997&highlight=12864 Arduino驅(qū)動控制12864液晶屏]<br/>
 
[http://www.makerspace.cn/forum.php?mod=viewthread&tid=2929&highlight=12864 12864液晶顯示程序編譯錯誤]
 
[http://www.makerspace.cn/forum.php?mod=viewthread&tid=2929&highlight=12864 12864液晶顯示程序編譯錯誤]
?
 
 
===相關學習資料===
 
===相關學習資料===
?
 
+
[http://www.makerspace.cn/forum.ph
?
[http://www.makerspace.cn/portal.php 奧松機器人技術(shù)論壇]
+

2023年11月18日 (六) 13:41的最后版本

RB-05L003.jpg

目錄

產(chǎn)品概述

2014年最新推出的12864液晶板采用的是帶漢字庫圖形點陣液晶顯示模塊,具有串行和并行接口,背光控制開關(串行與并行模式均可使用),對比度調(diào)節(jié)旋鈕,板上集成IDC6插座和IDC14插座,可通過套件中附送的專用連接線與Arduino傳感器擴展板連接,無需再買相關轉(zhuǎn)接板,通過我們提供的例子程序,您可以用Arduino控制器做控制完成顯示8192個中文漢字(16X16點陣)、128個字符(8X16點陣)和圖形顯示(128X64點陣)功能,輕松制作Arduino互動顯示器最佳選擇。

規(guī)格參數(shù)

  1. 電源電壓:VDD+3.3V~+5.5V(內(nèi)置升壓電路,無需負壓)
  2. 控制器:ST7920
  3. 點陣個數(shù):128列×64行
  4. 顯示顏色:藍底白字
  5. 可視角度:170度
  6. LCD類型:STN
  7. 控制接口:8位或4位并行和3位串行
  8. LED背光:藍色
  9. 軟件功能:光標顯示、畫面移位、自定義字符、反白顯示、睡眠模式等
  10. 邏輯工作電壓(VDD):4.5~5.5V
  11. 電源地(GND):0V
  12. 工作溫度:-20℃~70℃
  13. 存儲溫度:-30℃~80℃
  14. 模塊尺寸:93×70×22mm
  15. 視域尺寸:73×39mm

發(fā)貨清單

  • 12864 液晶擴展版 * 1個
  • 6P 雙頭線 * 1條
  • 14P 雙頭線 * 1條

12864液晶屏接口定義

  • PIN1------GND 電源接入 -, 一般接0V。
  • PIN2------電源接入 +, 一般接5V。
  • PIN3------對比度調(diào)整端,VDD和GND接可調(diào)電阻兩端,中間抽頭接至V0。
  • PIN4------RS 指令/數(shù)據(jù)選擇
  • PIN5------R/W 讀寫選擇
  • PIN6------E,信號使能
  • PIN7------D0,數(shù)據(jù)位0
  • PIN8------D1,數(shù)據(jù)位1
  • PIN9------D2,數(shù)據(jù)位2
  • PIN10-----D3,數(shù)據(jù)位3
  • PIN11-----D4,數(shù)據(jù)位4
  • PIN12-----D5,數(shù)據(jù)位5
  • PIN13-----D6,數(shù)據(jù)位6
  • PIN14-----D7,數(shù)據(jù)位7
  • PIN15-----PSB 并行:PSB=1,可以接VCC; 串行:PSB=0,一般接GND
  • PIN16 ----NC,不連接
  • PIN17-----~RST,模塊復位,可不連接
  • PIN18 ----NC,不連接
  • PIN19 ----LED+ ,背光 +,一般接5V。
  • PIN20 ----LED- ,背光 -,一般接GND。

使用方法

使用硬件

  • Carduino UNO 控制器 * 1個
  • LCD12864 點陣液晶擴展版 * 1個
  • USB 數(shù)據(jù)線 * 1條
  • V5.0傳感器擴展板 * 1個

例子程序

基本功能的調(diào)試,需要將下列程序上傳到 Carduino 控制器中

將下載到的程序壓縮文件解壓到 RB-05L003_LCD_12864_Module_v3.0 文件夾下,解壓的文件夾粘貼到 Arduino IDE 軟件的 libraries 文件中(·····\arduino-1.7.6\libraries), 啟動 Arduino IDE 選擇文件 -- 示例 -- RB-05L003_LCD_12864_Module_v3.0 -- 對應示例,就可以實現(xiàn)代碼測試。

串行顯示漢字

#include "LCD12864RSPI.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[]="m.lifestyle201.com";
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));;//第三行第二格開始,顯示網(wǎng)址dfrobot.com/
delay(5000);
}

串行圖片顯示

#include "LCD12864RSPI.h"
#define AR_SIZE( a ) sizeof( a ) / sizeof( a[0] )
unsigned char logo0[]={                                         //笑臉
 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
      0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
      0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
      0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
      0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
      0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
      0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
      0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
      0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
      0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
      0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
      0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
      0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xF9,
      0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
      0xFF,0xFF,0xFF,0xFF,0xBF,0xFF,0xFF,0xFA,
      0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
      0xFF,0xFF,0xFF,0xFF,0xBF,0xFF,0xFF,0xF6,
      0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
      0xFF,0xFF,0xFF,0xFF,0xBF,0xFF,0xFF,0xEE,
      0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
      0xFF,0xFF,0xFF,0xFC,0x00,0x00,0x00,0xEE,
      0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
      0xFF,0xFF,0xFF,0xFF,0x3F,0xFF,0xFF,0x00,
      0x00,0x00,0x01,0xFF,0xFF,0xFF,0xFF,0xFF,
      0xFF,0xFF,0xFF,0xFC,0xBF,0xFF,0xFF,0xBF,
      0x7F,0xFF,0xFD,0xFF,0xFF,0xFF,0xFF,0xFF,
      0xFF,0xFF,0xFF,0xF9,0xBF,0xFF,0xFF,0xBF,
      0x7F,0xFF,0xFD,0xFF,0xFF,0xFF,0xFF,0xFF,
      0xFF,0xFF,0xFF,0xF3,0x7F,0xFF,0xFF,0x7F,
      0xBF,0xFF,0xFB,0xFF,0xFF,0xFF,0xFF,0xFF,
      0xFF,0xFF,0xFF,0xE7,0x7F,0xFF,0xFE,0xFF,
      0xBF,0xFF,0xF9,0xFF,0xFF,0xFF,0xFF,0xFF,
      0xFF,0xFF,0xFF,0xDF,0x7F,0xFF,0xFC,0xFF,
      0xBF,0xFF,0xFA,0x7F,0xFF,0xFF,0xFF,0xFF,
      0xFF,0xFF,0xFF,0xBF,0x7F,0xFF,0xFD,0xFF,
      0xBF,0xFF,0xFB,0x9F,0xFF,0xFF,0xFF,0xFF,
      0xFF,0xFF,0xFF,0x7F,0x7F,0xFF,0xFB,0xFF,
      0xDF,0xFF,0xF7,0xE7,0xFF,0xFF,0xFF,0xFF,
      0xFF,0xFF,0xFC,0xFF,0x7F,0xFF,0xF3,0xFF,
      0xDF,0xFF,0xF7,0xF9,0xFF,0xFF,0xFF,0xFF,
      0xFF,0xFF,0xF9,0xFF,0x7F,0xFF,0xF7,0xFF,
      0xDF,0xFF,0xF7,0xFE,0x7F,0xFF,0xFF,0xFF,
      0xFF,0xFF,0xF3,0xFF,0x7F,0xFF,0xEF,0xFF,
      0xEF,0xFF,0xF7,0xFF,0x9F,0xFF,0xFF,0xFF,
      0xFF,0xFF,0xE7,0xFF,0x7F,0xFF,0xCF,0xFF,
      0xEF,0xFF,0xEF,0xFF,0xE7,0xFF,0xFF,0xFF,
      0xFF,0xFF,0xDF,0xFF,0x7F,0xFF,0xDF,0xFF,
      0xEF,0xFF,0xEF,0xFF,0xF9,0xFF,0xFF,0xFF,
      0xFF,0xFF,0xBF,0xFF,0x7F,0xFF,0xBF,0xFF,
      0xF7,0xFF,0xEF,0xFF,0xFE,0x7F,0xFF,0xFF,
      0xFF,0xFF,0x7F,0xFE,0xFF,0xFF,0x3F,0xFF,
      0xF7,0xFF,0xEF,0xFF,0xFF,0x9F,0xFF,0xFF,
      0xFF,0xFE,0xFF,0xFE,0xFF,0xFF,0x7F,0xFF,
      0xF7,0xFF,0xDF,0xFF,0xFF,0xE7,0xFF,0xFF,
      0xFF,0xF9,0xFF,0xFE,0xFF,0xFE,0xFF,0xFF,
      0xF7,0xFF,0xDF,0xFF,0xFF,0xF9,0xFF,0xFF,
      0xFF,0xF3,0xFF,0xFE,0xFF,0xFC,0xFF,0xFF,
      0xFB,0xFF,0xDF,0xFF,0xFF,0xFE,0x7F,0xFF,
      0xFF,0xE7,0xFF,0xFE,0xFF,0xFD,0xFF,0xFF,
      0xFB,0xFF,0xDF,0xFF,0xFF,0xFF,0x9F,0xFF,
      0xFF,0xCF,0xFF,0xFE,0xFF,0xFB,0xFF,0xFF,
      0xFB,0xFF,0x9F,0xE0,0x00,0x00,0x03,0xFF,
      0xFF,0xBF,0xFF,0xFE,0xE0,0x00,0x00,0x00,
      0x00,0x00,0x00,0x1F,0xFF,0xFF,0xC1,0xFF,
      0xF8,0x00,0x00,0x00,0x1F,0xF7,0xFF,0xFF,
      0xFD,0xFF,0xBF,0xFF,0xFF,0xFF,0x1C,0xFF,
      0xFF,0xFF,0xFF,0xFE,0xFF,0xEF,0xFF,0xFF,
      0xFD,0xFF,0xBF,0xFF,0xFF,0xFC,0xFF,0xFF,
      0xFF,0xBF,0xFF,0xFE,0xFF,0xCF,0xFF,0xFF,
      0xFD,0xFF,0xBF,0xFF,0xFF,0xF3,0xFF,0xFF,
      0xFF,0xDF,0xFF,0xFE,0xFF,0xDF,0xFF,0xFF,
      0xFE,0xFF,0x7F,0xFF,0xFF,0xCF,0xFF,0xFF,
      0xFF,0xEF,0xFF,0xFE,0xFF,0xBF,0xFF,0xFF,
      0xFE,0xFF,0x7F,0xFF,0xFF,0x3F,0xFF,0xFF,
      0xFF,0xF7,0xFF,0xFD,0xFF,0x3F,0xFF,0xFF,
      0xFE,0xFF,0x7F,0xFF,0xFC,0xFF,0xFF,0xFF,
      0xFF,0xFB,0xFF,0xFD,0xFF,0x7F,0xFF,0xFF,
      0xFF,0x7F,0x7F,0xFF,0xF3,0xFF,0xFF,0xFF,
      0xFF,0xFD,0xFF,0xFD,0xFE,0xFF,0xFF,0xFF,
      0xFF,0x7E,0xFF,0xFF,0xCF,0xFF,0xFF,0xFF,
      0xFF,0xFE,0xFF,0xFD,0xFC,0xFF,0xFF,0xFF,
      0xFF,0x7E,0xFF,0xFF,0x3F,0xFF,0xFF,0xFF,
      0xFF,0xFE,0x7F,0xFD,0xFD,0xFF,0xFF,0xFF,
      0xFF,0x7E,0xFF,0xF8,0xFF,0xFF,0xFF,0xFF,
      0xFF,0xFF,0x3F,0xFD,0xFB,0xFF,0xFF,0xFF,
      0xFF,0xBE,0xFF,0xE3,0xFF,0xFF,0xFF,0xFF,
      0xFF,0xFF,0x9F,0xFD,0xF7,0xFF,0xFF,0xFF,
      0xFF,0xBD,0xFF,0x9F,0xFF,0xFF,0xFF,0xFF,
      0xFF,0xFF,0xCF,0xFD,0xF7,0xFF,0xFF,0xFF,
      0xFF,0xBD,0xFE,0x7F,0xFF,0xFF,0xFF,0xFF,
      0xFF,0xFF,0xE7,0xFD,0xEF,0xFF,0xFF,0xFF,
      0xFF,0xDD,0xF9,0xFF,0xFF,0xFF,0xFF,0xFF,
      0xFF,0xFF,0xF3,0xFD,0xDF,0xFF,0xFF,0xFF,
      0xFF,0xDD,0xE7,0xFF,0xFF,0xFF,0xFF,0xFF,
      0xFF,0xFF,0xF9,0xFD,0xDF,0xFF,0xFF,0xFF,
      0xFF,0xDB,0x9F,0xFF,0xFF,0xFF,0xFF,0xFF,
      0xFF,0xFF,0xFC,0xFD,0xBF,0xFF,0xFF,0xFF,
      0xFF,0x80,0x7F,0xFF,0xFF,0xFF,0xFF,0xFF,
      0xFF,0xFF,0xFE,0x7B,0x7F,0xFF,0xFF,0x80,
      0x00,0x69,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
      0xFF,0xFF,0xFF,0x3B,0x7F,0xC0,0x00,0x3F,
      0xFF,0xE3,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
      0xFF,0xFF,0xFF,0xBA,0x80,0x3F,0xFF,0xFF,
      0xFF,0x03,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
      0xFF,0xFF,0xFF,0xD9,0xFF,0xFF,0xFF,0xFF,
      0xFE,0x77,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
      0xFF,0xFF,0xFF,0xE9,0xFF,0xFF,0xFF,0xFF,
      0xFF,0xF7,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
      0xFF,0xFF,0xFF,0xF3,0xFF,0xFF,0xFF,0xFF,
      0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
      0xFF,0xFF,0xFF,0xFB,0xFF,0xFF,0xFF,0xFF,
      0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
      0xFF,0xFF,0xFF,0xFD,0xFF,0xFF,0xFF,0xFF,
      0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
      0xFF,0xFF,0xFF,0xFE,0xFF,0xFF,0xFF,0xFF,
      0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
      0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
      0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
      0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
      0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
      0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
      0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
      0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
      0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
      0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
      0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
      0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
      0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF
};
void setup()
{
LCDA.Initialise(); // 屏幕初始化
delay(100);
}
void loop()
{
LCDA.DrawFullScreen(logo0);
delay(5000);
}

并行顯示

#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,0xF7,
0xC8, 0xCB};                    //哈爾濱奧松機器人
unsigned char show1[]="m.lifestyle201.com";
 
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));;//第三行第二格開始,顯示網(wǎng)址dfrobot.com/
delay(5000);
}

程序效果

以上三個測試例程,分別通過串行和并行通信方式進行顯示,文字顯示:“奧松機器人,m.lifestyle201.com”,圖片顯示為位圖,通過下載解碼和取模軟件可以輕松編程。

視頻演示

12864 ye jing.png
Iic1602 01.png


產(chǎn)品相關推薦

Erweima.png

購買地址

LCD12864點陣液晶擴展板

周邊產(chǎn)品推薦

Raspberry Pi 樹莓派 2代 B+ 7寸液晶屏 LCD電容觸摸 高清顯示器
Raspberry Pi 直插 3.5寸液晶屏 樹莓派2代 B+ 高清 可觸摸液晶屏

相關問題解答

Arduino驅(qū)動控制12864液晶屏
12864液晶顯示程序編譯錯誤

相關學習資料

[http://www.makerspace.cn/forum.ph