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

📄 lcd.h

📁 这是mega128控制320*240液晶控制器sed1335的程序
💻 H
字号:
//******************************************************************************
//******************************************************************************
//******************************************************************************
#define bitset(var,bitno) ((var)|=1<<(bitno))							//**置位
#define bitclr(var,bitno) ((var)&=~(1<<(bitno)))						//**清位
#define byteset(var)	  (var=0xff)									//字节置位		
#define byteclr(var)	  (var=0x00)									//字节清零
//******************************************************************************
//*******************************lcd handlers**********************************/
//******************************************************************************

#define	DB			0x28		//相对于320 X 240,320/8=40=28H
#define SystemSet 	0x40 //		
#define Scroll 		0x44 //		
#define DispOn 		0x59 //		
#define DispOff 	0x58 		
#define Ovlay 		0x5b //		
#define HdotScr 	0x5a //		
#define CsrForm 	0x5d 		
#define CgramAdr 	0x5c 		
#define CsrDirR 	0x4c //		
#define CsrDirL 	0x4d 		
#define CsrDirU 	0x4e 		
#define CsrDirD 	0x4f 		
#define CsrW 		0x46 		
#define CsrR 		0x47 		
#define mWrite 		0x42 		
#define mRead 		0x43
#define BasePart1	9600
/*	
#define BasePart1 	0x00 
#define BasePart2 	0x40 
#define BasePart3 	0x80 
#define BasePart4 	0x00 
*/

unsigned int  position,position_x,position_y,tp_xcon,tp_ycon,position_x0,position_y0,position_x1,position_y1;
unsigned int  tp_xcon_t,tp_ycon_t,position_x0_t,position_y0_t,position_x1_t,position_y1_t;
unsigned int  tp_x0,tp_y0;


void sed1335_write_command(unsigned char commandcode);
void sed1335_write_data(unsigned char data);
unsigned char asc_lcd(unsigned char ch);
void Cur_Set(unsigned int Ox,unsigned int Oy, unsigned char attribs);
void Lcd_Init(void);
void Lcd_Clear(void);
void Lcd_Rect(unsigned int Ox,unsigned int Oy,unsigned int Rect_Long,unsigned int Rect_High,unsigned char sign);
void Lcd_Char(unsigned int Ox,unsigned int Oy,unsigned char Count,unsigned char *buf);
void Lcd_Graph(unsigned int Ox,unsigned int Oy,unsigned int Cnumber,unsigned char width,unsigned char high,unsigned char sign);









⌨️ 快捷键说明

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