Electronic Projects, forums and more.

Go Back   Electronic Circuits Projects Diagrams Free > Electronics Forums > General Electronics Chat


General Electronics Chat This forum is for general chat about electronics, eg: Dont know what a part does? Dont know how to read a circuit? Want to get an opinion?

Reply
 
Thread Tools Display Modes
Old 16th July 2008, 05:02 PM   (permalink)
Default need help in glcd

anyone please help me in Graphic LCD 128x128A with the KS0108B
http://www.displaytech.com.hk/pdf/gr...series-v11.PDF
please please
darsin is offline   Reply With Quote
Old 16th July 2008, 11:21 PM   (permalink)
Default

What do you need?
__________________
Bill
Smart Kits build Smart People

http://www.blueroomelectronics.com
blueroomelectronics is online now   Reply With Quote
Old 17th July 2008, 02:22 AM   (permalink)
Default

well actually i had found the sample code from pommie. I tried his code in my glcd but the only thing different is the size. His glcd is 128x64 whereas mine is 128x128. I straight use his code to try in my glcd is it correct?

my glcd have 4 chip select and his glcd has 2 chip select. so it will just only on my cs1 and cs2 in my gcd right?

but then my glcd can not display even a pixel. some times it will display some but could not get exactly the same result like pommie's graphic.
darsin is offline   Reply With Quote
Old 17th July 2008, 04:31 AM   (permalink)
Default

Unfortunately, when I wrote that demo code I was a little lazy and referred to some of the ports in code and so this required additional changes to be made throughout the code. I've attached a newer version of that code that should only require the #defines in GLCD.h to require modifying in order to work on different hardware. As for controlling the other two CS lines, I think the code I posted in your other thread should work.

Mike.
Edit, please see further down the thread for a corrected version of the code.

Last edited by Pommie; 21st July 2008 at 02:02 PM.
Pommie is online now   Reply With Quote
Old 17th July 2008, 05:08 AM   (permalink)
Default

dear pommie,
are you using C18 C Compiler?
which version of the mplab are you using?
darsin is offline   Reply With Quote
Old 17th July 2008, 06:12 AM   (permalink)
Default

Yes, I am using C18 on version 8.02 of MPLAB.

Mike.
Pommie is online now   Reply With Quote
Old 17th July 2008, 06:21 AM   (permalink)
Default

i changed the chip select code.
but still nothing display in my glcd
code:
void WritePosition(void){
b_GLCD_GCS1=0;
b_GLCD_GCS2=0;
b_GLCD_GCS3=0;
b_GLCD_GCS4=0;
if (YPos>63){
if(XPos>63){
b_GLCD_GCS4=1;
b_GLCD_GCS3=1;
}
else{
b_GLCD_GCS2=1;
b_GLCD_GCS1=1;
}
}
GLCD_Write_Cmd(0x40+(XPos&0x3f)); //column=0
GLCD_Write_Cmd(0xb8+((YPos&0x3f)>>3)); //row=0
}

and please check this for me
code:
void Wait_Not_Busy(void){
TRIS_Data=0xff;
b_GLCD_RS=0;
b_GLCD_RW=1;
if (b_GLCD_GCS1==1 && b_GLCD_GCS2==1){
b_GLCD_GCS1=0;
while (GLCD_Read()&0x80);
b_GLCD_GCS1=1;
b_GLCD_GCS2=0;
while (GLCD_Read()&0x80);
b_GLCD_GCS2=1;
}

if (b_GLCD_GCS3==1 && b_GLCD_GCS4==1){
b_GLCD_GCS3=0;
while (GLCD_Read()&0x80);
b_GLCD_GCS3=1;
b_GLCD_GCS4=0;
while (GLCD_Read()&0x80);
b_GLCD_GCS4=1;
}
else{

while (GLCD_Read()&0x80);
}
TRIS_Data=0x00;
}

please help me~
darsin is offline   Reply With Quote
Old 17th July 2008, 06:32 AM   (permalink)
Default

Forget about getting it to work with the 4 CS pins and just concentrate on getting it to work with 2. Make sure the unused CS pins are held low at all times.

Have you changed the #defines in the GLCD.h file?

Mike.
Pommie is online now   Reply With Quote
Old 17th July 2008, 06:39 AM   (permalink)
Default

yes but i just added:
#define b_GLCD_GCS3 LATAbits.LATA0
#define b_GLCD_GCS4 LATAbits.LATA1
and
#define b_TRIS_GCS3 TRISAbits.TRISA0 //GCS3
#define b_TRIS_GCS4 TRISAbits.TRISA1 //GCS4

is it any other #defines need to change too??
my backlight of anod and katod already connected to the Vdd and Gnd respectively
so i don't need to connect to the port right?

Last edited by darsin; 17th July 2008 at 06:41 AM.
darsin is offline   Reply With Quote
Old 17th July 2008, 09:34 AM   (permalink)
Default

I just checked the code I posted earlier and it was the wrong version. Could a mod please delete it.

Here is the original code with the required mods so you should just have to change GLCD.h Sorry about the earlier confusion.

Mike.
PS, What happened to the edit period becoming 1 week?
Attached Files
File Type: zip GLCD.zip (31.6 KB, 5 views)
Pommie is online now   Reply With Quote
Old 17th July 2008, 10:00 AM   (permalink)
Default

Quote:
Originally Posted by Pommie View Post
I just checked the code I posted earlier and it was the wrong version. Could a mod please delete it.

Here is the original code with the required mods so you should just have to change GLCD.h Sorry about the earlier confusion.

Mike.
PS, What happened to the edit period becoming 1 week?
hi Mike,
Electromaster confirmed its now 1 hour, for a longish trial period.
__________________
Eric
"Good enough is Perfect"

PIC tutorials:
Gramo's: www.digital-diy.net/
Bill's: www.blueroomelectronics.com/
ericgibbs is offline   Reply With Quote
Old 17th July 2008, 10:48 AM   (permalink)
Default

Quote:
Originally Posted by ericgibbs View Post
hi Mike,
Electromaster confirmed its now 1 hour, for a longish trial period.
Hi Eric,

See the last post of this thread. I hope it is changed as it stops silly mistakes (as above) from cluttering up the forum.

Mike.
Pommie is online now   Reply With Quote
Old 17th July 2008, 11:19 AM   (permalink)
Default

pommie my glcd is still not working
it display nothing!
i checked all the connection and i'd grounded my cs3 n cs4...

p/s:i wanna cry~~~
darsin is offline   Reply With Quote
Old 17th July 2008, 11:41 AM   (permalink)
Default

Can you post a circuit diagram?

Are you using an ICD2 or a Pickit2, if so can you pause it and see where it is stopping?

Mike.
Pommie is online now   Reply With Quote
Old 17th July 2008, 12:14 PM   (permalink)
Default

Quote:
Im now locking this thread. For the time being the edit time is 60 minutes. We will see how this goes for a while.
__________________
▌ Electro Tech Online Owner
hi Mike,
Following that thread link you posted, gave me the above as at the 13th July.

I am sure its 60 mins.
__________________
Eric
"Good enough is Perfect"

PIC tutorials:
Gramo's: www.digital-diy.net/
Bill's: www.blueroomelectronics.com/
ericgibbs is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Latest
sed1335 glcd thiru_electrifiers Micro Controllers 2 2nd July 2008 06:39 AM
Quick GLCD question jrz126 General Electronics Chat 1 24th April 2008 12:19 AM
Unicorn+GLCD+Swordfish. Pommie Micro Controllers 4 5th April 2008 04:21 PM
GLCD assembler code Electronics4you General Electronics Chat 4 1st April 2008 11:54 AM
Diagonal line for GLCD superbrew Micro Controllers 17 1st April 2008 05:03 AM



All times are GMT. The time now is 02:18 AM.


Electronic Circuits  |  Electronics Wiki
Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.