Magnatron
Full Member level 2
Hi, I stumble upon a compiler called "mikro C pro for pic". Created a code for displaying some pictures, but texts are all messed up!:-? on protues simulation, it seemed to be working allright, but on the real stuff the text get all messed up!:sad: did anyone encounter the same problem?? I'm using a Graphic LCD module part name JHD 12864E controllerKS0108), and PIC16f877a MCU @ 8 mhz
Protues simulation:
GLCD test :
can any one help:?:
Code:
const code char LOGO[1024] = {
///**some numbers ** //
};
//--------------------------------------------------------------end-declarations
// Glcd module connections
char GLCD_DataPort at PORTB;
sbit GLCD_CS1 at RC2_bit;
sbit GLCD_CS2 at RC3_bit;
sbit GLCD_RS at RC0_bit;
sbit GLCD_RW at RC5_bit;
sbit GLCD_EN at RC1_bit;
sbit GLCD_RST at RC4_bit;
sbit GLCD_CS1_Direction at TRISC2_bit;
sbit GLCD_CS2_Direction at TRISC3_bit;
sbit GLCD_RS_Direction at TRISC0_bit;
sbit GLCD_RW_Direction at TRISC5_bit;
sbit GLCD_EN_Direction at TRISC1_bit;
sbit GLCD_RST_Direction at TRISC4_bit;
// End Glcd module connections
void delay2S(){ // 2 seconds delay function
Delay_ms(2000);
}
void main() {
unsigned short ii;
char *someText;
Glcd_Init(); // Initialize GLCD
Glcd_Fill(0x00); // Clear GLCD
while(1)
{
Glcd_Image(LOGO); // Draw image
Glcd_Set_Font(font5x7, 5, 7, 32); // Change font
Glcd_Write_Text("V 1.0", 99, 0, 2); //[COLOR="#FF0000"] :!:not work right[/COLOR]
Glcd_Write_Text("Date", 0, 0, 2); //[COLOR="#FF0000"] :!:not work right[/COLOR]
delay2S();
Glcd_Fill(0x00); // Clear GLCD
}
}
Protues simulation:
GLCD test :
can any one help:?: