Shop OBEX P1 Docs P2 Docs Learn Events
Problems with pin0 on bs2 — Parallax Forums

Problems with pin0 on bs2

TimmyTimmy Posts: 10
edited 2005-06-06 10:49 in BASIC Stamp
g'day everyone,

I have been trying to get my stamp to count pulses on pin0 and display them on my comp through a debug terminal. after much frustration thinking it was my code, i referred to the article in stamp works www.parallax.com/dl/docs/books/sw/exp/sw17.pdf and used the example circuit and code. however, i was still unable to receive pulses on pin0. Just out of curiosity from many hours of self troubleshooting, i decided to change the pin that was counting pulses to pin1 in the code and my circuitry and it worked! It also works for all other pins except pin0. Is my pin0 dead?? it works fine as an output.

tim

Comments

  • HansHans Posts: 12
    edited 2005-06-05 09:19
    Hi Tim,

    Yes, it looks like pin0 is dead. It could very well be static that damaged your
    stamp. I'm talking from experience here. I had a perfectly good working stamp
    connected to an LCD. Suddenly, after picking up the experimental board, it
    stopped working. Turned out three pins were damaged. I can still use them
    as an output, but reading pulses with them does not work anymore. In fact,
    I think sending pulses (like using it to talk to an LCD screen) is also not
    working. But I use them now to drive LED's and a buzzer.

    Static kills.

    Hans
  • Jon WilliamsJon Williams Posts: 6,491
    edited 2005-06-05 17:28
    There is indeed separate input and output circuitry on each pin -- this is the reason we put 220-ohm resistors inline with the pins on many of our products; it protects the pin from the damage caused by a direct short circuit.

    Just to be sure, connect the circuit I've attached and run this little program:

    Main:
    · DEBUG HOME, "Pin 0 = ", BIN1 IN0
    · PAUSE 50
    · GOTO Main

    When the button is not pressed the screen should say "Pin 0 = 1" and when you press the button it should say "Pin 0 = 0"

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
    290 x 284 - 10K
  • TimmyTimmy Posts: 10
    edited 2005-06-06 10:49
    Unfortunately it didn't work.
    Its a shame too, cos I haven't hadmy stamp long. Plus I am well aware of the dangers of static discharge and dead shorts on chips and the precautions required from the work i do for a living.

    thanks for your help guys
Sign In or Register to comment.