Reset problem with LCD display

Embedded computer systems topics

Reset problem with LCD display

Postby Jesper » Sat May 14, 2005 4:15 pm

Hey

I've got this weird problem with a HD44780 compatible display. It's a
40x4 display from Batron. The displays is based on 2 HD44780
controllers.

When I power up the uC and display I get the 2 black bars on the
display. I then reset the display and it works fine.
BUT I got problems, when I download a new code in the uC and resets it
afterwards. Now the display writes a's instead of my text. The problem
is on both HD44780 controllers, so i figured that the controllers
shares the problem. The display works fine, if a reset the uC a few
times?!??

I tried with an older 40x2 HD44780 compatible display, but same
result.

The uC is a Philips LPC 2124. I've tried changing the delays in my
code, I had to use 1 us delay to get a satisfying length on the Enable
signal.

The contrast voltage is supplied thru a var. resistor, so the
Vcontrast is contemporart with the Vcc. Is this a problem?

I'm confused.... ANY SUGGESTIONS???

Regards

Jesper Kristensen
Denmark
Jesper
 

Re: Reset problem with LCD display

Postby Lanarcam » Sat May 14, 2005 9:21 pm

Jesper wrote:
Hey

I've got this weird problem with a HD44780 compatible display. It's a
40x4 display from Batron. The displays is based on 2 HD44780
controllers.

When I power up the uC and display I get the 2 black bars on the
display. I then reset the display and it works fine.
BUT I got problems, when I download a new code in the uC and resets
it
afterwards. Now the display writes a's instead of my text. The
problem
is on both HD44780 controllers, so i figured that the controllers
shares the problem. The display works fine, if a reset the uC a few
times?!??

I tried with an older 40x2 HD44780 compatible display, but same
result.

The uC is a Philips LPC 2124. I've tried changing the delays in my
code, I had to use 1 us delay to get a satisfying length on the
Enable
signal.

The contrast voltage is supplied thru a var. resistor, so the
Vcontrast is contemporart with the Vcc. Is this a problem?

I'm confused.... ANY SUGGESTIONS???

Regards

Have you tried to power cycle the controllers after the microprocessor
reset?
Lanarcam
 

Re: Reset problem with LCD display

Postby Guest » Sat May 14, 2005 9:43 pm

Clearly the problem is with your code and not the controller. These
chips have a reset sequence that you must follow to get reliable
operation. Another thing to watchout for is writing too fast, these are
very slow chips by todays standards, you must also check the busy flag
before writing data.
Guest
 

Re: Reset problem with LCD display

Postby Richard Tuffin » Sun May 15, 2005 12:15 am

I've got this weird problem with a HD44780 compatible display. It's a
40x4 display from Batron. The displays is based on 2 HD44780
controllers.

When I power up the uC and display I get the 2 black bars on the
display. I then reset the display and it works fine.
BUT I got problems, when I download a new code in the uC and resets it
afterwards. Now the display writes a's instead of my text. The problem
is on both HD44780 controllers, so i figured that the controllers
shares the problem. The display works fine, if a reset the uC a few
times?!??

I tried with an older 40x2 HD44780 compatible display, but same
result.

The uC is a Philips LPC 2124. I've tried changing the delays in my
code, I had to use 1 us delay to get a satisfying length on the Enable
signal.

Are you using the 4 bit interface? If you are initialising the display twice
will get the upper/lower nibbles out of line between sender and reciever.
Two solutions, make use of the read/status instructions to establish whether
the display is correctly responding, if not issue the init commands to go
into 4 bit mode and then try again.

Richard
Richard Tuffin
 

Re: Reset problem with LCD display

Postby Rob » Sun May 15, 2005 8:15 am

"Richard Tuffin" <r.b.j.tuffin@durham.ac.uk> wrote in message
news:d65o9l$q97$1@heffalump.dur.ac.uk...
I've got this weird problem with a HD44780 compatible display. It's a
40x4 display from Batron. The displays is based on 2 HD44780
controllers.

When I power up the uC and display I get the 2 black bars on the
display. I then reset the display and it works fine.
BUT I got problems, when I download a new code in the uC and resets it
afterwards. Now the display writes a's instead of my text. The problem
is on both HD44780 controllers, so i figured that the controllers
shares the problem. The display works fine, if a reset the uC a few
times?!??

I tried with an older 40x2 HD44780 compatible display, but same
result.

The uC is a Philips LPC 2124. I've tried changing the delays in my
code, I had to use 1 us delay to get a satisfying length on the Enable
signal.

Are you using the 4 bit interface? If you are initialising the display
twice
will get the upper/lower nibbles out of line between sender and reciever.
Two solutions, make use of the read/status instructions to establish
whether
the display is correctly responding, if not issue the init commands to go
into 4 bit mode and then try again.

Richard



There is a EPE magazine article online re using these modules. IIRC the
article they recommend initialising 2 or three times in succession for
reliable start up. Have a look at the Everyday Popular Electronics website
for the 2 part article "How to use intelligent LCDs"
rob
Rob
 

Re: Reset problem with LCD display

Postby CBFalconer » Sun May 15, 2005 1:20 pm

Rob wrote:
"Richard Tuffin" <r.b.j.tuffin@durham.ac.uk> wrote in message

I've got this weird problem with a HD44780 compatible display.
It's a 40x4 display from Batron. The displays is based on 2
HD44780 controllers.

When I power up the uC and display I get the 2 black bars on
the display. I then reset the display and it works fine. BUT
I got problems, when I download a new code in the uC and
resets it afterwards. Now the display writes a's instead of
my text. The problem is on both HD44780 controllers, so i
figured that the controllers shares the problem. The display
works fine, if a reset the uC a few times?!??

I tried with an older 40x2 HD44780 compatible display, but
same result.

The uC is a Philips LPC 2124. I've tried changing the delays
in my code, I had to use 1 us delay to get a satisfying
length on the Enable signal.

Are you using the 4 bit interface? If you are initialising the
display twice will get the upper/lower nibbles out of line
between sender and reciever. Two solutions, make use of the
read/status instructions to establish whether the display is
correctly responding, if not issue the init commands to go
into 4 bit mode and then try again.

There is a EPE magazine article online re using these modules.
IIRC the article they recommend initialising 2 or three times
in succession for reliable start up. Have a look at the
Everyday Popular Electronics website for the 2 part article
"How to use intelligent LCDs"

It is a long time since I used these beasts, but as I recall the
problem revolves around the fact that the busy signal is not valid
after the reset. You have to impose a delay of something like 40
millisecs after reset before trusting anything.

--
Some informative links:
news:news.announce.newusers
http://www.geocities.com/nnqweb/
http://www.catb.org/~esr/faqs/smart-questions.html
http://www.caliburn.nl/topposting.html
http://www.netmeister.org/news/learn2quote.html
CBFalconer
 

Re: Reset problem with LCD display

Postby Jesper » Sun May 15, 2005 2:16 pm

Have you tried to power cycle the controllers after the microprocessor
reset?

Hey

This could solve my problem..

How can I run a power cycle on the controllers. The datasheet
describes a power cycle on Vdd > 4.5 Volt. But I cant find a "manual"
power cycle??!??!

Jesper
Jesper
 

Re: Reset problem with LCD display

Postby Tim Mitchell » Mon May 16, 2005 4:15 pm

In article <4bd6bf8a.0505160431.11cfdcf3@posting.google.com>, Jesper
<jesperkr@mail.dk> writes
Hey

Thanks for all your replies. I've tried to add delays and do the
initialize the LCD multible times. But none if it helped.

Please notice that the error is on both controllers.

Check that the enable pin is the correct sense (active high)


I once made a unit which drove the display with active low enable and it
worked very bizarrely, sometimes OK, sometimes not.
--
Tim Mitchell
Tim Mitchell
 

Re: Reset problem with LCD display

Postby Spehro Pefhany » Mon May 16, 2005 4:15 pm

On 15 May 2005 02:16:55 -0700, the renowned jesperkr@mail.dk (Jesper)
wrote:

Have you tried to power cycle the controllers after the microprocessor
reset?

Hey

This could solve my problem..

How can I run a power cycle on the controllers. The datasheet
describes a power cycle on Vdd > 4.5 Volt. But I cant find a "manual"
power cycle??!??!

Jesper

If you float (or bring low) the pins connected to the display, then
interrupt the power (eg. by using a port pin and a PNP transistor or
p-channel MOSFET to control the display Vdd) for a suitable lenth of
time (maybe a couple hundred msec), then you can start up as from a
power-on.

The micro is probably putting the display into some undesirable state
as a side effect of the downloading process and you do not have a
power off/on cycle to reset it. Those parts do not have a reset pin.

You may also be able to recover by repeating the power-on sequence,
but it sounds like you've tried it. It might be worth double checking
that you have the sequence exactly right by the book.


Best regards,
Spehro Pefhany
--
"it's the network..." "The Journey is the reward"
speff@interlog.com Info for manufacturers: http://www.trexon.com
Embedded software/hardware/analog Info for designers: http://www.speff.com
Spehro Pefhany
 

Re: Reset problem with LCD display

Postby Jesper » Mon May 16, 2005 4:15 pm

Hey

Thanks for all your replies. I've tried to add delays and do the
initialize the LCD multible times. But none if it helped.

Please notice that the error is on both controllers.

Jesper
Denmark
Jesper
 

Re: Reset problem with LCD display

Postby Grzegorz Mazur » Mon May 16, 2005 4:15 pm

Jesper wrote:
I've got this weird problem with a HD44780 compatible display. It's a
40x4 display from Batron. The displays is based on 2 HD44780
controllers.

I tried with an older 40x2 HD44780 compatible display, but same
result.

That means the problem is in your code and/or hardware. My guess - CODE.
Or maybe the logic level incompatibility between LPC2xxx and 5V LCD? How
do you handle the level translation? Do you read the statur from LCD?

I'm confused.... ANY SUGGESTIONS???

Yes. Forget and delete all the sample code you got from any source and
write your own init routine, strictly following the HD44780 data sheet.
It always works for me!

If you use 4 bit interface, remember to read two nibbles while querying
the busy flag! (discard the second nibble but toggle Enable for it).
Grzegorz Mazur
 


Return to Embedded System

Who is online

Users browsing this forum: No registered users and 0 guests

cron