Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

[SOLVED] Problem with GLCD , Images are displaying but no text.

Status
Not open for further replies.

Magnatron

Full Member level 2
Joined
Oct 28, 2010
Messages
143
Helped
19
Reputation
38
Reaction score
19
Trophy points
1,308
Location
Deolali
Activity points
1,907
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 controller:(KS0108), and PIC16f877a MCU @ 8 mhz
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:
adsf.jpg
GLCD test :
11082011_008.jpg
can any one help:?:
 

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 controller:(KS0108), and PIC16f877a MCU @ 8 mhz
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:
View attachment 60072
GLCD test :
View attachment 60073
can any one help:?:

Glcd_Write_Text("V 1.0", 99, 0, 2); // :!:not work right
Glcd_Write_Text("V 1.0", 99, 0, 1); // :!: work right
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top