st7565.h

来自「用于MSP430169驱动12864的液晶显示器」· C头文件 代码 · 共 87 行

H
87
字号
#ifndef __ST7565_H
#define __ST7565_H

//display controlling
#define SCRN_ON     0xAF
#define SCRN_OFF    0xAE
#define SCRN_NORMAL 0xA6
#define SCRN_REVERS 0xA7
#define SCR_DOT_ON  0xA5
#define SCR_DOT_OFF 0XA4

//line setting
#define SET_LINE    0x40

//page setting
#define SET_PAGE    0xB0

//column setting
#define SET_COLH    0x10
#define SET_COLL    0x00

//lcm status
#define BUSY_STAT   0x80
#define ADC_STAT    0x40
#define SCROFF_STAT 0x20
#define RST_STAT    0x10

//ADC selection
#define ADC_NORMAL  0xA0
#define ADC_REVERS  0xA1

//LCD Bias setting
#define BIAS_SET1   0xA2
#define BIAS_SET2   0xA3

//read/write/modify
#define INTO_RDWRMD 0xE0
#define END_RDWDMD  0xEE

//lcd reset
#define LCM_RST     0xE2

//COM selection
#define COM_NORMAL  0xC0
#define COM_REVERS  0xC8

//Power controlling
#define BOOST_REG   0x28
#define BOOST_ON    0x04
#define BOOST_OFF   ~BOOST_ON
#define VREG_ON     0x02
#define VREG_OFF    ~VREG_ON
#define VFOL_ON     0x01
#define VFOL_OFF    ~VFOL_ON

//V5 regulator
#define V5REG_SEL   0x20
//#define V5REG_SEL_XX 0x??

//Electronic Volumn
#define EVOL_MODE   0x81
#define EVOL_MIN    0x01
#define EVOL_MAX    0x3F
#define BRIGHTNESS  0x30

//Static indicate 
#define STATIC_ON   0xAD
#define STATIC_OFF  0xAC
#define BLINK_OFF   0x00
#define BLINK_10S   0x01
#define BLINK_05S   0x02
#define BLINK_CON   0x03

//Boost Rate
#define BOOST_SEL   0xF8
#define BOOST_234X  0x00
#define BOOST_5X    0x02
#define BOOST_6X    0x03

void InitLCMDPhy(void);
void WrLCMComd(unsigned char);
void WrLCMData(unsigned char);
unsigned char RdLCMStatus(void);
unsigned char RdLCMData(void);
void LCDMdelay(unsigned int);
#endif

⌨️ 快捷键说明

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