?? 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 //空閑,等待狀態(tài)
//void lcd_check_busy(void);
//12864m內(nèi)部寄存器地址///////////////////////////////////
//基本指令集
#define lcd_clear_display 0x1 //清除顯示
#define lcd_address_to_zero 0x2 //位址歸位1
#define lcd_address_to_zero2 0x4 //位址歸位2
#define lcd_display_state 0x8 //顯示狀態(tài)
#define lcd_display_shift_control 0x10 //游標(biāo)或顯示移位控制
#define lcd_funtion_base 0x30 //設(shè)置基本指令集
#define lcd_funtion_additional 0x34 //設(shè)定擴展指令集
#define lcd_set_cgram_address 0x40 //設(shè)定CGRAM位址
#define lcd_set_ddram_address 0x80 //設(shè)定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 //睡眠模式關(guān)
#define lcd_funtion_base 0x30 //設(shè)置基本指令集
#define lcd_funtion_additional 0x34 //設(shè)定擴展指令集
#define lcd_set_move_address 0x40 //設(shè)定IRAM位址或卷動位址
#define lcd_gdram_address 0x80 //設(shè)定繪圖RAM位址
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -