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

📄 lcd1621.h

📁 这个是一款LCD驱动芯片的源程序
💻 H
字号:
//--------------------------------------------//
#include	"main.h"

//--------------------------------------------//
/*
#define	bitCS	PB5
#define	portCS	PORTB
#define	ddrCS	DDRB
#define	pinCS	PINB

#define	bitWR	PB3
#define	portWR	PORTB
#define	ddrWR	DDRB
#define	pinWR	PINB

#define	bitDATA		PB2
#define	portDATA	PORTB
#define	ddrDATA		DDRB
#define	pinDATA		PINB

#define	bitBL	PD7
#define	portBL	PORTD
#define	ddrBL	DDRD
*/

//for sch_v7.2
#define	bitCS	PB0
#define	portCS	PORTB
#define	ddrCS	DDRB
#define	pinCS	PINB

#define	bitWR	PB3
#define	portWR	PORTB
#define	ddrWR	DDRB
#define	pinWR	PINB

#define	bitDATA		PB4
#define	portDATA	PORTB
#define	ddrDATA		DDRB
#define	pinDATA		PINB

#define	bitBL	PD3
#define	portBL	PORTD
#define	ddrBL	DDRD

//--------------------------------------------//
#define LCD_BAR		0x00	//ram0,bit0

#define	LCD_FM		0x10
#define	LCD_AM		0x23
#define	LCD_IPOD 	0x41
#define	LCD_AUX		0x40

#define	LCD_POS1	0x47
#define	LCD_POS2	0x34

#define	LCD_NEG		0x31

#define	LCD_BASS 	0x35
#define	LCD_VOL		0x43
#define	LCD_TREB 	0x63

#define	LCD_KHZ		0x73
#define	LCD_MHZ		0x86

#define	LCD_COL		0x42
#define	LCD_DOT		0x53

#define	LCD_T1		0x77
#define	LCD_T2		0x72
#define LCD_T3		0x71
#define LCD_T4		0x70
#define	LCD_T5		0x76

#define LCD_SLP		0x87
#define	LCD_PLUG 	0x75

#define	LCD_B1		0x74
#define LCD_B2		0x80
#define LCD_B3		0x81
#define LCD_B4		0x82
#define	LCD_B5		0x83

//--------------------------------------------//
#define	setCS	(portCS |= (1<<bitCS))
#define	clrCS	(portCS &= ~(1<<bitCS))

#define	setWR	(portWR |= (1<<bitWR))
#define	clrWR	(portWR &= ~(1<<bitWR))

#define	setDATA	(portDATA |= (1<<bitDATA))
#define	clrDATA	(portDATA &= ~(1<<bitDATA))

//--------------------------------------------//
extern	uchar	lcd1621Ram[9];
extern	uchar	lcd1621_redraw_count;
//--------------------------------------------//
extern void	lcd1621_ini(void);
extern void	lcd1621_cfg(void);
extern void	lcd1621_sleep(void);
extern void	lcd1621_tx_cmd(uchar command);
extern void	lcd1621_tx_ram(uchar ramadd, uchar length);
extern void	lcd1621_ram_logo_set(uchar logo);
extern void	lcd1621_redraw(void);
extern void lcd1621_disp_off(void);

⌨️ 快捷键说明

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