Shop OBEX P1 Docs P2 Docs Learn Events
MY BS2-IC Is Blinking , is that common — Parallax Forums

MY BS2-IC Is Blinking , is that common

AMROSAMROS Posts: 2
edited 2009-03-16 14:27 in BASIC Stamp
Hello All ,

I have a problem here , when i am connecting anything to an output pin , an LED for example , and when turning the pin HIGH , the LED is on for 7-10 sec. then it blinks ( turn LOW ) for a n instance then back to HGIH again and so on



Is that common ? can i prevent it ?



Thanks

Amr

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2009-03-15 00:17
    You're probably setting the pin HIGH, then using a STOP or END statement (or letting the program run off the end). This puts the Stamp into a low power stop mode, but a side effect of this mode is that the Stamp resets briefly every few seconds. During that brief reset, all output pins get set to input mode. The manual discusses this under STOP or END. You can prevent this by leaving the Stamp running at the end. Put a "hang: GOTO hang" as the last statement in your program (before any subroutines).
  • PJAllenPJAllen Banned Posts: 5,065
    edited 2009-03-15 00:29
    From PBASIC Help:

    STOP prevents the BASIC Stamp from executing any further instructions until it is reset. The following actions will reset the BASIC Stamp:
    1. Pressing and releasing the RESET button on the development board.
    2. Driving the RES pin low then letting it float (high).
    3. Downloading a new program.
    4. Disconnecting then reconnecting the power.

    STOP differs from END in two respects:
    1. STOP does not put the BASIC Stamp into low-power mode. The BASIC Stamp draws just as much current as if it were actively running program instructions.
    2. The output glitch that occurs after a program has been halted with END does not occur after a program that uses STOP.
  • AMROSAMROS Posts: 2
    edited 2009-03-16 14:27
    thank you
Sign In or Register to comment.