Shop OBEX P1 Docs P2 Docs Learn Events
BS1 LED Blink problem — Parallax Forums

BS1 LED Blink problem

Chicago MikeChicago Mike Posts: 88
edited 2005-09-06 00:28 in BASIC Stamp
Hello! I'm new to the BS1, and this seems rather simple... I'm playing around with the BS1, and have found that when I build a very simple circuit of a 470Ohm resistor, and LED attached to Pin 2 (Or any pin for that matter), that when I set the pin HIGH it works, but I notice a blink every few seconds. (Like theres a lose connection). I've changed every component, and the battery,·and even used a different BS1 thinking that perhaps I had a damaged one, with no avail.

Is this latency a problem with timing in the BS1? Is this normal? I've never seen an issue like this is the BS2. Below is my real simple code.

' {$STAMP BS1}
' {$PBASIC 1.0}
HIGH 2
END

Any help would be great! Thanks,
Mike.
·

Comments

  • dandreaedandreae Posts: 1,375
    edited 2005-09-02 17:13
    What you are seeing is the 18ms refresh rate, if you put it in a loop it·should stop this from happening.

    Dave

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Dave Andreae

    Tech Support
    dandreae@parallax.com
    Http://www.parallax.com



    Post Edited (Dave Andreae (Parallax)) : 9/2/2005 5:20:42 PM GMT
  • Jon WilliamsJon Williams Posts: 6,491
    edited 2005-09-02 17:44
    What you're seeing is the normal behavior of the BASIC Stamp watchdog timer (refer to END in the manual or help file).· You can prevent this behavior by keeping the program moving:

    Main:
    · HIGH Led

    The_End:
    · GOTO The_End

    The GOTO instruction runs in an infinite loop, resetting the watchdog timer every time it runs.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
  • Chicago MikeChicago Mike Posts: 88
    edited 2005-09-06 00:28
    Great Thanks!
Sign In or Register to comment.