📄 th.txt
字号:
#ifndef __LCD_12864_H_
#define __LCD_12864_H_
#include "system.h"
#include "DELAY.h"
/***********************************************************/
/*DELAY set to delay time for LCD finishing its operation,*/
/*When CPU Frequancy is 50MHZ, DELAY set as 2000*/
/*When CPU Frequancy is other value, DELAY set as other value*/
/*For example,when CPU Frequancy is 100MHZ, DELAY set as 4000*/
/*************************************************************/
#define LCD_DATA *(unsigned int *)LCD_DATA_BASE
#define LCD_DATA_DIR *(unsigned int *)(LCD_DATA_BASE+4)
#define LCD_RW *(unsigned int *)LCD_RW_BASE
#define LCD_RS *(unsigned int *)LCD_RS_BASE
#define LCD_EN *(unsigned int *)LCD_EN_BASE
#define LCD_DATA_IN 0x0 //读,输入
#define LCD_DATA_OUT 0xFF //写,输出
//#define busy 1 //忙
//#define not_busy 0 //空闲,等待状态
//void lcd_check_busy(void);
//12864m内部寄存器地址///////////////////////////////////
//基本指令集
#define lcd_clear_display 0x1 //清除显示
#define lcd_address_to_zero 0x2 //位址归位1
#define lcd_address_to_zero2 0x4 //位址归位2
#define lcd_display_state 0x8 //显示状态
#define lcd_display_shift_control 0x10 //游标或显示移位控制
#define lcd_funtion_base 0x30 //设置基本指令集
#define lcd_funtion_additional 0x34 //设定扩展指令集
#define lcd_set_cgram_address 0x40 //设定CGRAM位址
#define lcd_set_ddram_address 0x80 //设定DDRAM位址
//扩展指令集
#define lcd_standby_mode 0x1 //待命模式
#define lcd_move_select 0x2 //卷动位址或IRAM位址选择
#define lcd_reverse_video_select 0x4 //反白选择
#define lcd_sleepmode_enable 0x8 //睡眠模式开
#define lcd_sleepmode_disable 0xc //睡眠模式关
#define lcd_funtion_base 0x30 //设置基本指令集
#define lcd_funtion_additional 0x34 //设定扩展指令集
#define lcd_set_move_address 0x40 //设定IRAM位址或卷动位址
#define lcd_gdram_address 0x80 //设定绘图RAM位址
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -