Problem with connecting to the contrast pin and Vee(-10V) pins of a GLCD

Status
Not open for further replies.

pappu_sam

Member level 1
Joined
Dec 31, 2009
Messages
39
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Location
HYDERABAD
Activity points
1,559
hi all,

am working on GLCD, JHD12864E, its a 128x64 GLCD.

am using pic18F4620 microcontroller.

please tell me how to connect to the contrast pin and Vee(-10V) pins.

i cant able to understand what is the problem with it.

am trying to intialize it,

what wl b the problem please rectify it.


my code is

#include<p18f4620.h>


void delay(char );

#define E PORTAbits.RA2
#define CS1 PORTAbits.RA3
#define CS2 PORTAbits.RA4
#define RS PORTAbits.RA0
#define RST PORTAbits.RA5
#define DATA PORTD
#define RW PORTAbits.RA1


void delay(char j)
{
int i,k;
for(k=0;k<=j;k++)
{
for(i=0;i<=1247;i++);
}
}

void main(void)
{

char read;

TRISD=0x00;
TRISA=0x00;
TRISB=0x00;

E=0;
CS1=0;
CS2=0;
RS=0;
RW=0;
RST=1;
DATA=0x00;

while(1)
{
PORTB=0xFF;
E=1;
RW=0;
CS1=1;
CS2=1;
RS=0;
DATA=0x3F;
delay(1);
E=0;
PORTB=0x00;
delay(80);





PORTB=0xFF;
E=1;
RW=0;
CS1=1;
CS2=1;
RS=0;
DATA=0xb8;
delay(1);
E=0;
PORTB=0x00;
delay(80);

PORTB=0xFF;
E=1;
RW=0;
CS1=1;
CS2=1;
RS=0;
DATA=0x40;
delay(1);
E=0;
PORTB=0x00;
delay(80);

PORTB=0xFF;
E=1;
RW=0;
CS1=1;
CS2=1;
RS=0;
DATA=0x80;
delay(1);
E=0;
PORTB=0x00;
delay(80);

PORTB=0xFF;
E=1;
RW=0;
CS1=1;
CS2=1;
RS=0;
DATA=0xc0;
delay(1);
E=0;
PORTB=0x00;
delay(80);

}
}
 

Re: Problem with GLCD

Hi,
I think you should take voltage for Vo (contrast) from VEE (negative volatage) through potentiometer or trimer (20kohms or less), then adjust till see the picture .
 

Problem with GLCD

Hi,
Connect Vcc to +5V and Vee to Gnd not -ve volt. Connect Vc(contrast) pin to the wiper of a potentiometer whose other two ends are connected to +5v and Gnd.

Added after 11 minutes:

Adjust the pot until you see the output on the GLCD.
 

Re: Problem with GLCD

hi tahmid...

i did like that but i cant able to initialize it....

the code i written is correct for initialization or not i dont know...

plz can u tell me what will b the problem....
 

Problem with GLCD

Hi pappu_sam,
I never did GLCD in any other language except mikroBASIC, so I can't understand that, although if you require any help in mikroC/mikroBASIC I might be able to help, since for GLCD, I use the internal libraries instead of doing everything myself.
 

Re: Problem with GLCD

to tahmid....

thanx for ur reply....

internal libraries...????

where can i get more stuff to study about this internal libraries...????
 

Re: Problem with GLCD

hi,
**broken link removed**

**broken link removed**

this may be useful for you. it has complete GLCD driver implemented using C with source code. it also has support for different custom fonts.
 

Problem with GLCD

By internal libraries, I mean libraries built into mikroC. To have a look, download mikroC from mikroElektronika site:
**broken link removed**
Install the compiler and under help menu, there is the GLCD library. You can study it there.
Hope this helps.
 

Re: Problem with GLCD

thnx Rasika0612....

Added after 37 minutes:

thanx tahmid...
....
 

Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…