Shop OBEX P1 Docs P2 Docs Learn Events
LCD Wiring Configuration — Parallax Forums

LCD Wiring Configuration

jhwattsjhwatts Posts: 35
edited 2011-04-05 00:26 in Propeller 1
I'm trying to wire this display on to my demo board but not having to much luck. Could somebody spell it out for me. noobe

http://www.datasheetarchive.com/JM204A-datasheet.html

I currently have LCD pins 1,2 ran to ground and +5, LCD pin 5 is tied to pin 0 in the propeller and pin 6 is tied to pin 1, LCD pin 15 and 16 are ran to ground and +5.

Comments

  • Toby SeckshundToby Seckshund Posts: 2,027
    edited 2011-03-26 16:13
    There are two ways of talking to the LCDs, one is the full 8 bit way, and the other (usuall because of pin useage) is the 4 bit way. The 4 bit sort does a double swipe at the upper (D4..D7) bits only, some circuits show the lower bits left open an others show the tied low.

    You do not state how the PIN3 is connected, the data sheet states that it is the PSU for the LCD. Usually it is the CONTRAST pin and is fed from a 10K pot(ish) from + to ground (usually the position is down towards the ground end).
  • jhwattsjhwatts Posts: 35
    edited 2011-03-26 16:46
    I have tied pin 3 to the ground using a 10k resistor. Still no luck.
  • Cluso99Cluso99 Posts: 18,069
    edited 2011-03-26 20:01
    OK here is what I have found. This is a pretty standard connection and is most likely a Hitachi HD44780 compatible.

    There is an object in obex (LCDDEMO) that works just fine. BUT you need to change the pins to 4,5&6 because that object is for a different display with E,RW,RS whereas the datasheet you have (and mine) is RS,RW,E. Note the backlight is 15&16 and is not required for testing. Pin 3 can be ground (via 10K should be fine) - It is usual to use a 10K pot between 1&2 with the wiper to 3 - I started a thread to discuss the way to connect the contrast (pin3) to the prop. PJAllen found a way using pwm and a single pin and no resistors. Likewise, we found a way (untried) to power the backlight from a few prop pins and series resistors. http://forums.parallax.com/showthread.php?130420-PWM-to-control-LED-brightness-amp-contrast&highlight=LCD+contrast+backlight
  • PJAllenPJAllen Banned Posts: 5,065
    edited 2011-03-26 20:16
    The datasheet you linked to shows a mech dwg with pin 1
    on one end and pin 16 at the other, but there are only 15
    pins/dots total shown.
    Hope that yours has 16.

    I have attached a wiring diagram, the minimal requirement
    for "4-bit mode", based on your datasheet, though I added
    another dot, to show 16.

    [Is it the datasheet or am I having a stroke? Anyone else
    smell toast burning?]

    As I see it, DB4-7 require pull-downs;.
    506 x 388 - 35K
  • jhwattsjhwatts Posts: 35
    edited 2011-03-26 20:46
    I got it. I opened up the LCD object and used the wiring config from it. It only displays characters on the top two rows of the display. Why is that?
  • caskazcaskaz Posts: 957
    edited 2011-03-26 21:21
    Hi PJ.
    Major LCD's DB4-7 doesn't need pull-downs, and DB0-3 shoud be open.

    If you use 74HC164, wires are 3.
    This use 8bit mode.
    1024 x 726 - 60K
  • Toby SeckshundToby Seckshund Posts: 2,027
    edited 2011-03-27 03:03
    I have had some problems with older LCD unit when 3.3 Volts are used they all seem to like 5 Volts to the LCD module and yet 3.3 V should be TTL compatable. You are only writing to the LCD so no protection should be required.

    Most LCDs only reset themselves on power up, You can force a reset through software by sending three lots of 03's (I think) with short delays between them. The delays are required as these modules are very slow in comparison to any micro controller.

    I have a couple of non standard LCD modules that only use 14 pins, I hoped that it was just the backlights being always on but i haven't chanced it yet. They are LXC1625STY and have two resin blobs on the back. If anybody has some data ???
  • Cluso99Cluso99 Posts: 18,069
    edited 2011-03-27 03:06
    jhwatts: Originally I saw all 4 lines but then I did my own and only saw 2 lines until I fixed the mode. It is because the addressing of the screen is funny. See the HD44780 spec for detailed instructions.

    Are you using 4 bit mode or 8 bit mode? I am using 8bit mode.
  • BEEPBEEP Posts: 58
    edited 2011-03-27 04:16
  • idbruceidbruce Posts: 6,197
    edited 2011-03-27 06:40
    jhwatts

    JonnyMac did a tutorial on the HD44780, which gives the basic safe wiring for the LCD. In his tutorial, he includes a transistor for controlling a backlight, you may or not want to add this transistor. Here is the link to that SpinZone article. http://www.parallax.com/Portals/0/Downloads/docs/cols/nv/prop/col/nvp2.pdf

    Additionally, MagIO2 has a nice LCD object in the OBEX for controlling the display, but you will have to look that one up.

    Bruce
  • Martin_HMartin_H Posts: 4,051
    edited 2011-03-27 07:13
    The four pin interface to an LCD consumes six microcontroller pins, but using a serial shift register lets you do it with only three pins. The programming is more complicated, but it can be wrapped in a library and made fairly easy to use. This approach is pretty common among Arduino users.
  • PJAllenPJAllen Banned Posts: 5,065
    edited 2011-03-27 07:33
    Hi caskaz - I disagree with all that, but you can
    go your own way. Who constitutes "major" in this context
    anyway?
    Unused data input to GND certainly does no harm; pulling-down
    data inputs keeps things in known states and that's how I roll.*
    [I've been at this "stuff" quite a while.]

    jhwatts - Which "the LCD object" do you refer?

    * - This way nothing's indeterminate
    and nobody has to remember or guess
  • caskazcaskaz Posts: 957
    edited 2011-03-27 08:45
    HD44780's datasheet recommend D0-3 to open with 4bit mode.
    DB0-7 is pulled up to Vcc inside HD44780.

    When DB0-3 connect to GND: If signal-line is long, connecting to GND is good way.(maybe needing resister)
    If only write-mode, no problem.
    But if read-mode, DB0-3's output may be short to GND under some status.

    ViH-min for Input is 2.2V on HD44780's datasheet. So propeller's port can connect directly to LCD-module.
    But some module(using HD44780) is not 2.2V.
    My JHD164A's ViH-min is 0.7Vdd(3.5V). Now direct connect is OK.

    I read HD44780U's datasheet again.
    When Vcc is 2.7 to 4.5V, ViH-min is 0.7Vcc.
    When Vcc is 4.5 to 5.5V, ViH-min is 2.2V.
    When Vcc is different, electric&timing also is different.
  • PJAllenPJAllen Banned Posts: 5,065
    edited 2011-03-27 09:12
    0.7Vdd(3.5V) or Vdd - 0.7?
    44780S = 5V, 44780U = 3V. Are these still made by Hitachi?

    Even Parallax examples have been inconsistent in this matter.
    Yes, all 8 are bi-directional, tri-state data bus (I/O.)

    I'm always using these as 4-bit. If my example pulled-down
    DB0-3, too, as is my inclination, I'd get "grief" for that.
    Howbeit, they're "not used during 4-bit operation."

    I'm not being critical of your position, I'm mindful of "n00bs" and
    their propensity to get in over their head - and their aversion to
    resistors.
  • jhwattsjhwatts Posts: 35
    edited 2011-03-27 12:58
    Here is the lcd object I used to get the wiring configuration.
  • jhwattsjhwatts Posts: 35
    edited 2011-04-03 21:03
    Any suggestions on how to wire this. I would like to use the same lcd.spin object. I'm assuming it will be the same as the LCD above except for the chip select pin.
    pdf
    433K
    .pdf 432.5K
  • PJAllenPJAllen Banned Posts: 5,065
    edited 2011-04-04 20:28
    It's an extension without a filename.
    Fascinating.
  • wrightmewrightme Posts: 43
    edited 2011-04-04 21:07
    And it downloads and is viewable. Even more fascinating.
  • HollyMinkowskiHollyMinkowski Posts: 1,398
    edited 2011-04-05 00:26
    I love using those cheap HD44780 lCD displays.

    I wish they would use an RGB LED to backlight them though.
    It would be cool to be able to use color effects with them.
    They could have just one color wired to the normal pin for
    compatibility and add two extra connections somewhere for
    those that want more bling.
Sign In or Register to comment.