Shop OBEX P1 Docs P2 Docs Learn Events
sharing LCD connections — Parallax Forums

sharing LCD connections

ArchiverArchiver Posts: 46,084
edited 2002-01-08 19:24 in General Discussion
I've got a lcd hooked up to my BS2p using seven pins, and it works just fine,
and in the manual it says that "only the Enable pin needs to remain dedicated
to the LCD and the other pins can be shared with other devices if wired
carefully". I'd like to hook the six "shareable" pins into a keypad matrix to
have nine buttons, but I'm unsure if that would fry the LCD or not, or if the
10k pulldown resistor at the stamp pin would make the LCD not function?

Also, I'm worried that when the LCD is being written to, that a pressed button
might mess it up. One solution might be to have a stamp pin provide the the
keypad matrix with +5 so I can control when the keypad is activated. Can a
single stamp pin's output be used for a keypad since there is no load?

Thank you all,
stewart


--
Stewart Mayer, stewlist@k... on 01/08/2002

Comments

  • ArchiverArchiver Posts: 46,084
    edited 2002-01-08 16:41
    Scott Edwards designed a BS1 application some time ago that allowed the Stamp
    to share the LCD data lines. It worked by pulling these lines up to +5v
    through 10K resistors. The normally open buttons were connected to ground
    through 1K resistors. The 1K resistors are CRITICAL -- they protects the
    Stamp.

    When the lines are made inputs the Stamp with see +5v (1) with the button
    open and about 0.45v (0) when the button is pressed.

    Even if a button stays pressed, the correct data will be sent to the LCD.
    When a data pin goes high the five volts will be "felt" across the 1K and the
    Stamp pin will be protected (sourcing about 5 mA). When the pin goes low, it
    will sink about 0.5 mA through the 10K.

    When using this scheme with the BS2p, I would be inclined to manually make
    all of the button pins inputs before scanning them. You can easily do this
    by clearing the required bits in the DIRS register.

    Hope this helps.

    -- Jon Williams
    -- Applications Engineer, Parallax


    In a message dated 1/8/02 10:10:06 AM Central Standard Time,
    stewlist@k... writes:


    > I've got a LCD hooked up to my BS2p using seven pins, and it works just
    > fine,
    > and in the manual it says that "only the Enable pin needs to remain
    > dedicated
    > to the LCD and the other pins can be shared with other devices if wired
    > carefully". I'd like to hook the six "shareable" pins into a keypad matrix
    > to
    > have nine buttons, but I'm unsure if that would fry the LCD or not, or if
    > the
    > 10k pulldown resistor at the stamp pin would make the LCD not function?
    >
    > Also, I'm worried that when the LCD is being written to, that a pressed
    > button
    > might mess it up. One solution might be to have a stamp pin provide the
    > the
    > keypad matrix with +5 so I can control when the keypad is activated. Can a
    > single stamp pin's output be used for a keypad since there is no load?
    >
    >




    [noparse][[/noparse]Non-text portions of this message have been removed]
  • ArchiverArchiver Posts: 46,084
    edited 2002-01-08 17:29
    Sounds like a very nice solution. Thank you. Do you think that the R/W and RS
    lines can also be used in this manner like the data lines?

    Stewart

    On Tue, 8 Jan 2002 11:41:50 EST, jonwms@a... wrote:
    >Scott Edwards designed a BS1 application some time ago that allowed the Stamp
    >to share the LCD data lines. It worked by pulling these lines up to +5v
    >through 10K resistors. The normally open buttons were connected to ground
    >through 1K resistors. The 1K resistors are CRITICAL -- they protects the
    >Stamp.
    >
    >When the lines are made inputs the Stamp with see +5v (1) with the button
    >open and about 0.45v (0) when the button is pressed.
    >
    >Even if a button stays pressed, the correct data will be sent to the LCD.
    >When a data pin goes high the five volts will be "felt" across the 1K and the
    >Stamp pin will be protected (sourcing about 5 mA). When the pin goes low, it
    >will sink about 0.5 mA through the 10K.
    >
    >When using this scheme with the BS2p, I would be inclined to manually make
    >all of the button pins inputs before scanning them. You can easily do this
    >by clearing the required bits in the DIRS register.
    >
    >Hope this helps.
    >
    >-- Jon Williams
    >-- Applications Engineer, Parallax



    --
    Stewart Mayer, stewlist@k... on 01/08/2002
  • ArchiverArchiver Posts: 46,084
    edited 2002-01-08 19:24
    In a message dated 1/8/02 11:27:29 AM Central Standard Time,
    stewlist@k... writes:


    > Sounds like a very nice solution. Thank you. Do you think that the R/W and
    > RS
    >

    Yes. The only line that can't be shared is the Enable line since a pulse on
    that line causes the LCD to look at the RS, R/W and data lines.

    -- Jon Williams
    -- Parallax


    [noparse][[/noparse]Non-text portions of this message have been removed]
Sign In or Register to comment.