/**************************************************************
* GLCD.h is the header file for the Graphics library for the
* KS0108 with c18.
* Pin configurations for the LCD connector may be changed here
**************************************************************/
//#include <p18f46k20.h>
//#include "convert.h"
//#include <EEP.h>

#define GLCD_Data	 PORTD
#define b_GLCD_GCS1  LATBbits.LATB3
#define b_GLCD_GCS2  LATBbits.LATB4
#define b_GLCD_RS    LATBbits.LATB0
#define b_GLCD_RW    LATBbits.LATB1
#define b_GLCD_E     LATBbits.LATB2
#define b_GLCD_On    LATBbits.LATB5
#define b_GLCD_BL    LATCbits.LATC2


#define TRIS_Data    TRISD
#define b_TRIS_GCS1  TRISBbits.TRISB3 //GCS1
#define b_TRIS_GCS2  TRISBbits.TRISB4 //GCS2 
#define b_TRIS_RS    TRISBbits.TRISB0 //RS(Data/Instruction) 
#define b_TRIS_RW    TRISBbits.TRISB1 //R/W 
#define b_TRIS_E     TRISBbits.TRISB2 //E 
#define b_TRIS_On    TRISBbits.TRISB5 //Reset(RST)
#define b_TRIS_BL    TRISCbits.TRISC2 //backlight
	
//void ClearDisplay (void);
void Delay(void);
unsigned char GLCD_Read(void);
void Wait_Not_Busy(void);
void GLCD_Write_Cmd(unsigned char data);
void GLCD_Write_Data (unsigned char data);
void ClearRight(void);
void ClearLeft(void);
void ClearScreen(void);
void Init_GLCD(void);
void GLCD_Off(void);
void PutChar(unsigned char data);
unsigned char GLCD_Read_Data(void);
void SetPos(unsigned char x,unsigned char y);
void WritePosition(void);
void PutMessage(char *Message);
//void loadimg(rom char *image,unsigned int len);
//void write_num(unsigned long data);
void write_num(float data,char size,char floating);
//void PutMessage32x20 (static rom char *Message);
void plot(unsigned char x,unsigned char y);
void hline(unsigned char x,unsigned char y1,unsigned char y2);
void vline(unsigned char x1,unsigned char x2,unsigned char y);
void box(unsigned char x1,unsigned char y1,unsigned char x2,unsigned char y2);
void PutChar32x20 (unsigned char data);


