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

LCD Terminal AppMod

YujiYuji Posts: 2
edited 2004-09-20 20:54 in BASIC Stamp
Hello Everyone,
This is my first post. I just got my LCD terminal appmod but am a little confused on its use. In the literature on the very last page, there is a schematic that suggests that the buttons are·active-high on pins 4-7. I just got through the chapter in "What's a Microcontroller" on pushbuttons and wanted to try to do this on the LCD appmod but to no avail. Can anyone help?

Comments

  • Jon WilliamsJon Williams Posts: 6,491
    edited 2004-09-16 14:52
    The LCD AppMod buttons circuit is designed so that you can't short out a BASIC Stamp IO pin. If, for example, you output a low (ground) on P4 - P7 and press one of the buttons, then the 1K resistors will limit the current through the IO pin. When the pins are inputs, the level at the connection between the 1K and 10K resistors is still far greater than a "1" input level. I don't have the latest WAM book in my Dallas office, but I can tell you that you can use "active high" code with P4 - P7 without problems -- unless you want to use the LCD as well.

    If you want to use the LCD and the buttons, you should use the code that comes along with the AppMod (see the routine called LCD_Get_Buttons). This routine takes care of pin direction so that it can read the buttons (result is stored in Nib variable called "buttons") and then reset the pin directions so that the LCD can be written to again. Please note that the LCD AppMod demo code is carefully crafted and does work; start with it and build your own programs from what has already been tested.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
    Dallas Office
  • YujiYuji Posts: 2
    edited 2004-09-18 10:33
    Thanks, Jon. I think I have it now. I used the "LcdDirs = %0000" to make the pins inputs and used the "BUTTONS" command to track what was pressed. Then used "LcdDirs = %1111" to make the pins outputs again. I'm a bit new to this and it is making sense slowly. Thanks for the help.
  • ErnieErnie Posts: 20
    edited 2004-09-20 20:54
    The sample code LCD_AppMod_Demo.BS2 available on the Parallex web page for the LCD Terminal AppMod is a very uesfull example code for this device. While I don't own the appmod itself, I did breadboard the same circuit with another LCD device, using the same interface so the same code worked.

    There are plenty of examples of how to both write to the LCD and read the keys in that program. If you havn't tried it do so, well worth the time for the education.

    (Sorry to be a little late with this post)
Sign In or Register to comment.