sbit GLCD_D0 at RB7_bit;
sbit GLCD_D1 at RB8_bit;
sbit GLCD_D2 at RB9_bit;
sbit GLCD_D3 at RB10_bit;
sbit GLCD_D4 at RB12_bit;
sbit GLCD_D5 at RB13_bit;
sbit GLCD_D6 at RB14_bit;
sbit GLCD_D7 at RB15_bit;
sbit GLCD_D0_Direction at TRISB7_bit;
sbit GLCD_D1_Direction at TRISB8_bit;
sbit GLCD_D2_Direction at TRISB9_bit;
sbit GLCD_D3_Direction at TRISB10_bit;
sbit GLCD_D4_Direction at TRISB12_bit;
sbit GLCD_D5_Direction at TRISB13_bit;
sbit GLCD_D6_Direction at TRISB14_bit;
sbit GLCD_D7_Direction at TRISB15_bit;
sbit GLCD_CS1 at RB5_bit;
sbit GLCD_CS2 at RB4_bit;
sbit GLCD_RS at RB3_bit;
sbit GLCD_RW at RB1_bit;
sbit GLCD_EN at RB6_bit;
sbit GLCD_RST at RB11_bit;
sbit GLCD_CS1_Direction at TRISB5_bit;
sbit GLCD_CS2_Direction at TRISB4_bit;
sbit GLCD_RS_Direction at TRISB3_bit;
sbit GLCD_RW_Direction at TRISB1_bit;
sbit GLCD_EN_Direction at TRISB6_bit;
sbit GLCD_RST_Direction at TRISB11_bit;
void Glcd_Write_Text(char *text, unsigned short x_pos, unsigned short page_num, unsigned short color);
void Glcd_Dot(unsigned short x_pos, unsigned short y_pos, unsigned short color);
void Glcd_Fill(unsigned short pattern);
void Glcd_Rectangle(unsigned short x_upper_left, unsigned short y_upper_left, unsigned short x_bottom_right, unsigned short y_bottom_right, unsigned short color)
void main() {
PORTA = 0x0000;
PORTB = 0x0000;
ANSELA = 1;
ANSELB = 0;
TRISA = 1;
TRISB = 0;
JTAGEN_bit = 0;
Glcd_Init();
Glcd_Fill(0x00); /
ADC1_Init();
do{
Glcd_Dot(30,30,1);
Delay_ms(1000);
Glcd_Rectangle(5, 5, 40, 40, 1);
Delay_ms(1000);
Glcd_Fill(0x00);
Delay_ms(1000);
}while(1);
}
;