brucelee2
Member level 2
glcd_fill(0x00) not working
Hi,
When i write to the right hand side of my GLCD (x position> 64) its works fine. IF I WRITE ON THE LEFT IT repeats on the right....
The thing is it writes text ok. Now as soon as i try to draw a circle its is not a circle but a mess. Im using a GLCD from Mikro electronica, there is a library for it(KS0107-samsung). Im wondering if anyone can point me to another library for it or maybe my GLCD is not working correctly--it is new.
SEE THE PICTURE --->
MY CODE:
could it be a timing problem? any ideas??? THANKS
char GLCD_DataPort at PORTD;
sbit GLCD_CS1 at RB0_bit;
sbit GLCD_CS2 at RB1_bit;
sbit GLCD_RS at RB2_bit;
sbit GLCD_RW at RB3_bit;
sbit GLCD_EN at RB4_bit;
sbit GLCD_RST at RB5_bit;
sbit GLCD_CS1_Direction at TRISB0_bit;
sbit GLCD_CS2_Direction at TRISB1_bit;
sbit GLCD_RS_Direction at TRISB2_bit;
sbit GLCD_RW_Direction at TRISB3_bit;
sbit GLCD_EN_Direction at TRISB4_bit;
sbit GLCD_RST_Direction at TRISB5_bit;
// End Glcd module connections
void main()
{
ADCON1=0xFF;
Glcd_Init();
while(1)
{
Glcd_Fill(0x00);
Glcd_Circle(64, 30, 10, 1);
delay_ms(5000);
Glcd_Fill(0x00);
Glcd_Write_Text("LEFT x=0", 0, 0, 1);
Glcd_Write_Text("Right x=65", 65, 2, 1);
delay_ms(1000);
}
}
_________________
PIC 18F4550-----20MHZ HS
Hi,
When i write to the right hand side of my GLCD (x position> 64) its works fine. IF I WRITE ON THE LEFT IT repeats on the right....
The thing is it writes text ok. Now as soon as i try to draw a circle its is not a circle but a mess. Im using a GLCD from Mikro electronica, there is a library for it(KS0107-samsung). Im wondering if anyone can point me to another library for it or maybe my GLCD is not working correctly--it is new.
SEE THE PICTURE --->
MY CODE:
could it be a timing problem? any ideas??? THANKS
char GLCD_DataPort at PORTD;
sbit GLCD_CS1 at RB0_bit;
sbit GLCD_CS2 at RB1_bit;
sbit GLCD_RS at RB2_bit;
sbit GLCD_RW at RB3_bit;
sbit GLCD_EN at RB4_bit;
sbit GLCD_RST at RB5_bit;
sbit GLCD_CS1_Direction at TRISB0_bit;
sbit GLCD_CS2_Direction at TRISB1_bit;
sbit GLCD_RS_Direction at TRISB2_bit;
sbit GLCD_RW_Direction at TRISB3_bit;
sbit GLCD_EN_Direction at TRISB4_bit;
sbit GLCD_RST_Direction at TRISB5_bit;
// End Glcd module connections
void main()
{
ADCON1=0xFF;
Glcd_Init();
while(1)
{
Glcd_Fill(0x00);
Glcd_Circle(64, 30, 10, 1);
delay_ms(5000);
Glcd_Fill(0x00);
Glcd_Write_Text("LEFT x=0", 0, 0, 1);
Glcd_Write_Text("Right x=65", 65, 2, 1);
delay_ms(1000);
}
}
_________________
PIC 18F4550-----20MHZ HS