tugrulzure
Joined: 28 Nov 2008 Posts: 1
|
Usage of FAST_GLCD and glcd_update() commands with PIC18F |
Posted: Fri Jan 02, 2009 11:50 am |
|
|
Hello everybody,
I am gonna tell you my problem briefly; I want to use the faster method for driving a ks0108, which is fast_glcd*. When i use it with glcd_text57 or glcd_bar functions, it works just fine.
When it comes to glcd_line(), it doesnt show anything on the graphic lcd.
Here is my simple code; again what i want to do is, first display the bars one by one, clear the screen, then draw the lines from top to bottom one by one.
*When i dont use FAST_GLCD, program executes perfectly.
Code: |
#include <18f4685.h>
#fuses HS,NOWDT,NOPROTECT,NOBROWNOUT,NOLVP,NOPUT,NOWRT,NODEBUG,NOCPD
#use delay (clock=6000000)
#define FAST_GLCD
#include <HDM64GS12.c>
#include <graphics.c>
int i,x1,y1,x2,y2;
void main()
{
glcd_init(ON);
while(1)
{
glcd_init(ON);
y2=60;
x1=5;
for(i=0;i<8;i++)
{
glcd_bar(x1,0,x1,y2,10,ON);
glcd_update();
delay_ms(1000);
x1+=15;
y2-=5;
}
glcd_init(ON);
x1=5;
y1=5;
x2=100;
y2=5;
for(i=0;i<6;i++)
{
glcd_line(x1,y1,x2,y2,ON);
glcd_update();
delay_ms(1000);
y2=y1+=10;
x2-=10;
}
}
}
|
What may be the problem that prevents displaying the lines?
Regards |
|