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

📄 splc501c.h

📁 测试STN LCM产品
💻 H
字号:
// --------------------- Header file for splc501c.c ----------------------------

#ifndef	__SPLC501C__
#define	__SPLC501C__

// -------------------------- Constants definition -----------------------------
#define LCD_ON	0xAF	// Display Enable
#define LCD_OFF	0xAE	// Display Disable

#define LCD_L0	0x40	// The address of line 0
#define LCD_P0	0xB0	// The address of page 0

#define LCD_CMAX 	132	// Maximal Column of LCD
#define LCD_PMAX	9	// Maximal Page of LCD
#define LCD_LMAX	64	// Maximal Line of LCD

#define LCD_DATN	0xA6	// Normal Display 'H'on
#define LCD_DATR	0xA7	// Reverse Display 'L'on

#define LCD_ADC		0xA0	// Normal Segment Dir
//#define LCD_ADC	0xA1	// Reverse Segment Dir
#define LCD_SHL		0xC0	// Normal Common Dir
//#define LCD_SHL	0xC8	// Reverse Common Dir

#define LCD_ALLON	0xA5	// All Pixels on
#define LCD_BACK	0xA4	// Turn back to normal display

#define IC_RST		0xE2	// LCD Software Reset

//#define LCD_ICOMAX	22		// Maximal Icons of LCD
#ifdef LCD_ICOMAX
	uint8 code ICONS[LCD_ICOMAX] = 
	{
		// Collumn Address of Icons
		0,3,14,22,35,47,56,93,
		102,105,110,111,112,113,117,119,
		120,122,123,125,130,131
	};
#endif
// -----------------------------------------------------------------------------

// --------------------------- Functions Declaration ---------------------------
// Set column address
void SetCA(uint8 CAddr);
// Set page address
void SetPA(uint8 PAddr);
// Goto xPage and yColumn
void Gotoxy(uint8 PAddr, CAddr);
// Set LCD Contrast
void SetContrast(uint8 CValue);
#ifdef LCD_ICOMAX
	// Set LCD specific Icon ON/OFF
	void SetIcon(uint8 State, uint8 index);
	// Turn On/Off all icons
	void Allicons(bit State);
	// Display Icons and then hide them
	void ICON_Test(void);
#endif
// Fill Page X with 2 datas
void FillPage(uint8 PAddr, uint8 fst, snd);
// Tile the LCD screen with two datas
void Tile(uint8 fst, uint8 snd);
// Clear the LCD Screen
void LCD_CLS(void);
// Wait some time and Clear the screen
void wait_and_clear(void);
// Initialize LCD
void LCD_Initial(void);
// -----------------------------------------------------------------------------

#include "splc501c.c"
#endif

⌨️ 快捷键说明

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