Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

GLCD problem with drawing - is it the library?

Status
Not open for further replies.

brucelee2

Member level 2
Joined
Aug 22, 2009
Messages
49
Helped
6
Reputation
12
Reaction score
3
Trophy points
1,288
Location
on a PCB
Activity points
1,638
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
 

GLCD problem NO IDEA...

with a KS0108 controlled GLCD you must use CS1 to access the first half of the GLCD, then swap to CS2 to access the seccond half... maybe your library isn't correct...

so which library are you using???
 

Re: GLCD problem NO IDEA...

Hi

Im using the mikroelectronica library, from their MikroC compiler. It is for this GLCD. hmmmm ive checked the lines, im thinking its a control problem as data is being receved sort of fine. im going to re build the lines today. ill keep u posted.
cheers:D
 

GOT IT WORKING

There was a problem with my RESET line. It works perfectly now. Thanks FOR your help thought.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top