//注意串口只用三个口 RS 要接在高电平上,RW E 为控制端
#include <iom128v.h>
#include <macros.h>
//************************
//sbit SID=P2^0;
//sbit SCLK=P2^1;
#define setSID PORTD |=BIT(0);
#define clrSID PORTD &=~BIT(0);
#define setSCLK PORTD |=BIT(1);
#define clrSCLK PORTD &=~BIT(1);
//sbit RSa=P2^4;//串行片选段,高电平即可;
//sbit PSB=P2^1;//并/串口选择;
//sbit RST=P2^3;//复位口;高电平;
//SID 为 RW 口,SCLK 为 E 口
//RS,RST 口接高电平,PSB 接低电平,A 为高电平,K 为低电平
#define uint unsigned int
#define uchar unsigned char
void Delay(uint tt)
{
//while(tt--) ;
uchar m;
uint n;
for(m=8;m>0;m--)
{
for(n=tt;n>0;n--);
}
}
/*void ClrScreen()
{
Lcd_WriteCmd(0x34); //扩充指令操作
Delay(15);
Lcd_WriteCmd(0x30); //基本指令操作
Delay(15);
Lcd_WriteCmd(0x01); //清屏
//Lcd_WriteCmd(0x01);
Delay(15);
}*/