#ifndef __lcd12864__H_
#define __lcd12864__H_


#include "regx52.h"
#include "lcd1602.h"




uchar code hysy[]="»¶Ó­Ê¹ÓÃ";
uchar code ntjy[]="ÄÏÍØ½ÌÒÇ";
uchar code atis51[]="ATI-51S";



void guangbiao( uchar x, uchar y )
{    
	uchar address;	
	switch(x){
	case 0: 
		address=0x80+y;break; 
	case 1: 
		address=0x90+y;break; 
	case 2: 
		address=0x88+y;break; 
	case 3: 
		address=0x98+y;break; 
	default: break;	  
	}    
	write_comdata(0,address);
	delayms(5);	
}

void write_hz(uchar x,uchar y, uchar code *hz)
{
	guangbiao(x,y);




	for(;*hz!='\0';hz++)
	write_comdata(1,*hz);
}



void lcd12864init()
{
	 write_comdata(0,0x30);
	 write_comdata(0,0x0c);
	 delayms(50);	  
	 write_comdata(0,0x01);
	 write_comdata(0,0x06);


}

void lcd12864test()
 {
		lcd12864init();
		write_hz(0,1,hysy);
		write_hz(1,1,ntjy);
		write_hz(3,1,atis51);
 }



#endif