lcd.h

来自「一个关于AVR单片机的例程」· C头文件 代码 · 共 23 行

H
23
字号
#ifndef  lcd_h
#define  lcd_h  1

/*************对12864的指令的定义************/
#define LCD_OFF  0x3E //表示LCD关显示
#define LCD_ON   0x3F //表示LCD开显示
#define LCD_X    0xC0 //表示LCD显示的起始行为0,可以通过加一定的数字改变起始行
#define LCD_PAGE 0xB8 //表示LCD显示的页,可以通过加一定的数字改变页数
#define LCD_Y    0x40 //表示LCD显示的列地址
extern unsigned char L_command;
extern unsigned char L_staus;
extern unsigned char L_data;
extern unsigned char R_command;
extern unsigned char R_staus;
extern unsigned char R_data;
#define L_command  (*(volatile unsigned char *) 0x2008)
#define L_staus    (*(volatile unsigned char *) 0x2009)
#define L_data     (*(volatile unsigned char *) 0x200a)
#define R_command  (*(volatile unsigned char *) 0x2004)
#define R_staus    (*(volatile unsigned char *) 0x2005)
#define R_data     (*(volatile unsigned char *) 0x2006)

#endif  

⌨️ 快捷键说明

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