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.

[PIC] GLCD garbage/unwanted text problem

Status
Not open for further replies.

th3gr8

Member level 4
Member level 4
Joined
Aug 27, 2013
Messages
68
Helped
6
Reputation
12
Reaction score
6
Trophy points
8
Visit site
Activity points
398
Hello all ..
I have interfaced a 128x64 GLCD and keypad with microcontroller (PIC16F877A) .. The problem i am facing is that GLCD shows garbage text first and when i reset the PIC and start again, GLCD displays more garbage text and the garbage text increases with every reset .. How can i remove this garbage text??

I am posting code of function which receives data from keypad and displays it on GLCD.

Code:
int readThermometer(void)
{
n=0;
while(1)
{
k = kbd_getc();
if(k!=0)
{
temp1[n]=k;
//!if(temp1[n]=='*')
//!{
//!temp1[n]='.';
//!}
if(k=='#')
{
goto here;
}
glcd_text57(5, 15, temp1,1,ON);
here:
k=0;
delay_ms(250);
n++;
}
delay_ms(1);
if(temp1[n-1]=='#')
{
unsigned int8 length, count,i;
length = strlen(temp1);
count=length-1;
for(i=count;i<count+1;i--)
{
temp2[count-i] = temp1[count-i];
}
//!if(temp1[n-1]=='#')
//!{
//!temp2[0] = temp1[0];
//!temp2[1] = temp1[1];
//!temp2[2] = temp1[2];
//!temp2[3] = 0;
temp3=atoi(temp2);
break;
}
}
return temp3;
}

Pictures of garbage text:
GLCD_garbage (3).jpgGLCD_garbage.jpgGLCD_garbage (1).jpgGLCD_garbage (2).jpg
 

I think that the garbage display problem has less to do with the keyboard input function you have shared and more to do with the graphic display function used.Check on the display function. Share the display function code if possible.
 

I think that the garbage display problem has less to do with the keyboard input function you have shared and more to do with the graphic display function used.Check on the display function. Share the display function code if possible.

Thankyou for your reply .. but i didn't get you .. Display function code is also in this code "glcd_text57()" .. and i've used GLCD.C library of PIC-CCS ..
 

check out your lcd data and command pins hardware connection loose connection or any noise pic up can cause this type of issues.
 

Hi. Go to the "GLCD.c" driver file, and change the following parameters:

#define GLCD_LEFT 1 (originally is 0)
#define GLCD_RIGHT 0 (originally is 1)

You should be able to get the correct display!!!
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top