Shop OBEX P1 Docs P2 Docs Learn Events
more parallel LCD angst — Parallax Forums

more parallel LCD angst

ArchiverArchiver Posts: 46,084
edited 2003-04-30 23:11 in General Discussion
Hey guys....I'm going nuts with this thing!!

I've turned around and went ahead and ordered a serial one from
parallax....so I'll eventually get it (I hope).

Anyhow...so I got this nice little prallel LCD.

I've been grabbing whatever I can as far as examples and tried to
redo the code for my pinouts...I obviously don't know enough about
the stamp to get all the changes right.

I see a lot of guys send their data out on a 4bit buss instead of
8bit....I'm guessing this is to save on pinouts.
Also, I see guys outputting "char" type data. Don't know what that
is....is that the ascii equivalent of the HEX/BIN value?
Also, what is the bit order of an 'outh'? I've done too much to
remember what I did...but I was sure that if I did an
outh = %11110000 the bit order was reversed on my outputt pins (p12-
p15=1 & p8-p11 = 0...on stamp!). Can I not send my commands as BIN
data...manually that is.

I'm trying to keep it simple at first but am getting no where. I
STILL only have LINE 1 covered in blocks. I DO have the contrast
hooked up and have dimmed the boxes to JUST visible...but still
nothing!

If anyone has a simple bit of code to give me a bit of an idea!!
I assume that if I AT LEAST get the line 2 command in there I'll see
two lines of blocks! :/

Thanks

Comments

  • ArchiverArchiver Posts: 46,084
    edited 2003-04-30 23:11
    I am hardly an expert, but I suggest going into the Nuts and Volts
    http://www.nutsvolts.com FTP archive, scroll down until you come to
    the LCD stuff, download "LCDDEMO.BS2, this will get you going. Paste
    the code directly into your stamp editor and send it to the stamp.
    The code does run. This was a very big help getting me going with
    parallel LCD's. One thing, if memory serves me correctly there is a
    typo with the LCD / STAMP pin assignments. Pin 4 of the stamp is
    called out twice. PIN 3 on the stamp is used for data, not pin 4.

    "Char" is a variable, data sent to the LCD is usually stored in
    EEPROM, you will see DATA statements at the top of the program. The
    data is sent to the LCD one character at a time. CHAR represents that
    particular character about to be sent to the LCD. There may be a
    subroutine "LCDwrite" That takes the character and does the actual
    job of sending it to the LCD. The function of sending data to the LCD
    is usually in a loop. A character is sent, a counter increments by
    one, the next character is sent, over and over, until the FOR-NEXT
    loop has reached it's end (sending a specific amount of characters to
    the LCD) or until the program senses an "end-of-data" character,
    maybe the number 0 or 255 or whatever. Look at the LCDdemo code, this
    will eventually make sense. It may take a while, but it will
    eventually make sense. The LCDwrite subroutine sends the byte of data
    as 2 4bit nibbles.

    You can send data directly to the LCD, but this has to be done one
    character at a time. There may be an instance when this makes sense,
    but generally, this seems like bad programmimg to me. Strings can not
    be sent directly to the LCD using the BS2, More expensive flavors of
    the Stamp allow strings to be sent directly to the LCD (as easily as
    using Debug), but I would rather save the $$$ and use the extra code
    to get data to the LCD. NOt a problem for me. I have always used the
    BS2, if I ever used one of the "newfangled" stamps and actually saw
    how easy it was to get data to the LCD I would probably never look
    back :-) Same thing applies for serial LCD's. very, very easy to use,
    but 10 times the price of surplus LCD's. I would really hate myself
    if I ever went this way.

    It may make sense to do things the expensive way in a "Time is money"
    scenerio, but as a hobbyist I can't see popping for fifty bucks for a
    display, the Stamp is enough of a luxury for me.

    As for the contrast thing; Pin 3 (on the LCD) is your contrast pin.
    If you send pin 3 to ground you may end up with blocks on the
    display. Try a 500 ohm resistor between pin 3 and ground, that works
    well for me in every situation.

    DISCLAIMER: I AM A NEWBIE, I HAVEN'T TOUCHED MY STAMPS FOR A YEAR,
    AND TOTALLY FORGOT THE LITTLE BIT I USED TO KNOW. TO THOSE WHO DO
    KNOW, PLEASE FEEL FREE TO CORRECT ALL I MAY HAVE GOTTEN WRONG.

    Good Luck
    Regards
    Richard Cochran


    --- In basicstamps@yahoogroups.com, "chicbears11" <buht_krak@s...>
    wrote:
    > Hey guys....I'm going nuts with this thing!!
    >
    > I've turned around and went ahead and ordered a serial one from
    > parallax....so I'll eventually get it (I hope).
    >
    > Anyhow...so I got this nice little prallel LCD.
    >
    > I've been grabbing whatever I can as far as examples and tried to
    > redo the code for my pinouts...I obviously don't know enough about
    > the stamp to get all the changes right.
    >
    > I see a lot of guys send their data out on a 4bit buss instead of
    > 8bit....I'm guessing this is to save on pinouts.
    > Also, I see guys outputting "char" type data. Don't know what that
    > is....is that the ascii equivalent of the HEX/BIN value?
    > Also, what is the bit order of an 'outh'? I've done too much to
    > remember what I did...but I was sure that if I did an
    > outh = %11110000 the bit order was reversed on my outputt pins
    (p12-
    > p15=1 & p8-p11 = 0...on stamp!). Can I not send my commands as BIN
    > data...manually that is.
    >
    > I'm trying to keep it simple at first but am getting no where. I
    > STILL only have LINE 1 covered in blocks. I DO have the contrast
    > hooked up and have dimmed the boxes to JUST visible...but still
    > nothing!
    >
    > If anyone has a simple bit of code to give me a bit of an idea!!
    > I assume that if I AT LEAST get the line 2 command in there I'll
    see
    > two lines of blocks! :/
    >
    > Thanks
Sign In or Register to comment.