Shop OBEX P1 Docs P2 Docs Learn Events
Forcing a reset thru software — Parallax Forums

Forcing a reset thru software

Stan RalphStan Ralph Posts: 5
edited 2008-03-13 00:05 in BASIC Stamp
Is there any way, using odd coding that·one can "fool" the BS interpreter to "think" there's a problem requiring a hardware reset?

Comments

  • allanlane5allanlane5 Posts: 3,815
    edited 2008-03-12 22:57
    Have a "RESET:" label as the first label in your code.

    Then "GOTO RESET" somewhere.
  • Mike GreenMike Green Posts: 23,101
    edited 2008-03-12 23:14
    I don't understand what you mean by "fool" the BS interpreter and I don't understand "problem requiring a hardware reset".
    Please explain.

    There's no direct way from the Basic program to force a reset unless you connect an I/O pin to the reset pin (maybe with a series 1K resistor to protect the I/O pin from an errant HIGH statement or equivalent), then do a LOW for that pin which will force a hardware reset.

    You might try doing a RETURN without a matching GOSUB, but that's not a documented nor reliable way to force a reset.
  • UghaUgha Posts: 543
    edited 2008-03-12 23:58
    Has anyone tried what Mike said about tying an I/O pin to the reset pin?

    It'd be nice if I could get one of my stamps to reset another.
  • Mike GreenMike Green Posts: 23,101
    edited 2008-03-13 00:05
    If you try connecting the reset pin of one Stamp to an I/O pin of the same or another Stamp, do use a 1K series resistor.
    You're not supposed to connect the reset line to +5V or logic high.
Sign In or Register to comment.