CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to support@ccsinfo.com

GLCD prints garbage

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
romanrdgz



Joined: 28 Jan 2011
Posts: 16

View user's profile Send private message

GLCD prints garbage
PostPosted: Mon Mar 07, 2011 6:22 am     Reply with quote

I'm starting a GLCD project. When i draw some rectangles and text on the GLCD and call glcd_update(), it's printed almost OK, but there are some defects over some characters or lines.

I only thought about adding some delays around the glcd_writebyte function, but doesn't work at all.

Defects appear always at the same spots for each window i draw, but the are not the same screen pixels all the time (i mean, the problem is not death pixels).

For example, for this piece of code:

Code:

   char* tituloError [10];
   char* textoOK [3];
   
   pulsaOK = 1;
   sprintf(textoOK, "OK");
   
   if(code<10)
      sprintf(tituloError, "ERROR #0%d", code);
   else
      sprintf(tituloError, "ERROR #%d", code); 

   glcd_rect(12,10,116,54,0,ON);
   glcd_rect(13,11,115,53,1,OFF);
   glcd_rect(14,12,114,52,1,ON);
   glcd_line(30,22,98,20,OFF);
   glcd_rect(53,39,75,50,1,OFF);
   glcd_text57(36,14, tituloError, 1, ON);
   glcd_text57(58, 41, TextoOK, 1, OFF);
   glcd_update();


...I'm getting this on the GLCD:


the glcd.c library is the one included with the ccs compiler, used for a 128x64 screen. Any changed at the libraries except my attempt of fixing the problem adding delays.

Any idea where the problem could be coming from?

Thanks
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Mon Mar 07, 2011 3:05 pm     Reply with quote

There have been some bugs in the GLCD driver code in the past.
They are listed in the CCS forum archives.

What is your GLCD controller chip ? And manufacturer and model number
of the GLCD ?

What is your compiler version ?
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group