initlcd.h

来自「Keil C51完整的128X64LCD显示的电子打铃仪代码,内含DS1302X」· C头文件 代码 · 共 60 行

H
60
字号
/*********************************************************************
 *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 + =
减小字号Ctrl + -
显示快捷键?