BS2 resetting
Hello,
·I'm using a BS2 "Board of Education" for my project. When I send a HIGH command to P14 the LED lights but flashes or resets about every two seconds. Why doesn't the LED just stay on?
Thanks,
John
·I'm using a BS2 "Board of Education" for my project. When I send a HIGH command to P14 the LED lights but flashes or resets about every two seconds. Why doesn't the LED just stay on?
Thanks,
John
Comments
Please post your schematic and a listing of your code using the Attachment Manager.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
························ Craig Eid
··········· Triad Research and Development
Electical Engineering Design and Consulting Services
··················· www.TriadRD.com
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Mike2545
This message sent to you on 100% recycled electrons.
The BS2 outputs 13 & 14 drive the LED's thru a 470 Ohm resistor. In the future I'll use the BS2 output to drive a TIP which will drive the relays.
Here's the code:
'What's a Microcontroller - LedOnOff.bs2
'Turn LED/Relays on with timed delay then hold them in on state till power is switched off.
' {$STAMP BS2}
' {$PBASIC 2.5}
DEBUG "Delayed turn on of two relays!"
DEBUG "Wait 1/2 second to turn on R1"
PAUSE 500
DEBUG "Turn on R1"
HIGH 14
DEBUG "R1 is on"
DEBUG "Wait 5 Seconds to turn on R2"
PAUSE 5000
DEBUG "Turn on R2"
HIGH 13
END
Thanks for your help,
John
I tried switching from a 9V to a 5V power supply. I'm using the "brick" type of power supply. No help...
Thanks,
John
Does the second LED, attached to I/O pin 13, also flash? The 2 LED's should draw approximately 5mA each with·a 470 ohm resistor so you shouldn't be exceeding the BOE current limit. I suspect that you are not supplying sufficient current to the LED's. Try adding a second 470 resistor in parallel to the 470 resistor·attached·to I/O pin 14 and post your results.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
························ Craig Eid
··········· Triad Research and Development
Electical Engineering Design and Consulting Services
··················· www.TriadRD.com
Yes, the LED from I/O pin 13 also flashes. No help with the 470 ohm in parallel. Both LED's flash about every 2 seconds but not until the program runs out. The program appears to be running correctly. If I disconnect the LED from pin 13 the pin 14 LED still flashes about every 2 seconds. Could this be the WDT timing out or resetting.
Thanks,
John
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
- Stephen
You are correct, the STOP command did the trick.
Thanks everyone for you help!
John