lcdconf_8811_m1_m128x80.h

来自「uCGUI」· C头文件 代码 · 共 56 行

H
56
字号
/*************************************************************************************************************
                                                   uC/GUI
                                               嵌入式通用图形软件
文    件: LCDConf_8811_M1_LDB4_M128x80.h
描    述: Sample configuration file
*************************************************************************************************************/
#ifndef LCDCONF_H
#define LCDCONF_H

/*************************************************************************************************************
                   General configuration of LCD
*************************************************************************************************************/
#define LCD_CONTROLLER   8811
#define LCD_XSIZE        (128)   /* X-resolution of LCD, Logical coor. */
#define LCD_YSIZE        (80)   /* Y-resolution of LCD, Logical coor. */
#define LCD_BITSPERPIXEL (1)

/*************************************************************************************************************
                   Simple bus configuration
*************************************************************************************************************/
#ifndef WIN32
  void LCD_X_Write00(char c);
  void LCD_X_Write01(char c);
  char LCD_X_Read00(void);
  char LCD_X_Read01(void);
  #define LCD_WRITE_A1(Byte) LCD_X_Write01(Byte)
  #define LCD_WRITE_A0(Byte) LCD_X_Write00(Byte)
  #define LCD_READ_A1(Byte)  Byte = LCD_X_Read01()
  #define LCD_READ_A0(Byte)  Byte = LCD_X_Read00()
  void LCD_X_Init(void);
  #define LCD_X_INIT() LCD_X_Init()
#endif

/*************************************************************************************************************
                   Initialisation macro
*************************************************************************************************************/
#define LCD_INIT_CONTROLLER() \
  LCD_X_INIT(); \
  LCD_WRITE_A0(0xE2); /* Software Reset */ \
  LCD_WRITE_A0(0xAB); /* Internal Oscillator ON */ \
  LCD_WRITE_A0(0xE1); /* power save mode off */ \
  LCD_WRITE_A0(0x62); /* 4x multiplier */ \
  LCD_WRITE_A0(0x81); /* VOP first byte */ \
  LCD_WRITE_A0(0xD3); /* VOP 2nd byte */ \
  LCD_WRITE_A0(0x2B); /* Internal Charge Pump ON */ \
  LCD_WRITE_A0(0xAF); /* Display ON */ \
  LCD_WRITE_A0(0x1E); /* Frame Rate Frequency 50Hz */ \
  LCD_WRITE_A0(0xA1); /* X mirroring ON */ \
  LCD_WRITE_A0(0x40); /* set first diplay line */ \
  LCD_WRITE_A0(0x00); /* set initial display line */ \
  LCD_WRITE_A0(0x1A); /* p=automatically set */ \
  LCD_WRITE_A0(0xAF); /* Display ON */ \

#endif /* LCDCONF_H */

⌨️ 快捷键说明

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