Shop OBEX P1 Docs P2 Docs Learn Events
LCD Terminal AppMod — Parallax Forums

LCD Terminal AppMod

DynamoBenDynamoBen Posts: 366
edited 2009-08-07 20:30 in Propeller 1
I'm building a prototype that uses an LCD and some buttons for menu control. I decided to use the LCD Terminal AppMod since I had one on the bench. Because it runs at 5V I added some 1K resistors inline for the data bus and any bi-directional I/O. The displays works great, however when I manipulate the switches it alters the text on the display (the text is written in a repeat loop).

I thought this was an issue of noise so I tried some 10K resistors instead but the symptoms/problems still persist. I've checked my code and it all looks good, so I think this might just be an electrical/interface issue.

Any thoughts on what to try next?

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2009-07-26 16:37
    Have you looked at the LCD Terminal AppMod documentation? There's a schematic on page 2.

    The switches are connected to the 4-bit inputs to the display. When you manipulate them, it will alter the text being written to the display. That's the way the device is designed. You have to stop writing new text to the display when you expect the user to press a button. If you want the pushbuttons and the display to work independently, they can't share the same I/O lines.
  • DynamoBenDynamoBen Posts: 366
    edited 2009-07-26 16:44
    Mike Green said...
    Have you looked at the LCD Terminal AppMod documentation? There's a schematic on page 2.

    The switches are connected to the 4-bit inputs to the display. When you manipulate them, it will alter the text being written to the display. That's the way the device is designed. You have to stop writing new text to the display when you expect the user to press a button. If you want the pushbuttons and the display to work independently, they can't share the same I/O lines.

    As the code is written I don't believe that I'm writing to the buss while reading the switch state. If that is the case then thats the source of my problem. I've attached my driver.
  • Mike GreenMike Green Posts: 23,101
    edited 2009-07-26 17:29
    The pushbuttons use a 1K series resistor. You have a 1K resistor in series with this to a Propeller I/O pin. If you press one of the pushbuttons, you will get a voltage divider. If the Propeller pin is high, the LCD will see a voltage 1/2 way between 3.3V and 5V (or 4.15V) which the LCD will see as high. If the Propeller pin is low, the LCD will see a voltage 1/2 way between 0V and 5V (or 2.5V) which the LCD will likely see as high as well.

    If you can replace the resistors on the LCD AppMod, change the 10K to 100K and the 1K to 10K, that will let it work with either a Propeller (with a 1K series resistor) or a Stamp.

    You also may be able to operate the LCD AppMod off 3.3V and eliminate the 1K Propeller I/O pin series resistors which would fix the problem as well.
  • DynamoBenDynamoBen Posts: 366
    edited 2009-07-27 00:04
    I will give those suggestions a try, thanks for the assistance Mike.
  • JonnyMacJonnyMac Posts: 9,197
    edited 2009-07-27 02:03
    I think if you change the 1K pull-ups to 2.2K you'll be fine; they'll protect the Propeller IO pins when a button is pressed and still allow the Propeller to pull a data line low when the display is being updated.
  • DynamoBenDynamoBen Posts: 366
    edited 2009-08-07 20:30
    Mike' suggestion didn't work because the prop could "see" the button presses. So I tried JonnyMac's, the prop could see the button presses but the display was still being scrambled. I then tried swapping out the original 1Ks with 4.7Ks, the prop sees the button presses and the display isn't negatively impacted.
Sign In or Register to comment.