Micro + Watchdog + EEPROM + LCD

Discussion in 'Embedded Systems and Microcontrollers' started by ECCsimmons, Jul 20, 2013.

  1. ECCsimmons

    Thread Starter New Member

    Apr 6, 2013
    Hey guys, great forum you've got here. Long time reader first time poster.

    My Setup:
    -AT89c51: Micro for the brain, which is driven by a quartz crystal 7.37~ MHz
    -MAX1232CPA: The supervisor for power supply and hardware failures, plus performs reset on micro at boot.
    -24LC64: The EEPROM which connects to Micro to get SDA and SCL.
    -16x2 LCD: Displays what I programmed.. yada yada

    Now I do have other elements of the circuit but in my eyes these are the only things that should effect the LCD other than the actual power source itself. Power source is simple 12v DC power brick. I have VCC at ~5v to drive most, and 12v for things that need more juice like the LCD.

    Why I say the other elements have no bearing on the display is because a display should be able to run off just these components. I have a working board of the same style and I can pull all other chips and that display will continue to work just fine.

    My Problem:
    I'm getting power, and contast to the LCD because I can even adjust to get black squares. Yet I'm getting no text to scroll. The chip and LCD are fine because tested them both in another board and they're working as expected. I'm reading a continous voltage of 5v going from MAX1232 RST into RST pin of 89c51. Replaced MAX1232 to make sure wasn't faulty, but same issue. It keeps RST at 5v and therefore won't allow the 89c51 to actually initialize properly. I assume this is because there is a detected hardware failure somewhere else in the circuit?

    I'm not asking for specific answers, just relative behavior of these components. For example, am I correct assuming the MAX1232 is preventing 89c51 from initializing? Is this hardware failure being sensed by the MAX1232? If so should I be looking at component failures or more source and ground failures?/

    Thanks so much! Any clarification will be much appreciated!
  2. MrChips


    Oct 2, 2009
    Getting an LCD to work for the first time is always a tricky task. You are working from a recipe and working in the dark. It either works or it doesn't.

    To get things going you should not need a power supervisor. As long as the MCU RESET' signal is properly pulled up to Vcc and decoupled to GND the mcu should reset properly.

    I have not seen an LCD that require 12V. All the ones I have used work with +5VDC.

    In general, the reason an LCD does not display text is because it is not initialized correctly. The remedy is to go back and check each step in the recipe.

    1) Are the pinouts and connections to the mcu correct?

    2) Is VCC, VEE and GND properly connected with the correct voltages?

    3) Is there a 0.1μF capacitor between VCC and GND at the LCD?

    4) Is the LCD being sent the correct command sequence for 4-bit or 8-bit mode?

    5) Are the RS and RD/WR signals being applied correctly?

    6) Is the E signal being applied correctly?

    7) Does the E signal meet all timing constraints of the LCD?

    8) Is the contrast level (VEE) properly adjusted?

    Get all of these correct and the LCD should work.
  3. ErnieM

    AAC Fanatic!

    Apr 24, 2011
    True you are working from a recipe but it is a recipe you can check every ingredient as you use it. If you can single step your code (recommended as it also eliminates any timing issues) and with just a voltmeter check what signals are going to what pins.
  4. LDC3

    Active Member

    Apr 27, 2013
    You didn't say, so I will just state the obvious.

    Since the 8951 resets on an high pulse, the RST pin should be connected to a pull-up resistor and the not(RST) pin on the MAX1232.