Shop OBEX P1 Docs P2 Docs Learn Events
Programs won't run on Basic Stamp 2 — Parallax Forums

Programs won't run on Basic Stamp 2

CHOCHO Posts: 7
edited 2008-01-16 22:16 in BASIC Stamp
Hi Everybody,

I am using a Basic Stamp 2 with a Super Carrier Board. I have soldered 16 LEDs onto the board, and i want to light up the LEDs one at a time in a sequence.

Everything seems to work fine for my BS2 (connecting to pc, downloading programs,etc.) until a certain point. The programs will never run after I have downloaded them. The Editor would even say the program was successfully downloaded.

Before I soldered any LEDs onto the board, I tried the program below (just by holding a LED onto the I/O pin)


main:

high 5
pause 1000
low 5
pause 1000

goto main


This worked fine, and I could see the LED blinking.
My problem is now, after I have soldered the LEDs on, programs will not run from the BS2.
I would be very grateful if someone could help me as I am new to this.

Comments

  • allanlane5allanlane5 Posts: 3,815
    edited 2008-01-15 17:00
    You don't mention any "current limiting resistors" in your LED lines. An LED requires a 220 ohm or so "current limiting resistor" to keep the current though it from burning out the LED.

    They DO make LED's with internal current limiting resistors -- hopefully, that's what you have.

    Note, you cannot light all 16 LED's at the same time -- even WITH the proper current limiting resistor each LED takes about 12 mA, and the total current the BS2 can drive is about 40 mA. But you do say you're lighting them one at a time, so this shouldn't be an issue.

    You don't say how you're powering the BS2 -- a 12 mA load will drain a 9-volt battery pretty quickly.

    It's also possible you've put the LED's in backwards -- they only work when current flows from the Anode to the Cathode.
  • CHOCHO Posts: 7
    edited 2008-01-15 17:03
    Each of my LEDs has a 470 ohm resistor. Plus, as I have mentioned above, I do not plan to light them at the same time. Only ONE at a time and maximum of TWO at a time.
    I am also using a 12v wall socket adapter.
  • J T EngineerJ T Engineer Posts: 5
    edited 2008-01-15 17:18
    Hi, I would like to say if you have seen everything working properly ( every LED lighting up ) before soldering, then resolder everything. Make sure there isnt any cold solders. Since its already small current that flows through, a small imperfection in solder would hinder any current. Before you resolder, retest the LEDs, maybe during the soldering process you could have also burned out one from excessive heat. Thanks hope everything goes good.
  • CHOCHO Posts: 7
    edited 2008-01-15 17:28
    Thanks for the advice. I have already retested every LED, and they all seem to be working.
  • J T EngineerJ T Engineer Posts: 5
    edited 2008-01-15 17:34
    So you said initially after downloading the program and running it, all the LEDs worked as you wanted it. But after soldering it, some didnt work? I mean if thas the case, and since you retested the LEDs, why dont you go ahead and rerun the program without the LEDs soldered once more to confirm its not a program issue and then if thats successful continue to resolder it again carefully. Keep me posted. Thanks
  • CHOCHO Posts: 7
    edited 2008-01-15 17:35
    Once again, thanks for the advice. I will try that as soon as I can.
  • allanlane5allanlane5 Posts: 3,815
    edited 2008-01-15 18:27
    A standard 'debug' technique is to put:

    DEBUG "Running", CR

    at the start of your program. This then puts a message on your 'debug' terminal in the IDE that the program IS in fact running, despite not blinking the LED's.

    If this is your own board, it's also possible you're holding the BS2 in 'RESET'. Is it your own board?
  • CHOCHO Posts: 7
    edited 2008-01-15 19:44
    I am using a Super Carrier Board form Parallax.
  • Bruce BatesBruce Bates Posts: 3,045
    edited 2008-01-15 19:58
    CHO -

    Since you are apparently now using a different PBASIC program than what you originally used, could you attach a copy of it, using the Download Manager, to your next post to this forum. Perhaps there is something in there which will give us a clue, and enable us to better assist you.

    Regards,

    Bruce Bates

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
  • CHOCHO Posts: 7
    edited 2008-01-15 20:06
    Oh, I am not using a different program than before. I tried the exact same PBASIC program that I have always used (the one in the first post) for both times. This still did not work. Thanks.
  • CHOCHO Posts: 7
    edited 2008-01-16 22:16
    THANK YOU guys for all of the advice, and I have finally found out the problem. I accidentally soldered the negatives of the LEDs onto the wrong spot of the board. I know this is a very amateur mistake, but after all this is my first time doing anything like this. Once again, thank you all for the help.
Sign In or Register to comment.