1. This forum section is a read-only archive which contains old newsgroup posts. If you wish to post a query, please do so in one of our main forum sections (here). This way you will get a faster, better response from the members on Motherboard Point.

Reset problem with LCD display

Discussion in 'Embedded' started by Jesper, May 14, 2005.

  1. Jesper

    Jesper Guest


    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

    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

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

    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

    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???


    Jesper Kristensen
    Jesper, May 14, 2005
    1. Advertisements

  2. Jesper

    Lanarcam Guest

    Have you tried to power cycle the controllers after the microprocessor
    Lanarcam, May 14, 2005
    1. Advertisements

  3. Jesper

    cbarn24050 Guest

    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.
    cbarn24050, May 14, 2005
  4. I've got this weird problem with a HD44780 compatible display. It's a
    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 Tuffin, May 14, 2005
  5. Jesper

    Rob Guest

    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, May 15, 2005
  6. Jesper

    CBFalconer Guest

    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:
    CBFalconer, May 15, 2005
  7. Jesper

    Jesper Guest

    Have you tried to power cycle the controllers after the microprocessor

    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, May 15, 2005
  8. Jesper

    Jesper Guest


    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, May 16, 2005
  9. 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

    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
    Spehro Pefhany, May 16, 2005
  10. Jesper

    Tim Mitchell Guest

    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, May 16, 2005
  11. 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?
    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, May 16, 2005
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.