Shop OBEX P1 Docs P2 Docs Learn Events
strange character on LCD upon program start and end...HELP! — Parallax Forums

strange character on LCD upon program start and end...HELP!

guitar_plrguitar_plr Posts: 31
edited 2005-02-03 14:45 in BASIC Stamp
I have an BS2 connected to the Matrix Orbital LK202-25 LCD.· I send some simple commands to the LCD and when the program starts, powers up,·or stops using the "END" command,·a strange character appears on the screen (kind of like an arrow).· All of the lcd display commands work perfectly (like clear screen, and formatting).· As soon as I use the "END" command the strange character comes back at·a rate of about every 2 seconds.· It's pretty annoying.· I was talking to tech support with Matrix Orbital for a while and they had no idea, saying the BS2 was the problem.

I finally found in the STAMP reference manual there is a "glitch" with the END command (pg 115):
"pins will retain thier input or output settings after the BASIC Stamp is deactivated by END".· I guess that is why the·strange character is appearing after·using END.· If I use STOP,·this doesn't happen.

1. Has anyone dealt with this "glitch" and what could be a workaround?

2.·By the way, my display ONLY works when the BS2 is set to 9600 and the LCD at 19200.·I get garbage for every other setting.· What·could be wrong?

Thanks!

Code I used:

'{$STAMP BS2}
PAUSE 1000
'clear screen
SEROUT Tx,84,[noparse][[/noparse]254,88]
'print test
SEROUT Tx,84,[noparse][[/noparse]"TEST"]
PAUSE 1000
END

·

Comments

  • Jon WilliamsJon Williams Posts: 6,491
    edited 2005-01-28 02:39
    When you use END the BS2 goes into low power mode and the pins will float every 2.3 seconds because the internal watchdog causes a quick reset. Replace END with STOP and the problem will go away.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
    Dallas, TX· USA
  • guitar_plrguitar_plr Posts: 31
    edited 2005-01-28 03:19
    Thank you Jon, that makes sense.· Any reason why the strange character would display when turning the board power on or pushing the reset button, and is there any way to prevent this?

    Thanks.
  • Jon WilliamsJon Williams Posts: 6,491
    edited 2005-01-28 04:15
    I know we carry it, but I've never used that particular LCD. Are you using a parallel bus? If yes, put a 4.7K pull-down (resistor connected between E and ground). This will hold the E line low when the Stamp floats the pins.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
    Dallas, TX· USA
  • guitar_plrguitar_plr Posts: 31
    edited 2005-01-28 04:32
    No, I believe it's only serial. It's a really simple setup. There are only 3 connections... 1 I/O pin, power & ground to the LCD. I have also tried a resistor to ground and have the same problem. The funky character happens everytime I load a new program, switch the power on or press the reset button. Thanks.

    By the way, I just ordered a G12032 graphics LCD, maybe I will have better luck...
  • Jon WilliamsJon Williams Posts: 6,491
    edited 2005-01-28 04:48
    Depending on the serial mode you may want to tie the serial line high or low to prevent noise on the line from tricking the display.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
    Dallas, TX· USA
  • guitar_plrguitar_plr Posts: 31
    edited 2005-01-28 14:13
    Jon, I'm new with the BS2 and building circuits in general so I'm not too familiar with the terminology... When you talked about "parallel bus" are referring to whether the LCD is a serial or parallel version?· Also, can you explain in more detail about "tieing the serial line high or low"?· Do you mean putting a resistor between power & ground or the I/O pin that goes to the LCD to ground?· Is that the same as a "pull-down" or "pull-up"?· Thank you for your assistance.
    Jon Williams said...
    Depending on the serial mode you may want to tie the serial line high or low to prevent noise on the line from tricking the display.

  • Jon WilliamsJon Williams Posts: 6,491
    edited 2005-01-28 16:15
    You might want to check with Matrix Orbital before taking my suggestions. They may have seen this and have a simple solution already.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
    Dallas, TX· USA
  • kelvin jameskelvin james Posts: 531
    edited 2005-01-28 19:28
    When i purchased a matrix orbital lcd, i was under the assumption that i could interface it directly to the stamp, i was wrong. These come pre-configured to use a com connection to a computer, in other words +/-12v. There needs for a mod to be done to run on TTL level 5v, to use with a stamp, and it ain't easy. It requires de-soldering and soldering a jumper area on the board, they are small solder points, so i was reluctant to try it. But if you are good with an iron, it sholdn't be a problem and you should check into this in more detail before going ahead . I don't know if you knew this or not, but it sounds like what i went through. If you already knew, then disregard this, and you have another issue. There is a forum at the matrix orbital web site that would answer most questions you may have. I was a little irked at the fact this is not openly displayed in the info on their website, which i feel it should be. And also, why they could not have just put in a cheap 4 pin jumper to be able to do this is also beyond me. Maybe they felt it wasn't solid enough for mobile applications, i don't know. They are nice units, but from this i have gone to the scott edwards lcd, which is more user friendly for stamp interfacing. Anyway, i don't want to get into a big rant here, just thought i would post this to inform other people of this issue. kelvin
  • guitar_plrguitar_plr Posts: 31
    edited 2005-01-28 19:39
    Hi kelvin.· Actually the LCD I purchased came modified directly from parallax.· They removed the db-9 connector and made a four pin connector for easy hookup.· I don't like the fact that to change the baud rate on the lcd you actually have to send the lcd a command using the serial interface, you can imagine the problems...Anyway, I have a scott edwards graphics lcd coming my way soon, so I will try it out and see if I still have the problem.·Thanks.
  • guitar_plrguitar_plr Posts: 31
    edited 2005-02-03 14:24
    Just as a quick follow-up... My Scott Edwards G12032 graphics LCD came in and I've had none of the problems I've talked about previously. Worked perfectly the first time I plugged it in and no strange characters have appeared. Thank you for all the input.
  • Jon WilliamsJon Williams Posts: 6,491
    edited 2005-02-03 14:45
    I'm a very big fan of SEETRON displays ... like BASIC Stamps, they just work.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
    Dallas, TX· USA
Sign In or Register to comment.