?? lcd.h
字號:
#ifndef _LCD_H_
#define _LCD_H_
// 函數功能:數據口輸入輸出控制
void InitLCDData(bit i);
// 函數功能:指令/數據選擇
// i=1,數據;i=0,指令
void SetLCD_RS(bit);
// 函數功能:讀寫控制
// i=1,讀; i=0,寫
void SetLCD_RW(bit i);
// 函數功能:使能信號
// i=1,使能; i=0,無效
void SetLCD_EN(bit i);
// 函數功能:復位
// i=1,不復位; i=0,復位
void SetLCD_RST(bit i);
// 函數功能:讀狀態
INT8U ReadStatus(void);
// 函數功能:讀一字節數據
INT8U ReadOneByte(void);
// 函數功能:寫指令
void WriteInstruc(INT8U Instruction);
// 函數功能:寫一字節數據
void WriteOneByte(INT8U Data);
// 函數功能:復位LCD
void ResetLCD(void);
// 函數功能:清除顯示
#define ClearLCD() WriteInstruc(0x01)
// 函數功能:地址歸位
#define DispReturn() WriteInstruc(0x02)
// 函數功能:顯示狀態開/關
#define Disp_OnOff(temp) WriteInstruc(temp)
// 函數功能:進入點設置
#define PointSet(temp) WriteInstruc(temp)
// 函數功能:游標或顯示移位
#define Disp_Shift(temp) WriteInstruc(temp)
// 函數功能:功能設定
#define FunctionSet(temp) WriteInstruc(temp)
// 函數功能:設定CGRAM地址
#define SetCGRAM_Add(Address) WriteInstruc(0x40 | Address)
// 函數功能:設定DDRAM地址
#define SetDDRAM_Add(Address) WriteInstruc(0x80 | Address)
// 函數功能:進入待命模式
#define WaitMode() WriteInstruc(0x01)
// 函數功能:卷動地址開關開啟
#define MoveOn(temp) WriteInstruc(temp)
// 函數功能:反白選擇
#define TurnSelect(temp) WriteInstruc((0x04 | temp) & 0x07)
// 函數功能:睡眠模式
#define SleepMode(temp) WriteInstruc(temp)
// 函數功能:擴充功能設定
#define ExternFuncSet(temp) WriteInstruc(temp)
// 函數功能:設定繪圖RAM地址
#define SetFigRAM(Address) WriteInstruc(0x80 | Address)
// 函數功能:初始化LCD
void InitLCD(void);
// 函數功能:顯示一個漢字
// 漢字(16x16): X--行(0 ~ 3); Y--列(0 ~ 7); Word--顯示漢字數據
void DispOneWord(INT8U X,INT8U Y,INT16U Word);
// 函數功能:顯示兩個字符
// 字符(8x16): X--行(0 ~ 3); Y--列(0 ~ 7); Character--顯示字符數據
void DispTwoCharacter(INT8U X,INT8U Y,INT8U Character1,INT8U Character2);
#endif //_LCD_H_
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -