romanrdgz
Joined: 28 Jan 2011 Posts: 16
|
GLCD prints garbage |
Posted: Mon Mar 07, 2011 6:22 am |
|
|
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 |
|