Shop OBEX P1 Docs P2 Docs Learn Events
Dual color LED flasher - complete — Parallax Forums

Dual color LED flasher - complete

CapdiamontCapdiamont Posts: 218
edited 2008-10-21 01:50 in General Discussion
In my quest to see why I'm failing my DS1307 project. I decided to do a LED flasher. I had a two pack of dual color LED's. I used one, then couldn't resist making it multi colored. It simply turns on one side, pauses, turns on the other side, turns off the 1st side, pauses, turns off 2nd side, pauses, then repeats. This code uses the 4MHZ internal clock, works perfectly, self starts, pretty, and keeps going, and going..... with no problems.

However if I try running it off the external clock, it stops after a little bit. Sigh.

As it is, it is complete, so enjoy.

Oh, I forgot, wiring.

Center pin of LED goes to VDD.
Outside pins of LED each go through their own 470 ohm resistor to RB.0 or RB.1. I'm using 1/2 watt resistors, just because that is what Radio Shack had. Should be able to use 1/4 watt resistors.

I think I'll leave it running all night. Nice to have it running.

new code ZIP in this msg

Post Edited (Capdiamont) : 12/22/2008 8:06:16 PM GMT

Comments

  • CapdiamontCapdiamont Posts: 218
    edited 2008-10-20 16:24
    I will tell you... it was a beautiful sight to wake up and see it still flashing.
  • JonnyMacJonnyMac Posts: 9,214
    edited 2008-10-20 17:12
    I love dual-color LEDs; I recently wrote a little VP that lets the interrupt handle: off, solid red, flashing red, solid green, flashing green, solid yellow, and flashing yellow. With just two pins I get lots of information to the user.
  • CapdiamontCapdiamont Posts: 218
    edited 2008-10-21 01:50
    Very nice! I just wanted something to test, then expanded it a little. It is just so easy and fun.
Sign In or Register to comment.