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.

problem interface Graphics LCD with 89c51

Status
Not open for further replies.

ibrar

Member level 2
Joined
Apr 11, 2006
Messages
51
Helped
2
Reputation
4
Reaction score
0
Trophy points
1,286
Location
Lahore, Pakistan
Activity points
1,606
lcd 89c51

Hi all,

i m trying to interface a GLCD with 89c51. i am facing some problem because i m doing it first time. when i power up the circuit LCD back light is on and dots are highlighted but the data is not on display.
below is the connection diagram from 89c51 to GLCD
i m using JHD12864A GLCD.

here is the program code



ORG 00H
MOV A,#38H ;INIT. LCD 2 Lines, 5*7 Matrix
ACALL COMNWRT ;CALL Command subroutine
ACALL DELAY ;Give LCD some time
MOV A,#0EH ;Display ON, Cursor ON
ACALL COMNWRT ;CALL Command subroutine
ACALL DELAY ;Give LCD some time
MOV A,#01H ;Clear LCD
ACALL COMNWRT ;CALL Command subroutine
ACALL DELAY ;Give LCD some time
MOV A,#06H ;Shift Cursor right
ACALL COMNWRT ;CALL Command subroutine
ACALL DELAY ;Give LCD some time
MOV A,#84H ;Cursor at live 1, pos. 4
ACALL COMNWRT ;CALL Command subroutine
ACALL DELAY ;Give LCD some time
MOV A,#'A' ;Display Letter 'A'
ACALL DATAWRT ;CALL Command subroutine
ACALL DELAY ;Give LCD some time
MOV A,#'L' ;Display Letter 'L'
ACALL DATAWRT ;CALL Command subroutine
ACALL DELAY ;Give LCD some time
MOV A,#'L' ;Display Letter 'L'
ACALL DATAWRT ;CALL Command subroutine
ACALL DELAY ;Give LCD some time
MOV A,#'A' ;Display Letter 'A'
ACALL DATAWRT ;CALL Command subroutine
ACALL DELAY ;Give LCD some time
MOV A,#'H' ;Display Letter 'H'
ACALL DATAWRT ;CALL Command subroutine
ACALL DELAY ;Give LCD some time
AGAIN: SJMP AGAIN ;Stay Here

COMNWRT:
MOV P2,A ;Copy register A to LCD
CLR P0.7 ;R/S = 0 for command
CLR P1.6 ;R/W=0 for write
SETB P1.7 ;E=1 for high pulse
ACALL DELAY ;Give LCD some time
CLR P1.7 ;E=0 FOR High to loe pulse
RET

DATAWRT: MOV P2,A ;Copy register A to LCD
SETB P0.7 ;R/S = 1 for DATA
CLR P1.6 ;R/W=0 for write
SETB P1.7 ;E=1 for high pulse
ACALL DELAY ;Give LCD some time
CLR P1.7 ;E=0 FOR High to loe pulse
RET


DELAY: MOV R3,#50
HER: MOV R4,#255
HERE: DJNZ R4,HERE
DJNZ R3,HER
RET
END
 

ssss959

Member level 4
Joined
Dec 20, 2007
Messages
68
Helped
6
Reputation
12
Reaction score
1
Trophy points
1,288
Location
INDIA
Activity points
1,600
interfacing lcd to 89c51

CHECK BY REMOVING
ACALL DELAY IN COMNWRT AND DATAWRT
ALSO CHECK THE HARDWARE ONCE
 

H_D_R

Full Member level 6
Joined
Jan 31, 2008
Messages
329
Helped
26
Reputation
52
Reaction score
9
Trophy points
18
Location
India
Activity points
0
89c51 lcd

if you dont have any problem then
"can you please upload the circuit of tthis interfacing...???"

or do cross check the circuit connections with datasheet and your PCB connections too. for debuging this step would be first. then go for port assinging details.
if everything is ok till here then we look in code..
 

ibrar

Member level 2
Joined
Apr 11, 2006
Messages
51
Helped
2
Reputation
4
Reaction score
0
Trophy points
1,286
Location
Lahore, Pakistan
Activity points
1,606
connections of lcd with 89c51

H_D_R said:
if you dont have any problem then
"can you please upload the circuit of tthis interfacing...???"

or do cross check the circuit connections with datasheet and your PCB connections too. for debuging this step would be first. then go for port assinging details.
if everything is ok till here then we look in code..

Thanks for reply.

i will upload it tonight

thanks
 

ibrar

Member level 2
Joined
Apr 11, 2006
Messages
51
Helped
2
Reputation
4
Reaction score
0
Trophy points
1,286
Location
Lahore, Pakistan
Activity points
1,606
how to write a delay program in 89c51

here is the connection diagram
only 89c51 to GLCD connections are shown

Thanks
 

H_D_R

Full Member level 6
Joined
Jan 31, 2008
Messages
329
Helped
26
Reputation
52
Reaction score
9
Trophy points
18
Location
India
Activity points
0
delay for graphics lcd display

ibrar said:
here is the connection diagram
only 89c51 to GLCD connections are shown

Thanks

have you check from your side the real connetions on PCB and this circuit connections.
BTW, this circuit connections are seems ok.
i have not used GLCD but i am saying bcoz i have used 16X2 LCDs.

if your circuit is ok then we have to check code.

please dont mind but this is the better way to debug the application as per my experience till today.
if you wish, you can follow else as your wish...
 

ibrar

Member level 2
Joined
Apr 11, 2006
Messages
51
Helped
2
Reputation
4
Reaction score
0
Trophy points
1,286
Location
Lahore, Pakistan
Activity points
1,606
89c51 lcd 16*2 programming

Thanks for your replay again

i have check the connections again thay r OK.
there is noting to mind u r helping me so

Thanks
 

ibrar

Member level 2
Joined
Apr 11, 2006
Messages
51
Helped
2
Reputation
4
Reaction score
0
Trophy points
1,286
Location
Lahore, Pakistan
Activity points
1,606
comnwrt subroutine

hi all

i am waiting for replay. can some body help me.

thanks
 

H_D_R

Full Member level 6
Joined
Jan 31, 2008
Messages
329
Helped
26
Reputation
52
Reaction score
9
Trophy points
18
Location
India
Activity points
0
lcd with 89c51

Have you define the ports in beginning of code..??

I am posting here your code with some alteration.
And it’s working perfectly on my circuit.
pleasecheck it.

Please change port declaration as per your connections.

Here problem was delay time.
I have reduced it.

Please refer data sheet properly so you can calculate the delay properly.
 

yogeshtewari

Newbie level 1
Joined
Apr 10, 2008
Messages
1
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,289
89c51 p0 p2 unterschied

Hello everyone out there.

I am also stuck in a similar situation.

I am interfacing my "JHD240128c" GLCD with at89c51.(T6963c controller)
Achieving a -15V drop across pin0 and pin4 of LCD only activates the backlight and all pixels glow black.

There is no data communication b/w GLCD D0-D7 and controller port(used for data and command)

Controller is programmed properly.

If circuit is correct then , may be the code incorrect.
But i have coded strictly as according the datasheet.

I doubt my circuit connections.
uploading the circuit image...........



what is that RESx8 connected to data bus? is that the pull up/pull down resiatances?
 

riteshjain_82

Junior Member level 1
Joined
May 21, 2006
Messages
17
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,426
89c51 interface with lcd

YOU HAVE USED GLCD WITH T6963c controlleR
BUT YOUR CODE IS CONTROLLING THE LCD 16*2 SHARP CONTROLLER


THERE IS DIFFERENT TECHNIQUE FOR DRIVING GLCD
THIS CODE WILL NOT WORK
SEARCH ON THE INTERNET LOT'S OF DETAILS THERE
 

aderich

Junior Member level 2
Joined
Jun 3, 2008
Messages
23
Helped
2
Reputation
4
Reaction score
2
Trophy points
1,283
Activity points
1,414
lcd, 89c51

i would suggest you consider anothr type of lcd and get their data sheet to work with but however,if you really want to work with your lcd, i will get back to you though base on your response:idea:
 

gr8sanch

Newbie level 4
Joined
Sep 18, 2008
Messages
6
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,313
89c51 interface with t6963c program

What is the difference between a character and a graphics LCD.......Can a character Lcd be used as a graphics LCD by changing controller/driver or vice versa???????????:?::?::?::?::?:
 

dianzifashaoyou

Newbie level 5
Joined
Nov 25, 2008
Messages
8
Helped
4
Reputation
8
Reaction score
3
Trophy points
1,283
Activity points
1,558
graphic lcd with 89c51

Ask the once t6963 model please being able to interpose 320 * 240's able LCD usage what
 

nakul_641988

Newbie level 1
Joined
Apr 20, 2010
Messages
1
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,288
I am interfacing 16*2 LCD with AT89C51.this is the header file for the LCD -

#ifndef __LCD_H__
#define __LCD_H__

#define RS P3_4 //registor select
#define RW P3_5 //read/_write
#define E P3_6 //enable
#define DATA P1 //data lines
#define STS P1_7 //d7th bit

#pragma SAVE
#pragma REGPARMS

extern void SetLCD(void); //initiates LCD
extern void LCD(unsigned char L); //0-clear display, 1-Line 1, 2-Line 2
extern char putchar(char); //prints single character on LCD

#pragma RESTORE

#endif

I found the file on the net.
do I have to define the body of the functions defined above ?
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top