afesheir
Member level 1
![Member level 1](/styles/images/ranks/dlevel1.gif)
does anybody have an idea about how to interfave GLCD with PIC16F877A ..?? it works fine on simulation but no way when it is downloaded on the chip !!!!!!!!!
this is my simple code:
by the way i am using mikroC .. also the glcd itself isn't damaged because it lights up upon being powered on ..
thanks in advance, gentle men ..
this is my simple code:
Code:
char GLCD_DataPort at PORTD;
sbit GLCD_CS1 at RB0_bit;
sbit GLCD_CS2 at RB1_bit;
sbit GLCD_RS at RB2_bit;
sbit GLCD_RW at RB3_bit;
sbit GLCD_EN at RB4_bit;
sbit GLCD_RST at RB5_bit;
sbit GLCD_CS1_Direction at TRISB0_bit;
sbit GLCD_CS2_Direction at TRISB1_bit;
sbit GLCD_RS_Direction at TRISB2_bit;
sbit GLCD_RW_Direction at TRISB3_bit;
sbit GLCD_EN_Direction at TRISB4_bit;
sbit GLCD_RST_Direction at TRISB5_bit;
// End Glcd module connections
void main() {
char *someText;
ADCON1 = 6; // Changes PORTA to digital
CMCON = 7;
Glcd_Init(); // Initialize GLCD
Glcd_Fill(0x00);
// Glcd_Set_Font(Character8x7, 8, 7, 32);// Choose font, see __Lib_GLCDFonts.c in Uses folder
Glcd_Write_Text("TITLE1, 55, 1, 1); // Write string
Glcd_Write_Text("SubTit1", 1, 2, 0); // Write string
Glcd_Write_Text("SubTit2", 1, 3, 1); // Write string
Glcd_Write_Text("SubTit3", 1, 4, 1); // Write string
Glcd_Write_Text("SubTit4", 1, 5, 1); // Write string
}
by the way i am using mikroC .. also the glcd itself isn't damaged because it lights up upon being powered on ..
thanks in advance, gentle men ..