Shop OBEX P1 Docs P2 Docs Learn Events
Noob had LCD Speaking Korean? — Parallax Forums

Noob had LCD Speaking Korean?

06FJR06FJR Posts: 12
edited 2006-02-20 02:26 in BASIC Stamp
Hullo,

Today is my 3rd day with a Stamp Works Experiment Kit. I decided to check out the 2x16 parallel LCD provided using the provided code (Parallel_LCD_2X16.BS2).
I've checked and rechecked the wiring, and it seems okay. I get a bunch of characters (the right number for what I try to display) but they all look Korean.

I modified the code to just print the string "1234567890"
What I get on the LCD is "123<=>?<=0"

Any clues?

Comments

  • PJAllenPJAllen Banned Posts: 5,065
    edited 2006-02-19 21:20
    Which experiment Number?
    Which STAMP?
    What if "0987654321"?

    The characters that you mentioned (results) aren't Korean.
    There is a Katakana character set available on most LCDs (that's a Japanese form.)

    Post Edited (PJ Allen) : 2/19/2006 9:24:45 PM GMT
  • 06FJR06FJR Posts: 12
    edited 2006-02-19 21:41
    Sorry.

    Experiment 11 from the Stampworks Kit on a PDB using wiring provided on PDB and in book.

    I'm using a plain ol' BS2.

    If I do "0987654321" the results are the string from original post, reversed.

    The "Korean" characters occur with alpha characters. Under the "Support" tab on the main Parallax web page, there is a PDF for the accessory serial 2x16 LCD. (Note: I'm using the 2x16 parallel LCD that came with the Stampworks Kit, but the serial PDF had some useful info). The document titled 2x16SerialLcd-1.pdf has a table for all the characters the serial LCD can display. The "Korean" characters I see out of my parallel display look just like the characters in the right half of the table. The PDF is at

    http://www.parallax.com/dl/docs/prod/audiovis/2x16SerialLcd.pdf

    Thanks in advance for any ideas.
  • PJAllenPJAllen Banned Posts: 5,065
    edited 2006-02-19 21:53
    Please Upload your program (don't re-type it, use the Attachment Manager).
  • 06FJR06FJR Posts: 12
    edited 2006-02-19 21:59
    It's just the code provided by Parallax, with the message string replaced.

    Here it is from Attachment Manager:
  • 06FJR06FJR Posts: 12
    edited 2006-02-19 22:07
    I figure the next question is about wiring.

    I have the ribbon cable attached to the LCD plugged into the keyed slot X1

    The rest of the wiring:

    BS2 X1
    P0 E
    P2 RW
    P3 RS
    P4 DB4
    P5 DB5
    P6 DB6
    P7 DB7

    That's it.
  • PJAllenPJAllen Banned Posts: 5,065
    edited 2006-02-19 22:09
    ·Which if you change the LCD_Out subroutine to this?
    LCD_Out:
      LcdBus = char.HIGHNIB                        
      PULSOUT E, 3                               
      LcdBus = char.LOWNIB                         
      PULSOUT E, 3
      HIGH RS    
      RETURN
    
  • 06FJR06FJR Posts: 12
    edited 2006-02-19 22:14
    I don't understand.

    The LCD_Out routine already looks exactly like the one you provide.
  • PJAllenPJAllen Banned Posts: 5,065
    edited 2006-02-19 22:16
    Does It?

    I changed the order of High Nib and Low Nib.· Hang about -- no I didn't.· Change the order to Low Nib then High Nib
  • 06FJR06FJR Posts: 12
    edited 2006-02-19 22:18
    I think I know what you meant. Based on ending up in the righthand side of the table, swapping low and high nibbles is a good idea.

    It didn't work, though. I still get funky values. I haven't checked to see if the high-order bit is shorted high, though. Let me take a look.
  • Bruce BatesBruce Bates Posts: 3,045
    edited 2006-02-19 22:24
    06FJR -

    It sounds to me like one of three things may be happening, but I'm not sure which. Here are the possibilities (below) as I presently see them, if I'm right. Sorry, I don't have the Stampworks Kit, so I can't be more specific.

    1. Somehow the LCD is being set to use the alternate character set. As you can see from the character table in the LCD documentation, the left-hand side is English, and the right-hand side is non-English. This is true of almost any common LCD. I suspect, but do not know if there is a single command or LCD directive, to alternate from one to the other.

    Unfortunately I don't have one of those LCD's to determine what may be causing that to happen. In any case, it's most likely a command being sent, probably during the initialization phase, but possibly later. I suppose it's also possible that there isn't a sufficient pause after the initialization sequence for the LCD to properly initialize; thus it may defaulting to a "native" or factory set mode.

    2. I suppose it's possible that some sort of power or signal glitch is causing this as well. If any other devices, sensors or non-LCD pin ports are being used PRIOR to the·first output to the LCD, I would temporarily comment them out (use a single quote [noparse][[/noparse]'] at the beginning of each program line) temporarily, or do a hard GOTO (GOTO Bypass) around any such code, again temporarily. Then give it another shot.

    3.·Lastly, how long is the cable between the Stamp and the LCD, and what are you using for a cable? There are limits both to the length and somewhat to the type of cable. If you are using a pre-supplied cable,·please ignore this question.

    This should be a fairly easy one to ferret out, so hang in there, we'll have you back Stamping shortly smile.gif

    Regards,

    Bruce Bates

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    <!--StartFragment -->

    Post Edited (Bruce Bates) : 2/19/2006 10:29:47 PM GMT
  • 06FJR06FJR Posts: 12
    edited 2006-02-19 22:35
    Thanks, Bruce.

    1. I was thinking the same thing about an alternate character set. Let me see if I can find such a command for the parallel LCD.

    2. I'll try to pare the code down to the bare minimum, as you suggest. I suppose I should have started there.

    3. Good call, but it's the pre-supplied ribbon cable.

    I just wired all data (4 bits) and all control (3 bits) through the LEDs on the Professional Development Board. None of the data bits is stuck at 1. One of the control bits, RS, looks like it could be, but, if that were so the LCD wouldn't display anything, and RS stuck at 1 wouldn't explain my data display problems, I think.
  • 06FJR06FJR Posts: 12
    edited 2006-02-19 23:22
    I appreciate the help. But I think I may have a malfunctioning LCD on my hands.

    I pared down the code and inserted a delay between the writes of each nibble to the LCD. When I supply the string "0123456789" to the LCD, I see the sequence of nibbles:

    0011
    0000
    0011
    0001
    0011
    0010
    0011
    0011
    0011
    0100
    .
    .
    .
    0011
    1001

    In other words, all the right nibbles are being written to the LCD. Nonetheless, after sending "0123456789"
    I see "0123<=>?<=". Seems like it has to be the LCD unless there is some setup command for the parallel 16x2 LCD I haven't yet found.
  • PJAllenPJAllen Banned Posts: 5,065
    edited 2006-02-20 00:07
    Do you have the Enable (E) pulled low with a 4.7K?· There's a lot on this in this link:
    http://forums.parallax.com/showthread.php?p=565711

    [noparse][[/noparse]It's an advise of Jon's -- do a "Find on this page" for it.]
  • 06FJR06FJR Posts: 12
    edited 2006-02-20 01:07
    Somebody said...
    Do you have the Enable (E) pulled low with a 4.7K? There's a lot on this in this link:
    http://forums.parallax.com/forums/default.aspx?f=5&m=104036

    [noparse][[/noparse]It's an advise of Jon's -- do a "Find on this page" for it.]

    (I hope that formatted a proper quote)

    PJ,

    No, I didn't. I had hoped that was "built in" to the PDB. I just applied a 4.7K pulldown nonetheless. The behavior is unchanged. Thanks for the pointer, though.
  • 06FJR06FJR Posts: 12
    edited 2006-02-20 01:24
    I just found a good picture. Page 75 of the Stampworks manual indicates that the 4.7K pulldown on E, as well as the 220 Ohm terminating resistors on the data bus are provided by the PDB. That was a good guess, though. If the macro scale signals (as indicated by the LEDs) are getting there, and they are, it might be small signal stuff, eh?
  • 06FJR06FJR Posts: 12
    edited 2006-02-20 02:26
    So it looks like, on the LCD module, 2^2 is shorted to 2^3. That is, every time bit b2 is hot, b3 is hot.

    e.g. an ascii 4 is 00110100
    when I try to display an ascii 4, I get '<', or 00111100
    The same happens for ascii 5 reculting in '=', or 00111101

    I suspect a solder blob somewhere on the LCD between bits 2 and 3 of the DB bus.

    I'll call tech support as soon as they are next open and get a replacement.
Sign In or Register to comment.