16x2字符液晶屏驱动总线方式

16x2字符液晶屏驱动总线方式

KS0070(44780) 16x2 字符液晶屏驱动总线方式

=============================================================================

连接线图: LCM-------51 LCM-------51 LCM--------51

DB0-----P0.0 DB4-----P0.4 RC-------P2.0

DB1-----P0.1 DB5-----P0.5 RW-------P2.1

DB2-----P0.2 DB6-----P0.6 E--------P2.7 =>74ls00+wr+rd

DB3-----P0.3 DB7-----P0.7 VLCD接1K2电阻到GND

[注]:AT89C51的晶振频率为12MHz

============================================================================*/

//========= 变量类型标识的宏定义,大家都喜欢这么做 ==============

#define Uchar unsigned char

#define Uint unsigned int

// ================= LCM1602A端口地址定义 ======================= char xdata Lcd1602CmdPort _at_ 0xfcff; //E=1 RS=0 RW=0

char xdata Lcd1602WdataPort _at_ 0xfdff; //E =1 RS=1 RW=0

char xdata Lcd1602StatusPort _at_ 0xfeff; //E=1 RS=0 RW=1

#define Busy 0x80 // 忙判别位

#define TAB_ADDR1 0x00

#define TAB_ADDR2 0x0a00

#define TAB_ADDR3 0x0100

#define BAK_ADDR 0x0700

#define TAB_CONF 0x10

#define CON_ADDR 0x29

#define FORCE_ADDR 0x30

void Delay400Ms(void);

void Delay5Ms(void);

void LcdWriteData( char dataW );

void LcdWriteCommand( Uchar CMD,Uchar AttribC );

void LcdReset( void );

void Test( Uchar dd );

void Display(void);

void DispOneChar(Uchar x,Uchar y,Uchar Wdata);

void ePutstr(Uchar x,Uchar y, Uchar *ptr);

void DispTime(void);

你可能喜欢

  • 液晶显示器
  • LCD1602程序
  • LCD驱动原理
  • TFT-LCD显示原理
  • LCD1602中文资料
  • 液晶驱动原理

16x2字符液晶屏驱动总线方式相关文档

最新文档

返回顶部