Reset problem with LCD display
CASTalk.com Forum Index CASTalk.com
Discussion of DSP, FPGA, storage and embedded system.
 
 FAQFAQ   MemberlistMemberlist     RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 
Google
 
Web castalk.com
Reset problem with LCD display

 
Post new topic   Reply to topic    CASTalk.com Forum Index -> Embedded System
Author Message
Jesper
Guest





Posted: Sat May 14, 2005 4:15 pm    Post subject: Reset problem with LCD display Reply with quote

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
Back to top
Lanarcam
Guest





Posted: Sat May 14, 2005 9:21 pm    Post subject: Re: Reset problem with LCD display Reply with quote

Jesper wrote:
Quote:
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?
Back to top
Guest






Posted: Sat May 14, 2005 9:43 pm    Post subject: Re: Reset problem with LCD display Reply with quote

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.
Back to top
Richard Tuffin
Guest





Posted: Sun May 15, 2005 12:15 am    Post subject: Re: Reset problem with LCD display Reply with quote

Quote:
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
Back to top
Rob
Guest





Posted: Sun May 15, 2005 8:15 am    Post subject: Re: Reset problem with LCD display Reply with quote

"Richard Tuffin" <r.b.j.tuffin@durham.ac.uk> wrote in message
news:d65o9l$q97$1@heffalump.dur.ac.uk...
Quote:
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
Back to top
CBFalconer
Guest





Posted: Sun May 15, 2005 1:20 pm    Post subject: Re: Reset problem with LCD display Reply with quote

Rob wrote:
Quote:
"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
Back to top
Jesper
Guest





Posted: Sun May 15, 2005 2:16 pm    Post subject: Re: Reset problem with LCD display Reply with quote

Quote:
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
Back to top
Tim Mitchell
Guest





Posted: Mon May 16, 2005 4:15 pm    Post subject: Re: Reset problem with LCD display Reply with quote

In article <4bd6bf8a.0505160431.11cfdcf3@posting.google.com>, Jesper
<jesperkr@mail.dk> writes
Quote:
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
Back to top
Spehro Pefhany
Guest





Posted: Mon May 16, 2005 4:15 pm    Post subject: Re: Reset problem with LCD display Reply with quote

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

Quote:
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
Back to top
Jesper
Guest





Posted: Mon May 16, 2005 4:15 pm    Post subject: Re: Reset problem with LCD display Reply with quote

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
Back to top
Grzegorz Mazur
Guest





Posted: Mon May 16, 2005 4:15 pm    Post subject: Re: Reset problem with LCD display Reply with quote

Jesper wrote:
Quote:
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?

Quote:
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).
Back to top
 
Post new topic   Reply to topic    CASTalk.com Forum Index -> Embedded System All times are GMT
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum




VoIP Electronics Powered by phpBB