Shop OBEX P1 Docs P2 Docs Learn Events
simple question — Parallax Forums

simple question

lockadoclockadoc Posts: 115
edited 2008-09-10 03:48 in BASIC Stamp
I would like to know how to force a reset inside my code,or how can I make the code restart at the begining.

Comments

  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2008-09-09 01:35
    Hello,

    You can either put a label at the beginning of the code and use a GOTO to get to it, or you can connect and I/O pin through a 220 ohm resistor to the /RESET pin and drive it LOW when you want to reset.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Engineering
  • ercoerco Posts: 20,256
    edited 2008-09-09 02:52
    Or flip the power switch off then on after a few seconds.

    Like so many other situations, "jiggle the handle".

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ·"If you build it, they will come."
  • leetmanleetman Posts: 11
    edited 2008-09-10 03:48
    If you want a reset to be initiated through software and no touching it, I would do what Chris Savage said: connect the Res terminal to an I/O pin with a 220 ohm resistor in series. A GOTO label is good, but you might want to force a hardware reset and the above method would be the easiest and the most effective IMO.
Sign In or Register to comment.