Reprints     Printer-Friendly    Email this Article    RSS        Font Size     What's This?

[Ideas For Design]
DOWNLOAD THE CODE:
7166.zip


Get A Dual-Programmable LED Flasher "For Free"



Abel Raynus  |   ED Online ID #7166  |   February 2, 2004

Article Rating: Not Rated

There are many ways to design LED flashers using transistors, op amps, 555 timers, or even relays. And specialized ICs exist for driving LEDs, such as the LX1990...93 from Microsemi Integrated Products. But all of these approaches need extra hardware, meaning extra cost and space on the pc board.

When a design already uses a microcontroller (MCU), it would be beneficial to build an LED flasher exclusively in software—without using any external components. Such a solution is extremely flexible. You can program any period and duration of flashing, ranging from a fraction of a second to hours. In the case of two or more LEDs, you can choose any sequence of lighting: blinking together, one by one, etc. You would only require one or several vacant MCU pins.

Any MCU can be employed. In our design, we used the 8-bit low-end MC68HRC908JK1 from Motorola (see the figure). According to the project requirements, the flasher can generate two sequences determined by the switch, SW. When the switch is closed, LED1 and LED2 should flash simultaneously at a one-second rate. When the switch is open, they alternate flashing at the same rate. The LEDs are LTL-4231T-R1, with a built-in resistor from LiteOn.

The timer interrupt service routine (TISR) is available in the online version of this Design Brief at www.elecdesign.com. The TISR doesn't interfere with the main MCU program because it only takes about 30 µs (with fOSC = 4.85 MHz ) to be executed. Slightly modifying the program can supply any other flashing time rate and sequence—for example, the "running light."




Reprints     Printer-Friendly    Email this Article    RSS        Font Size     What's This?


  • Network-On-Chip Tools Arrive for The Masses
  • Tackling System Design Challenges Through Early Verification
  • ESL Tools Take Center Stage As Designers Move Up
  • Parasitic Extraction Tool Targets Next-Generation Custom ICs
  • Synopsys Jumps Into ESL-Synthesis Pool
  • Verify Control Systems Before Committing To Hardware
  • You're Using How Many FPGAs?
  • Tool Up For The FPGA Blitz
    1) Build A Smart Battery Charger Using A Single-Transistor Circuit
    (185 views today)
    2) Hot Hands For Some Cool Rock: Motion Sensing Meets Audio Engineering
    (169 views today)
    3) Adjustment-Free Fan Controller For Under $1
    (114 views today)
    4) What's All This Transimpedance Amplifier Stuff, Anyhow? (Part 1)
    (109 views today)
    5) Science Fiction Meets Science Fact In Today's Robot Research
    (109 views today)
    ALL TOP 20







    POST YOUR COMMENTS HERE

    Name:

    Email:
    Rate this article:

     less useful more useful 
    1
    2
    3
    4
    5
    Your Comments:

    Enter the text from the image below




    Please refresh the page if you have trouble reading this text.
    (Acceptable Use Policy)
     
     

    PartFinder

    Find real-time pricing, stock status, same-day/next-day shipping options and more. Brought to you by Digi-Key. Go to PartFinder.    
    GlobalSpec

    PART SEARCH :
    Powered by: GlobalSpec - The Engineering Search Engine
    Sponsored Links

    Electronic Design Europe Electronic Design China EEPN Power Electronics Auto Electronics Microwaves & RF
    Mobile Dev & Design Schematics Find Power Products Military Electronics EE Events Related Resources