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

📄 lcd_pg320240.h

📁 how to use display powertip PG 320x240
💻 H
字号:
/***********************************************************************
 *                                                                     *
 *      Project Name:   Demo board for graphic LCD PG320240            *
 *      Description:    Driving of the LCD PG320240  ith SED1335 driver*
 *      File name:      LCD_pg320240.h                                 *
 *      Processor:      uPD78F9177                                     *
 *      Revision:       1.0                                            *
 *      Date:           24.09.2003                                     *
                           *
 *                                                                     *
 ***********************************************************************/
#ifndef _GRAY_LCD
	#define _GRAY_LCD
#include "ports.h" 
#define DATA 	P3
#define READ 	P2_14
#define WRITE 	P2_12
#define ABH 	P2_13
#define ABL 	P2_15
#define RESET 	P2_11
#define WAIT 	P2_10
#define BCLK 	P2_6
#define AB16	P2_8
#define CS		P2_9

#define SETDATAINPUT DP3 &= 0xFF00
#define SETDATAOUTPUT DP3 |= 0x00FF
/* Useful definitions, constants and macros to make the sample code easier to follow.*/
#define MEM_OFFSET 0x0		 			// Location is platform dependent
#define REG_OFFSET MEM_OFFSET + 0xFFE0	// Memory offset + 64K - 0x20
#define MEM_SIZE 0xA000 				// 40 kb display buffer.
 
 //#define SET_REG(idx, val) (*(LPBYTE)(REG_OFFSET + idx)) = (val)   
void lcd_init(void);
void lcd_set_reg (unsigned int Address, unsigned char Data);
void lcd_write (unsigned int Addr, unsigned char Dat);
unsigned char lcd_read_reg(unsigned int Address,unsigned char Reg);
void lcd_clear(void);
#endif

⌨️ 快捷键说明

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