📄 initlcd.h
字号:
/*********************************************************************
*Description: System Lcd initial function Prototypes,
Lcd operation I/O Pin Define
and Lcd Command Char
*File Name: LCD.h
*Use Compile Lanague: KEIL C51
*Version : V1.0
*Code Author: zhouhuanxi
*Date: 2005-01-14
CopyRight(C) 2005 -- SHENZHEN XINSANWEI Machine&Electronics CO.,LTD.
*********************************************************************/
//********************************************************************
//Define LCD Module Use Parameter
#ifndef _LCD_H
#define _LCD_H
//Define LCD Data_Port
#define LCD_DATA P0
//Define LCD Control Port
sbit LCD_DI = P2^0;
sbit LCD_RW = P2^1;
sbit LCD_E = P2^2;
sbit LCD_CS1 = P2^3;
sbit LCD_CS2 = P2^4;
sbit LCD_LED = P2^5;
//Define LCD Command Char
#define X_ADRESS 0xB8 // Adress base for Page 0
#define Y_ADRESS 0x40 // Adress base for Y0
#define START_LINE 0xC0 // Adress base for line 0
#define DISPLAY_ON 0x3F // Turn display on
#define DISPLAY_OFF 0x3E // Turn display off
//SET LCD Current Display RAM Address MACRO
#define SetRAMAddr(Page,Col) \
SingleCmd(X_ADRESS|Page); \
SingleCmd(Y_ADRESS|Col);
#endif
//**************************************************
//Deifine Export Function Prototypes
//**************************************************
//========FUNCTION Prototypes Declare Segment=======
//**************************************************
extern void InitLcd(void);
extern void SingleCmd(uint8 c);
extern void SingleData(uint8 col,uint8 c);
/************************************************************************************************************
***************************************** END OF FILE *******************************************************
************************************************************************************************************/
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -