⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 lcd.h

📁 ATmegal128连接128*16的LCD模块的驱动程序
💻 H
字号:
#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 + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -