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.

[SOLVED] 20x4 LCD interfacing with LPC2368

Status
Not open for further replies.

shashank07

Junior Member level 2
Joined
Dec 29, 2011
Messages
21
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,407
hello Friends

I am working on 20x4 lcd interfacing with LPC2368.

I already work on 16x2 lcd.

Is both display initialization same?

how to write data on different line

I mean what is line address?

does any one have experience on 20x4
 

ud23

Advanced Member level 3
Joined
Apr 20, 2011
Messages
926
Helped
185
Reputation
370
Reaction score
180
Trophy points
1,323
Activity points
6,138
Yep, the initialization is same as 16X2 LCD, the third line is the continuation of first line and fourth line that of second line.

first line address : 00h to 13h
second line address : 40h to 53h
third line : 14h to 27h
fourth line : 54h to 67h
 

shashank07

Junior Member level 2
Joined
Dec 29, 2011
Messages
21
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,407
Hi Ud thanks for reply
so if i want to write data on 2nd line i'll give 40 as a command
and cursor will automatically come to 2nd line right?
 

nandhu015

Advanced Member level 5
Joined
Feb 11, 2006
Messages
1,965
Helped
300
Reputation
600
Reaction score
224
Trophy points
1,353
Location
India
Activity points
9,861
Yes, the cursor will be on the first position
 

shashank07

Junior Member level 2
Joined
Dec 29, 2011
Messages
21
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,407
that's nice
I have done with almost everything in coding part
but stuck at one point
my data pins are not at single port D0-D3are at port0 and D7-D4 are at port 1
now if i want to display a single character what should I do for example 'A'
 

nandhu015

Advanced Member level 5
Joined
Feb 11, 2006
Messages
1,965
Helped
300
Reputation
600
Reaction score
224
Trophy points
1,353
Location
India
Activity points
9,861
that's nice
I have done with almost everything in coding part
but stuck at one point
my data pins are not at single port D0-D3are at port0 and D7-D4 are at port 1
now if i want to display a single character what should I do for example 'A'

Why dont you try it in 4bit mode..
 

shashank07

Junior Member level 2
Joined
Dec 29, 2011
Messages
21
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,407
Hi nandu
to test code I am using 16x2 lcd on LPC2148 as I have that board available
I made according changes for that.
I check that code on debugger its working as per requirement
BUT when I test it on board I found one problem
LCD enable PIN is not getting HI at the time of command

also i check data pins of LCD with oscilloscope I am getting 0x38 which is first command
but enable pin is still low
Any solution?
 

nandhu015

Advanced Member level 5
Joined
Feb 11, 2006
Messages
1,965
Helped
300
Reputation
600
Reaction score
224
Trophy points
1,353
Location
India
Activity points
9,861
Hi nandu
to test code I am using 16x2 lcd on LPC2148 as I have that board available
I made according changes for that.
I check that code on debugger its working as per requirement
BUT when I test it on board I found one problem
LCD enable PIN is not getting HI at the time of command

also i check data pins of LCD with oscilloscope I am getting 0x38 which is first command
but enable pin is still low
Any solution?

I cant find out the fault unless i see the code.
 

shashank07

Junior Member level 2
Joined
Dec 29, 2011
Messages
21
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,407
give me your mail id so that i can mail you
 

shashank07

Junior Member level 2
Joined
Dec 29, 2011
Messages
21
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,407
Hello friends
My code is running problem was the contrast settings
So i change POT settings and its working :)
 

bianchi77

Advanced Member level 4
Joined
Jun 11, 2009
Messages
1,313
Helped
21
Reputation
44
Reaction score
20
Trophy points
1,318
Location
California
Activity points
9,442
Yep, the initialization is same as 16X2 LCD, the third line is the continuation of first line and fourth line that of second line.

first line address : 00h to 13h
second line address : 40h to 53h
third line : 14h to 27h
fourth line : 54h to 67h

do you mean
lcd_cmd(0x14); and lcd_string("something") ?

it doesn't work...
 

zuisti

Advanced Member level 1
Joined
Jul 2, 2004
Messages
480
Helped
188
Reputation
376
Reaction score
184
Trophy points
1,323
Location
Hungary
Activity points
3,320
Set the parameter's 7th bit to 1.
Use this:
lcd_cmd(0x80 + rowaddress + colnum);
eg
lcd_cmd(0x94); //0x80 + 0x14 + 0: third line, pos 0
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top