Hardware-Based LED Blinking Control Eliminates Software Overhead

Sept. 27, 2007
LEDs are often used on manmachine interfaces (MMIs) or device front panels to illuminate switches or backlight text information so that the user knows what the device is supposed to be doing at the time. Occasionally, the designer wants

LEDs are often used on manmachine interfaces (MMIs) or device front panels to illuminate switches or backlight text information so that the user knows what the device is supposed to be doing at the time. Occasionally, the designer wants these LEDs to start blinking at a particular rate to alert the user to a condition needing attention, such as a low battery.

Many devices use embedded microprocessors or microcontrollers to handle the MMI, along with all other command and control functions for the device. The simple task of causing the LED to blink may add undesired overhead to the software design. However, this task can easily be offloaded to hardware by using the following technique.

Memory-mapped hardware-control registers are commonly used to turn multiple LEDs on or off with one instruction. Similarly, memory-mapping a "blink-control" register can set a mask to control which LEDs should be blinking at any particular time, if the output of each bit of that register gates a low-rate (i.e., 1-Hz) clock signal for blink timing. By connecting the gated signal to the LED using a tri-state buffer that's enabled via the LED control signal, the LED can be turned on, off, or on-blinking (Fig. 1). If the blink function isn't needed, an LED can simply be turned on or off using the simplified circuit in Figure 2.

Sponsored Recommendations

Highly Integrated 20A Digital Power Module for High Current Applications

March 20, 2024
Renesas latest power module delivers the highest efficiency (up to 94% peak) and fast time-to-market solution in an extremely small footprint. The RRM12120 is ideal for space...

Empowering Innovation: Your Power Partner for Tomorrow's Challenges

March 20, 2024
Discover how innovation, quality, and reliability are embedded into every aspect of Renesas' power products.

Article: Meeting the challenges of power conversion in e-bikes

March 18, 2024
Managing electrical noise in a compact and lightweight vehicle is a perpetual obstacle

Power modules provide high-efficiency conversion between 400V and 800V systems for electric vehicles

March 18, 2024
Porsche, Hyundai and GMC all are converting 400 – 800V today in very different ways. Learn more about how power modules stack up to these discrete designs.

Comments

To join the conversation, and become an exclusive member of Electronic Design, create an account today!