lcd.h

来自「ATmegal128连接128*16的LCD模块的驱动程序」· C头文件 代码 · 共 49 行

H
49
字号
#define	NO_PAGES		8
#define	NO_COLUMNS		21
#define	COLUMNS_2		10					//	NO_COLUMNS / 2

#define LCD_OFF			0x3E
#define LCD_ON			0x3F
#define LCD_START		0xC0
#define LCD_END			0xFF
#define LCD_RESET		0xE2
#define LCD_PAGE		0xB8
#define LCD_PAGE0		0xB8
#define LCD_PAGE1		0xB9
#define LCD_PAGE2		0xBa
#define LCD_PAGE3		0xBb
#define LCD_PAGE4		0xBc
#define LCD_PAGE5		0xBd
#define LCD_PAGE6		0xBe
#define LCD_PAGE7		0xBf


#define	LCD_CS_NONE		0
#define	LCD_CS_1		1
#define	LCD_CS_2		2
#define	LCD_CS_12		3

#define	DISP_NORMAL		0
#define	DISP_REVERSE	1


#define LCD_DATA	    PORTC
#define bLCD_CS1	    PORTE_Bit4
#define bLCD_CS2	    PORTG_Bit0
#define bLCD_D_I	    PORTG_Bit2
#define bLCD_E          PORTG_Bit1
#define bLCD_R_W	    PORTD_Bit7

extern byte LcdCS;


extern void InitLcd(void);
extern void LcdClear(void);
extern void Puts(byte x, byte y, byte *msg, byte rev);
extern void Puts1(byte x, byte y, byte *msg);
extern void Puts1R(byte x, byte y, byte *msg);
extern void Putc_xy(byte x, byte y, byte ch);
extern void PutcR_xy(byte x, byte y, byte ch);
extern void LcdWriteData(byte data);
extern void LcdWriteCommand(byte command);

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?