include.h

来自「这个是我写的一个液晶显示器的驱动程序」· C头文件 代码 · 共 50 行

H
50
字号
#ifndef _INCLUDE_H
#define _INCLUDE_H

#include<absacc.h>
#include<string.h>
#include"ascii.h"
#include"Hanzi.h"
#include"SST89x5x4.H"

#define DISP_ON          0x3F     //Controls the ON/OFF of the display
#define DISP_OFF         0x3E     //Controls the ON/OFF of the display
#define Startline(x)     0xC0+x   //Indicates the display data RAM displayed at the top of the screen.
#define SetXadress(x)    0xB8+x   //Sets the page (X address) of RAM at the page (X address) register.
#define SetYadress(y)    0x40+y   //Sets the Y address at the Y address counter.


#define Left_Instruction   XBYTE[0xc000]  //左半屏操作地址
#define Left_Data          XBYTE[0xc400]  //左半屏数据输入地址

#define Right_Instruction  XBYTE[0xd000]  //右半屏操作地址
#define Right_Data         XBYTE[0xd400]  //右半屏数据输入地址


sbit LCD_Rest=P1^2 ;                      //LCD复位地址

#define uchar unsigned char

void delay(void);
void LCDRESET();
void Set_Init_L(uchar Control);
void Set_Init_R(uchar Control);
void WR_Data_L(uchar d);
void WR_Data_R(uchar d);

void Show_C_L(uchar x,uchar y,uchar *p);
void Show_C_R(uchar x,uchar y,uchar *p);
void Show_E_L(uchar x,uchar y,uchar *p);
void Show_E_R(uchar x,uchar y,uchar *p);

void ClearScreen_L(void);
void ClearScreen_R(void);

void PrintHanzi(uchar x,uchar y,uchar *p);
void PrintABC(uchar x,uchar y,uchar *pAdre);
void Lcd_Print(uchar x,uchar y,char *Str);
void Lcd_Init();

#endif

⌨️ 快捷键说明

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