Shop OBEX P1 Docs P2 Docs Learn Events
Truly 4x20 LCD — Parallax Forums

Truly 4x20 LCD

JugularJugular Posts: 8
edited 2009-01-28 19:38 in BASIC Stamp
I have tried the search function and came up with nothing that I think would help me out.

A few years ago I bought a 4x20 LCD and hooked it up to the printer port on my computer. It worked with the program running on the computer at the time. Recently I bought the "What is a Microcontroller" kit from the shack and now am wanting to hook my old lcd up to it. I keep seeing stuff about the·Hitachi 44780·based LCD's. Mine states that it is a Truly M204-1A2·· ·MTC-C204DPLY-1N.

The link to the one I own is (.pdf): http://www.mpja.com/download/14194op.pdf

When I google the two IC's that are on the spec sheet all I seem to come up with maybe they are samsung chips.

I have tried hooking it up the way the help file states in the editor application, but no luck.· Seeing that the help file shows how to hook up the Hitachi 44780·I thought maybe that was my problem since mine appear not to be that brand. I am just starting out on the programming part of all of this and have only tried example codes that I have found on the internet.

What I am asking, is this lcd to be hooked up differently than the Hitachi based lcd's? And is there a good website or forum link that could help point me in the right direction, I am not looking for somebody to do this programming·for me, for·I would like to learn and understand·it all myself.

Many thanks in advance,
Kyle

Comments

  • PJAllenPJAllen Banned Posts: 5,065
    edited 2009-01-27 01:45
    The pin-out of the unit you reference looks like a 44780-compatible.

    The LCD commands, if you are trying to use those,·are only for -2p, -2pe, -2px.· Which Stamp are you using?

    Parallax doesn't have a parallel 4x20, but they do have a parallel 2x16.· You can get characters to print with it just the same.
  • JugularJugular Posts: 8
    edited 2009-01-27 01:48
    Ok, I was thinking it would work because of the similarities.

    I only have the BS2 stamp. I did see in the help section that the LCDCMD does not work with it.

    What do you think would be the best route to go: learn how to run the lcd that I have or buy a better chip and just start from there?
  • PJAllenPJAllen Banned Posts: 5,065
    edited 2009-01-27 02:11
    The best route to go: Work with what you have.
    It should at least power up with the cursor blinking, which should fade in/out using the pot/contrast control.
    I don't know what your skill-set is, but check your wiring.
  • JugularJugular Posts: 8
    edited 2009-01-27 03:01
    I have tried wiring it a few different ways and one of them I did get a blinking cursor. I guess I just didnt know how to get anything to the display. Once I get the basics down of the programming I should be fine. I thank you for your replies.

    Kyle
  • JugularJugular Posts: 8
    edited 2009-01-27 03:56
    One last question if you don't mind. When I did have it "working" with the backlight on or off I really only see the first and 3rd lines on the screen as black boxes if I have the pot adjusted all the way over and gone if I have adjusted the other way. I do not remember only being able to really see those two lines. Is this something that is just visual or is there maybe something wrong with it? I can possible post a picture if needed.
  • PJAllenPJAllen Banned Posts: 5,065
    edited 2009-01-27 11:59
    If you crank the control all the way·over one way then the display will have a sort of "all on" look from certain angles.
  • rixterrixter Posts: 95
    edited 2009-01-28 03:11
    Kyle,

    The pinouts for that LCD you have do look typical and "standard". I did notice that the documentation doesn't mention being able to communicate with it in 4 bit mode as you can with some LCDs and what is used in several Parallax code examples for the LCDCMD and LCDOUT commands. These are not available commands in the BS2 as pointed out by PJ. So you are likely going to have to hook that LCD up in 8 bit mode, which will require all of the 8 data lines going to BS2 pins. "E" and "RS" will take up two more pins, so you can see the attraction of a serial LCD when it comes to pin consumption at least. You will also note in the documentation the address map for the display. Lines one and three are consecutive in their numbering. Larger LCDs, such as a 4 x 40 that I have, actually use a second controller to access the other set of lines. This is not the case here with your LCD however. It looks from your contrast test that two of the lines are not being addressed for whatever reason because you should see those black boxes on all four lines when the contrast is cranked.

    The examples I have for attaching a BS2 to an LCD in 8 bit mode uses PULSOUT commands to communicate with the unit. But it is a 2 x 16 LCD. This is from Robot Builder's Bonanza book and it or similar diagram is probably available online. Things are easier with the 2P series and the LCD command, but a bit of tinkering should get that thing working on the BS2.

    Rick
  • MrBi11MrBi11 Posts: 117
    edited 2009-01-28 04:57
    You could add one of these modules between your LCD and Stamp to convert the unit to serial [noparse][[/noparse]or I2C] plus get the hardware for an 4x4 keypad.

    http://www.web4robot.com/LCDCtrl.html

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Smile ... It increases your face value!

    Post Edited (MrBi11) : 1/28/2009 5:11:13 AM GMT
  • JugularJugular Posts: 8
    edited 2009-01-28 18:38
    Well I finally got the thing to work. Since I am new at the programming BASIC code it may take me a while to get it to write on all lines (guessing thats why it needs to be in 8-bit?). I do however have a sample code I downloaded and I can get writing on the top two lines. Even though when I have the contrast set I can only see black boxes on lines one and three. Odd but I am happy the screen works.

    I may go with a module like you linked MrBi11. Thank you for showing me that. Either that or I will just buy an lcd from Parallax, being that I do not really want to use up more of my I/O pins just for the screen leaving less for other sensors.
  • RDL2004RDL2004 Posts: 2,554
    edited 2009-01-28 19:38
    Most LCD controller chips(ets) are compatible or semi-compatible with the Hitachi HD44780. Your KS0076 may be a variant of the Samsung KS0066.

    The HD44780 has internal memory for 80 characters. A 4x20 display is often actually arranged internally as a 2x40, where line 3 is a continuation of line 1 and line 4 is a continuation of line 2. The fact that you are having problems with lines 1 and 3 would indicate that this is the case with your LCD.

    Hopefully this will help with your trouble-shooting. On the other hand, this type of display is common and fairly economical to buy. It may be simpler and less of a headache to just purchase a new one.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    - Rick
Sign In or Register to comment.