Continue to Site

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.

Help me interface a HD44780 LCD Screen to PIC18F4550

Status
Not open for further replies.

Slayerza

Full Member level 5
Joined
Oct 22, 2005
Messages
295
Helped
27
Reputation
54
Reaction score
5
Trophy points
1,298
Location
South Africa
Activity points
3,462
LCD Screen Help

Hi,
I need some help interfacing a HD44780 compatable LCD screen to the PIC18F4550.
I am however having some problems, I recompiled the header as the datasheet? said. However even after increasing the dealy time significantly, the screen still does nothing. I am sure the screen is functional as is is brand new. The screen is a LMM86S027C2E from Nan-Ya (aka Mark products).

Please help.
Thanks in advance
Slayer
 

Re: LCD Screen Help

Hi,
You are not saying much, at least nothing much to go on. However, you do say:
the screen still does nothing
which makes me wonder how you have the contrast hooked up? Is your contrast pin hooked to the center of a 10k or 20k potentiometer which runs from Vdd to Vss? Even without code to drive it, the display should show you some dark rectangles by turning this pot. Can you get these?
If not, then before you blame your code, have a look at the hardware end.
If so, then are you in nibble, or byte mode? I would guess that by:
I recompiled the header as the datasheet?
you were referring to a Microchip App Note?
Are you working in assembly, or C? If in C, which tools are you using?
Regards,
Robert
 

Re: LCD Screen Help

Hi,
Im using the C18 compiler from microchip and the datahseet I am refering to is the C18 C compiler libraries. I have stepped through the code and noticed that in the controller datasheet the following happens,

In the datasheet there are two instuctions below each other in a frame. like
0 0 0 0 1 0
0 0 1 1 0 0

The microchip code then produces 0 0 1 1 1 0 and transfers this to the LCD. I dont know if this is causing the problem.

I have the contrast hooked up and the little squares are showing. Also I am using the nibble (4bit) mode

Thanks
Slayer
 

Re: LCD Screen Help

Hi Slayer,
It's late for me, and I'm falling asleep, but looking at the Microchip library guide, I came across this:
lcdtype
A bitmask that is created by performing a bitwise AND operation (‘&’)
with a value from each of the categories listed below. These values are
defined in the file xlcd.h.

I was looking for this:
In the datasheet there are two instuctions below each other in a frame. like
0 0 0 0 1 0
0 0 1 1 0 0

You said
The microchip code then produces 0 0 1 1 1 0 and transfers this to the LCD.
It seems to me that there is a connection here; those values are anded.

I'm a little confused, though, by "In the datasheet there are two...," were you referring to the LCD data sheet?

Regards,
Robert
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top