![]() |
![]() |
![]() |
|
|
|||||||
| 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? |
|
|
Thread Tools | Display Modes |
|
|
(permalink) |
|
anyone please help me in Graphic LCD 128x128A with the KS0108B
http://www.displaytech.com.hk/pdf/gr...series-v11.PDF please please |
|
|
|
|
|
|
(permalink) |
|
What do you need?
|
|
|
|
|
|
|
(permalink) |
|
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. |
|
|
|
|
|
|
(permalink) |
|
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. |
|
|
|
|
|
|
(permalink) |
|
dear pommie,
are you using C18 C Compiler? which version of the mplab are you using? |
|
|
|
|
|
|
(permalink) |
|
Yes, I am using C18 on version 8.02 of MPLAB.
Mike. |
|
|
|
|
|
|
(permalink) |
|
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~ |
|
|
|
|
|
|
(permalink) |
|
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. |
|
|
|
|
|
|
(permalink) |
|
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. |
|
|
|
|
|
|
(permalink) |
|
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? |
|
|
|
|
|
|
(permalink) | |
|
Quote:
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/ |
||
|
|
|
|
|
(permalink) | |
|
Quote:
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. |
||
|
|
|
|
|
(permalink) |
|
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~~~ |
|
|
|
|
|
|
(permalink) |
|
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. |
|
|
|
|
|
|
(permalink) | |
|
Quote:
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/ |
||
|
|
|
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|
|
|
||||
| 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 |