/*************************************************************************
标题:lcd.h
说明:LCD的驱动程序
作者:荆轩道
时间:2012年12月13
*************************************************************************/
#include <at89x52.h>
#include <string.h>
#define LCM_RW P2_1 //定义引脚
#define LCM_RS P2_2
#define LCM_E P2_0
#define LCM_Data P0
#define Busy 0x80 //用于检测LCM状态字中的Busy标识
void Delay_5Ms(void)//5ms延时
{
unsigned int TempCyc = 5552;
while(TempCyc--);
}
void Delay_400Ms(void)//400ms延时
{
unsigned char TempCycA = 5;
unsigned int TempCycB;
while(TempCycA--)
{
TempCycB=7269;
while(TempCycB--);
};
}
/*===================