Shop OBEX P1 Docs P2 Docs Learn Events
Fried my BS2? — Parallax Forums

Fried my BS2?

orjonorjon Posts: 2
edited 2010-11-04 09:01 in BASIC Stamp
Hello,

I'm pretty new to all this and have been struggling recently with a rather strange problem, possibly a result from having over-loaded my BS2.

As a test I have the following code to turn some LED's on and off;

' {$STAMP BS2}
' {$PBASIC 2.5}

led VAR Byte


DO

FOR LED = 0 TO 3
HIGH LED
PAUSE 1000
LOW LED
PAUSE 50
NEXT

LOOP




the LED's have 470 ohm resistors attached.

The code loads fine, and runs smoothly at first, then starts to speed up or slow down, the latter LED's stop working, followed by the first led blinking on it's own and eventually nothing happens at all!

I guess I've answered my own question - it's buggered right?

Can anyone please tell me if this sounds like the type of damage possible form overloading a BS2 with too many led's (7sed displays)?

thank you, orjon.

Comments

  • Tom WalkerTom Walker Posts: 509
    edited 2005-09-19 19:49
    Try declaring LED as a PIN instead of a byte and see what happens. (It appears that you are trying to cycle through 4 LEDs...what is your reference to "7sed displays"?...unless you are referring to 7-segment displays - in which case we would need a schematic or better explanation in order to effectively help...)

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Truly Understand the Fundamentals and the Path will be so much easier...
  • orjonorjon Posts: 2
    edited 2005-09-19 20:03
    Tom

    thanks for the speedy reply.... "LED var PIN", if that's what you meant, returned with a "Expected a variable", so I've simplified the code to the following and still the same things happens. For this simple test program I'm using just four normal LED's and four 470 resistors;

    ' {$STAMP BS2}
    ' {$PBASIC 2.5}

    DO

    HIGH 0
    PAUSE 1000
    LOW 0
    PAUSE 50

    HIGH 1
    PAUSE 1000
    LOW 1
    PAUSE 50

    HIGH 2
    PAUSE 1000
    LOW 2
    PAUSE 50

    HIGH 3
    PAUSE 1000
    LOW 3
    PAUSE 50

    LOOP

    - Please note, the stamp doesn't do the same thing every time - but sure enough it doesn't work properly every time.

    I mentioned the 7 segments only because I think I over loaded (and broke) the bs2 when trying to make a 4 digit, 7 segment clock without multiplexing....

    -o.
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2005-09-19 22:11
    Does the BS2 get hot when this happens?· The code works fine here.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
    csavage@parallax.com
  • allanlane5allanlane5 Posts: 3,815
    edited 2005-09-20 13:06
    What are you powering this thing with? This almost sounds like weak batteries -- they provide power at first, then the voltage slowly drops, finally going too low and the BS2 resets.
  • EverQuriousEverQurious Posts: 48
    edited 2010-11-03 23:45
    I agree that this does sound like a low voltage supply problem. I have had the BS2 do all kind of weird things if the voltage drops too low, even if it does not totally reset. I would try a fresh battery to see if this solves your problem. I use a Homework Board from the "Whats a Micro-controller" kit on my bot. I replaced the 9 volt transistor battery with a 6 C cell battery pack to increase current and battery life. Hope this helps. If not may your BS2 REST IN PEACE. :)
  • CampeckCampeck Posts: 111
    edited 2010-11-04 04:58
    To properly declare a pin with a name use:
    (pin name) PIN (pin number)

    LED1 PIN 0
    LED2 PIN 1
    LED3 PIN 2
  • PJAllenPJAllen Banned Posts: 5,065
    edited 2010-11-04 09:01
    Campek, EQ,
    This Subject/Thread died on the vine -- 5 years ago.
Sign In or Register to comment.