Shop OBEX P1 Docs P2 Docs Learn Events
First try at using an LCD, pointers appreciated — Parallax Forums

First try at using an LCD, pointers appreciated

WillWhiteWillWhite Posts: 15
edited 2006-02-17 18:41 in BASIC Stamp
Going against the old saying "If it ain't broke, don't fix it", I've decided that I need to add an LCD display to a project I've just completed. It will serve very little use other then novelty, but I want to learn how to add an LCD to a project. Here's a little background for you:

1) Where did the LCD come from?
I work in the Telecom department of a college and when a digital phone breaks, we throw it out. They have several interesting parts (espically the old ones that are thru-hole) for harvesting such as a Numeric Key-pad, a 12 push button strip with LED's, and a LCD display. All of these are Thru-Hole and thus can be removed easily. There are also several other components I may get around to scrounging in the future, but for now these 3 are going to be my focus.

2) What kind of LCD is it?

The LCD Controller/Driver is a Hitachi HD44780 (version A00) controling a HD44100H LCD driver. For convenience, I've already downloaded the data sheets and I've made them available so you don't have to search if you want to peak at them.

Naturally my campus FTP server isnt' working and I can't get the file up on our server, it also won't let me attach the files here, so I'm going to have to give you an external link to the files (I hate doing this)
HD44100H Datasheet
HD44780 Datasheet

The whole "Package" has 14 Wires connected to a board which houses the two IC's as well as 4 Capacators with the number 682 on them and 1 Capacitor with the number 913 and an odd lightning bolt. I've ripped one LCD apart and traced all of the wires and with the screen side up they are as follows from left to right

Ribbon cable 1
DB7 -> Pin 46 on the HD44780
DB6 -> Pin 45 on the HD44780
DB5 -> Pin 44 on the HD44780
DB4 -> Pin 43 on the HD44780
DB3 -> Pin 42 on the HD44780
DB2 -> Pin 41 on the HD44780
DB1 -> Pin 40 on the HD44780

Ribon Cable 2
DB0 -> Pin 39 on the HD44780
E -> Pin 38 on the HD44780
RW -> Pin 37 on the HD44780
RS -> Pin 36 on the HD44780
V1-5 -> Pin 26-30 on the HD44780
Vcc -> Pin 33 on the HD44780
GND -> Pin 23 on the HD44780


I think I may have an answer to my own questions here so I will reference page numbers in the PDF file (HD44780.pdf), but I'm looking for confirmation or a nudge in the right direction from some of the more experienced folk here. All page references will be to those listed on the bottom of the datasheet, not the PDF file page numbers.
    I have a BS2, but only have 7 I/O pins remaining for use. I'd like to drive this IC in 4-bit mode instead of 8-bit mode to save I/O pins. Should I put DB0 to DB3 to ground?...From page 175
  • How do I signal the LCD to read the input on the pins? My guess is that I drive pin "E" high to signal a read operation. Does this seem like a logical guess....From page 175.
  • How important is timing in this operation? I've never worked with an LCD before, but all of the graphs in the PDF file make me think that I might need some sort of clock to sync the Stamp and the LCD. I was hoping to simply monitor DB7 for the busy flag instead of having to figure out how to sync the two while trying to learn the basics. (page 176 of the PDF shows how DB7 Acts as a busy flag).

    I know alot of this is going to come down to just hooking it up and letting it go, however I still haven't moved my project off of the PDB to the carrier board since I'm not what you would call "good" at soddering. I was going to try to get the engineering department to sodder the stuff together, but I guess engineering students don't really do much hands on anymore.

    Any help, pointers, tips, etc that anyone is willing to offer as I set out would be greatly appreciated!

Comments

  • Jon WilliamsJon Williams Posts: 6,491
    edited 2006-02-17 18:41
    Download StampWorks 2.0 -- it has a few LCD experments that you can use to get started. You'll find LCDs pretty easy to use with the code that is provided.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
Sign In or Register to comment.