Shop OBEX P1 Docs P2 Docs Learn Events
Simple Circuit - LED on RES line? — Parallax Forums

Simple Circuit - LED on RES line?

MorrolanMorrolan Posts: 98
edited 2007-10-29 17:51 in General Discussion
Is there a way to have a status LED on the RES line of a BS2? I know that RES is tied high internally and you pull it to ground to reset, but what is a good way to show the status of a currently running stamp?

I've found that a momentary RESET still leaves 5v on VDD so you can't use that, VIN is no good as that relies on turning the power OFF at the source?

Please help me with a simple status LED?


Many Thanks in advance,
Morrolan

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Flying is simple. You just throw yourself at the ground and miss.

"I think computer viruses should count as life. I think it says something about human nature that the only form of life we have created so far is purely destructive. We've created life in our own image."
Stephen Hawking

Comments

  • Steve JoblinSteve Joblin Posts: 784
    edited 2007-10-29 13:41
    I would put a set of commands in the begining of my program that blinked an LED three times, then left it lit continuously. Once your program is running, if you see the LED go out, then blink three times, you know that your program has just started over, which is indicative of a reset occuring.

    Another approach is to use a piezospeaker that emits a tone for a few seconds at the begining of the program... same concept... Once your program is running, if you hear the tone again, you know that your program has just started over, which is indicative of a reset occuring.
  • MorrolanMorrolan Posts: 98
    edited 2007-10-29 14:05
    Thanks for the quick response - I think I'll make use of a couple of spare pins and flash an LED 3 times red, then light it continuously as green. I have some bi-colour LED's so there is very little change to my circuit required smilewinkgrin.gif

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Flying is simple. You just throw yourself at the ground and miss.

    "I think computer viruses should count as life. I think it says something about human nature that the only form of life we have created so far is purely destructive. We've created life in our own image."
    Stephen Hawking
  • Steve JoblinSteve Joblin Posts: 784
    edited 2007-10-29 17:15
    I think you got the idea... the point is to take some type of action once and only once at the start of a program. If you see the action occur when the Stamp is running, you know it just browned out and reset itself. Happy Stamping!
  • MorrolanMorrolan Posts: 98
    edited 2007-10-29 17:51
    Yeah, it was a 3am type of idea, and I was tired and didn't think of adding some code at the beginning of my program!

    freaked.gif

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Flying is simple. You just throw yourself at the ground and miss.

    "I think computer viruses should count as life. I think it says something about human nature that the only form of life we have created so far is purely destructive. We've created life in our own image."
    Stephen Hawking
Sign In or Register to comment.