⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 hy12864.h

📁 三星arm内核微处理器44b0的串口调试程序
💻 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 + -