?? hy12864.h
字號(hào):
// 命令類型
#define SC_CMD_ENABLE_DISPLAY 0
#define SC_CMD_SET_START_ROW 1
#define SC_CMD_SET_PAGE 2
#define SC_CMD_SET_YADDR 3
#define SC_CMD_GET_STATUS 4
#define SC_CMD_SET_DATA 5
#define SC_CMD_GET_DATA 6
// 寫入的數(shù)據(jù)有些字段是固定為某些值,將用戶數(shù)據(jù)和
// 以下的相應(yīng)數(shù)據(jù)相或,得到需要寫入的數(shù)據(jù)
#define SC_VEIL_ENABLE_DISPLAY 0x3E
#define SC_VEIL_SET_START_ROW 0xC0
#define SC_VEIL_SET_PAGE 0xB8
#define SC_VEIL_SET_YADDR 0x40
#define SC_VEIL_GET_STATUSE 0x00
#define SC_VEIL_SET_DATA 0x00
#define SC_VEIL_GET_DATA 0x00
// 各種命令有不同的WR和RS,和硬件設(shè)計(jì)相關(guān)就對(duì)應(yīng)不
// 同的地址
// RS = Addr0;
// RW = Addr1
// E = EDPL = CPU的R和W線的與非。
// CS1 = CS1DPL when P2 = 1001xxxx CS1為0
// CS2 = CS2DPLwhenP2 = 1010xxxxCS2為0
#define SC_ADDR_ENABLE_DISPLAY 0x00 //R/W RS:00
#define SC_ADDR_SET_START_ROW 0x00 //00
#define SC_ADDR_SET_PAGE 0x00 //00
#define SC_ADDR_SET_YADDR 0x00 //00
#define SC_ADDR_GET_STATUSE 0x02 //10
#define SC_ADDR_SET_DATA 0x01 //01
#define SC_ADDR_GET_DATA 0x03 //11
#define SC_LEFT_ADDR 0xA000 //左半?yún)^(qū)片選
#define SC_RIGHT_ADDR 0x9000 //右半?yún)^(qū)片選
// 狀態(tài)字BUSY 0 ON/OFF REST 0 0 0 0
#define SC_STATUS_BUSY 0x80
#define SC_STATUS_ON 0x20
#define SC_STATUS_REST 0x10
//屏幕區(qū)大小參數(shù)
#define SC_MAX_PAGE 8 //一個(gè)頁縱向可排8個(gè)象素
#define SC_MAX_YADDR 64 //一個(gè)液晶半?yún)^(qū)橫向可排64個(gè)象素
#define SC_LEFT 1 //左半?yún)^(qū)
#define SC_RIGHT 2 //右半?yún)^(qū)
//屏幕背光
#define SC_BK_LIGHT_PIN 0x92 //p1.2
#define SC_BK_LIGHT_ENABLE 1
#define SC_BK_LIGHT_DISABLE 0
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -