Problems with getting a GLCD to work

General discussion on mikroC.
Author
Message
Karthik
Posts: 13
Joined: 04 May 2008 10:15
Location: Chennai, India
Contact:

Problems with getting a GLCD to work

#1 Post by Karthik » 14 May 2008 15:53

Hi all,
I am trying to get a 128x64 GLCD display working with a PIC 18F452.
I have connected the GLCD according to the example circuit given in the GLCD section of the mikroC help files.And I have the following simple code running in the micro controller.

Code: Select all

void main() 
  {
  Glcd_Init(&PORTB,2,3,4,5,7,6,&PORTD);      // Init for GLCD module
  do {
    Glcd_Fill(2);  // Clear screen
    Glcd_Line(0, 2, 127, 11, 1);
      } while (1);
}
I am not getting any output, instead the whole LCD screen is flickering.Also the power supply LED is flickering along with the GLCD screen.
Suspecting that there may be a shorted connection somewhere, I rechecked all the connections, but to no avail.
Also when I don't have a loop running, there isn't any flickering, but instead just a blank lit screen.
Anyone has any ideas as to what could be wrong?Also how do I figure out the controller for the GLCD?There isn't anything mentioned on the GLCD.
Last edited by Karthik on 15 May 2008 14:09, edited 2 times in total.

Mathke
Posts: 42
Joined: 17 Aug 2007 19:58

#2 Post by Mathke » 15 May 2008 10:29

Your problem also is that you don't give your GLCD any rest.
You just keep writing a line to the screen .. Think about it.

Write the Line once to the display and it will stay there. You don't need to keep rewriting it. If you don't see anything, try to adjust your contrast potentiometer.

And if you wanne clear a screen you should use Glcd_Fill(0);

Karthik
Posts: 13
Joined: 04 May 2008 10:15
Location: Chennai, India
Contact:

#3 Post by Karthik » 15 May 2008 14:08

Well..I removed the loop as you said and wrote only once, but don't see anything.Also I tried adjusting the contrast, but still no effect.
Anything else that could possibly be wrong?

Mathke
Posts: 42
Joined: 17 Aug 2007 19:58

#4 Post by Mathke » 15 May 2008 14:22

You should really check your connections than ..

Code: Select all

void Glcd_Init(unsigned short *ctrl_port, unsigned short cs1, unsigned short cs2, unsigned short rs, unsigned short rw, unsigned short rst, unsigned short en, unsigned unsigned short *data_port);

So in your case,
PORTB2 is CS1
PORTB3 is CS2
PORTB4 is RS
PORTB5 is RW
PORTB7 is RST
PORTB6 is EN

En PORTD is your data port, that means that PORTD0 should be connected with D0 of the display.

If you are sure that that is OK than we should check the registers of your MCU :)

Karthik
Posts: 13
Joined: 04 May 2008 10:15
Location: Chennai, India
Contact:

#5 Post by Karthik » 15 May 2008 17:23

Yes, those are the exact connections that I have made.And I am pretty sure that there aren't any other mal-functioning connection anywhere else.
I should probably try and use another GLCD.Maybe the one I am using right now is spoilt.
Do you know how to find out if the GLCD I have is a T6963C GLCD or not?

Mathke
Posts: 42
Joined: 17 Aug 2007 19:58

#6 Post by Mathke » 15 May 2008 17:30

There for you have to check the datasheet of your GLCD.
Easy to find if you use google :D

muntron
Posts: 48
Joined: 23 Mar 2005 16:39
Location: Colorado, USA

#7 Post by muntron » 15 May 2008 18:14

Karthik wrote:Do you know how to find out if the GLCD I have is a T6963C GLCD or not?
The T6963C controller is designed for higher resolutions than 128x64. Typically 128x64 LCDs use the Samsung controller, though some use the T6963C. Since this controller is designed for 64x64, two of them + a common segment driver will be needed. This means that you should see 3 chips (usually sealed under black epoxy) on the underside of the display. If your display is based on the T6963C, it will need the T6963C, a sram chip, two column drivers and a segment driver. This will mean you should see 5 large chips on the underside.

Karthik
Posts: 13
Joined: 04 May 2008 10:15
Location: Chennai, India
Contact:

#8 Post by Karthik » 16 May 2008 12:21

Thanks Muntron.
Well my GLCD has only 3 COBs.So I think it is not a T6963C.

thenoble66
Posts: 243
Joined: 28 Sep 2005 19:43
Location: Romania

#9 Post by thenoble66 » 18 May 2008 14:49

Hi, Karthik

Is there any readable text on your ICs?
Or on your PCB?
Regards,
thenoble66
--------------------------------------------------------------------

Karthik
Posts: 13
Joined: 04 May 2008 10:15
Location: Chennai, India
Contact:

#10 Post by Karthik » 22 May 2008 10:45

I finally got the GLCD working.The problem was with the circuit given in the help of mikroC.It is not a general circuit.
I dug up a little and after a lot of searching found the actual datasheet for JHD12864E(Never thought it would be so hard to find!).I connected the pins according to the datasheet and the GLCD is working pretty well now.
If anyone wants the datsheet for JHD12864E, I would be more than willing to share.
Thanks for the help everybody.

Mathke
Posts: 42
Joined: 17 Aug 2007 19:58

#11 Post by Mathke » 23 May 2008 13:37

It's not a hard datasheet to find, the first hit on google with this : "datasheet JHD12864" gave me in 5 seconds the correct datasheet :D

Karthik
Posts: 13
Joined: 04 May 2008 10:15
Location: Chennai, India
Contact:

#12 Post by Karthik » 24 May 2008 13:24

Mathke wrote:It's not a hard datasheet to find, the first hit on google with this : "datasheet JHD12864" gave me in 5 seconds the correct datasheet :D
No. JHD12864 and JHD12864E are very different.Their pin configs are entirely different.

piculator
Posts: 29
Joined: 01 Jun 2008 16:42
Location: Borneo Island(no I'm not kidding)

GLCD Display not centralized

#13 Post by piculator » 10 Jun 2008 07:13

I'm currently using GLCD 12864E ,Crystal Oscillator 8Mhz, and PIC18f452 . It can display pictures fine. However I can't make the pictures centralized and the programming does not seem to be responding to the built in functions such as Glcd_Set_Side(),Glcd_Set_Page() and Glcd_Set_X(). Could anybody please share with me how to overcome this problem?

Are these configurations correct?
Glcd_Init(&PORTB,2,3,4,5,7,6,&PORTD).

Please help guys, this is awfully frustrating. :(

Karthik
Posts: 13
Joined: 04 May 2008 10:15
Location: Chennai, India
Contact:

Re: GLCD Display not centralized

#14 Post by Karthik » 10 Jun 2008 07:58

piculator wrote:Are these configurations correct?
Glcd_Init(&PORTB,2,3,4,5,7,6,&PORTD).
You can use any configuration you want.Just specify it in the particular order in which you have connected.See the help file in the GLCD section.
piculator wrote: However I can't make the pictures centralized...
Try interchanging the CS1 and CS2 pins.

piculator
Posts: 29
Joined: 01 Jun 2008 16:42
Location: Borneo Island(no I'm not kidding)

#15 Post by piculator » 10 Jun 2008 09:18

Karthik was absolutely right on that one, I must have used the wrong datasheet. It's really really hard for me to find that specific datasheet just by googling it, I went to a few of the devices manufacturers very own website. However, they didn't include the datasheet.
Well for the time being my GLCD is working fine. Thanks to the help of Karthik. Thanks so much. :)

Post Reply

Return to “mikroC General”