?? hy12864.h
字號:
// 命令類型
#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
// 寫入的數據有些字段是固定為某些值,將用戶數據和
// 以下的相應數據相或,得到需要寫入的數據
#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,和硬件設計相關就對應不
// 同的地址
// 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 //左半區片選
#define SC_RIGHT_ADDR 0x9000 //右半區片選
// 狀態字BUSY 0 ON/OFF REST 0 0 0 0
#define SC_STATUS_BUSY 0x80
#define SC_STATUS_ON 0x20
#define SC_STATUS_REST 0x10
//屏幕區大小參數
#define SC_MAX_PAGE 8 //一個頁縱向可排8個象素
#define SC_MAX_YADDR 64 //一個液晶半區橫向可排64個象素
#define SC_LEFT 1 //左半區
#define SC_RIGHT 2 //右半區
//屏幕背光
#define SC_BK_LIGHT_PIN 0x92 //p1.2
#define SC_BK_LIGHT_ENABLE 1
#define SC_BK_LIGHT_DISABLE 0
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -