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 CCS Technical Support

Garbage on a GLCD dislplay

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



Joined: 05 Jun 2006
Posts: 41
Location: Belgium

View user's profile Send private message Visit poster's website MSN Messenger

Garbage on a GLCD dislplay
PostPosted: Sun Oct 29, 2006 4:29 am     Reply with quote

hello Forum,

i have a strange problem with a Graphical LCD

i use the standard dricer from CCS

Code:
#include <HDM64GS12.c>
#include <graphics.c>


i send data to the dislay

Code:
// clear display en reprint border
//      glcd_rect(0, 0, 127, 63, YES, Off);
         glcd_rect(0, 0, 127, 63, NO, ON);            // Outline the display
         glcd_text57(3, 5, voltText, 1, ON);           // Display "Volts"
         glcd_text57(3, 15, datumText, 1, ON);        // Display "Datum"
         glcd_text57(3, 25, satText, 1, ON);           // Display "sats"
         glcd_text57(3, 35, LinkQtext, 1, ON);        // Display "link quality"
         glcd_text57(3, 45, DAtext, 1, ON);           // Display "sats"         
// Print Time
     //   sprintf(lcddata,"%c%c : %c%c : %c%c",gps_hour1, gps_hour2, gps_min1, gps_min2, gps_sec1, gps_sec2);
        glcd_rect(40, 5, 100, 15, YES, Off);
        sprintf(lcddata,"%c",gps_hour1);
      glcd_text57(40,5,lcddata,1,on);
        sprintf(lcddata,"%c",gps_hour2);
      glcd_text57(46,5,lcddata,1,on);
      sprintf(lcddata,":");
      glcd_text57(52,5,lcddata,1,on);
      sprintf(lcddata,"%c",gps_min1);
      glcd_text57(57,5,lcddata,1,on);
        sprintf(lcddata,"%c",gps_min2);
      glcd_text57(63,5,lcddata,1,on);
        sprintf(lcddata,":");
      glcd_text57(69,5,lcddata,1,on);
      sprintf(lcddata,"%c",gps_sec1);
      glcd_text57(75,5,lcddata,1,on);
        sprintf(lcddata,"%c",gps_sec2);
      glcd_text57(81,5,lcddata,1,on);

// print Datum      
        sprintf(lcddata,"%c%c%c%c%c%c\r\n",gps_year1, gps_year2,gps_month1, gps_month2,gps_day1, gps_day2);
         sprintf(lcddata,"test");
      glcd_text57(40,15,lcddata,1,on);


after a few secondsn i see a lot of garbage on the display,

any sugestions?

Carl

Charlie U



Joined: 09 Sep 2003
Posts: 183
Location: Somewhere under water in the Great Lakes

View user's profile Send private message

PostPosted: Sun Oct 29, 2006 8:17 am     Reply with quote

Carl,

If I remember correctly, the driver that you are using only turns pixels on. It assumes that the field for the character is blank. It is writing a single pixel at a time by reading a byte out of the ram of the GLCD, setting the pixel that it is working on and writing the byte back to the GLCD ram. It does not turn any pixels off. You will need to clear the character field before updating it with a new character.

Charlie
on7nh



Joined: 05 Jun 2006
Posts: 41
Location: Belgium

View user's profile Send private message Visit poster's website MSN Messenger

PostPosted: Sun Oct 29, 2006 8:40 am     Reply with quote

that's correct Charlie, i do that !

look in my listing :
Code:
glcd_rect(0, 0, 127, 63, YES, Off); for general clear


and just before writing the time :

Code:
glcd_rect(40, 5, 100, 15, YES, Off);

and still garbage.....
Charlie U



Joined: 09 Sep 2003
Posts: 183
Location: Somewhere under water in the Great Lakes

View user's profile Send private message

PostPosted: Sun Oct 29, 2006 10:59 am     Reply with quote

Ok, I'll try another tack.

I don't use the c format in printf, so I am not too familiar with it's requirements. Are your variables already converted to ascii character values, like 0x30 for 0? If not, then you might try changing the %c to %1u, which will convert the data to an ascii decimal character.
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