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?


  • A New Design Inflection Point
  • Forecasting Industry Growth For 2009 And Beyond
  • EDA Retools To Exploit Multicore Architectures
  • Design And Verification Move Up In Abstraction
  • EDA Retools To Exploit Multicore Architectures
  • A New Design Inflection Point
  • Design And Verification Move Up In Abstraction
  • Challenges Lurk For 22-nm Physical Implementation
    1) Build A Smart Battery Charger Using A Single-Transistor Circuit
    (258 views today)
    2) 2008 BEST Electronic Design Winners
    (106 views today)
    3) What's All This Transimpedance Amplifier Stuff, Anyhow? (Part 1)
    (91 views today)
    4) 1-A Switching Regulators Operate With 96% Efficiency To Replace Linear Regulators
    (91 views today)
    5) Microcontroller-Based Sine-Wave Generator Has Crystal Accuracy
    (87 views today)
    ALL TOP 20







    Reader Comments

    I think it is a good thing

    Radu Stancu -March 12, 2004

    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.
     
     

    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