Subscribe to EDN
RSS
Reprints/License
Print
Email

Drive 12 LEDs with one I/O line

Use a binary counter to generate LED-lighting codes.

Charaf Laissoub, Maisons Alfort, France; Edited by Martin Rowe and Fran Granville -- EDN, February 4, 2010

PDF

Several Design Ideas expand the I/O of a pin-limited microcontroller (reference 1 through 4). The circuit in this Design Idea uses an alternative method (Figure 1). It limits external additional parts to one IC, and it drives as many as 12 LEDs in dot-bar or bar-graph mode. You can use the same technique in a dot-bar design (Figure 2). If you need a seven-segment LED display, you can use the circuit in Figure 3, which shows how to rearrange the circuit according to a classic multiplexed, four-digit common-cathode display. The prototype display uses Kingbright’s SC52-11EWA high-efficiency LEDs, which emit 2000 to 5600 µcd at a forward current of 10 mA. The driver is a 12-stage NXP 74HCT4040 binary counter or a 74HC4040 version for a lower power supply.

 Read More
Design Ideas

Listing 1 contains an assembly-language routine. It generates a precise quantity, Q, of high-frequency pulses, which deliver the number, N, that the outputs of the 74HCT4040 require. The relations are Q=2N–1 in dot-bar mode and Q=2N–1 in bar-graph mode. Listing 2  is a full example of using this routine with Microchip’s PIC10F202, a member of the PIC10F series, which is the company’s most pin-limited microcontroller family.

Although the PIC’s internal unique clock frequency is 4 MHz, you’ll notice little flicker effect. You can reduce the flicker by using a midrange pin-limited PIC microcontroller, such as the PIC12F629, which has an internal clock frequency of 20 MHz. Listing 3 uses a look-up table to convert the desired number into seven-segment code to replace the 12 LEDs with a four-digit display.

 


References
  1. Anonymous, “Microcontroller provides low-cost analog-to-digital conversion, drives seven-segment displays,” EDN, May 10, 2007, pg 80.

  2. Raynus, Abel, “Squeeze extra outputs from a pin-limited microcontroller,” EDN, Aug 4, 2005, pg 96.

  3. Jayapal, R, PhD, “Microcontroller’s single I/O-port line drives a bar-graph display,” EDN, July 6, 2006, p 90.

  4. Lekic, Nedjeljko, and Zoran Mijanovic, “Three microcontroller ports drive 12 LEDs,” EDN, Dec 15, 2006, pg 67.

RSS
Reprints/License
Print
Email
Canon Resource Center

Featured Company


Most Recent Resources

Advertisement
Related Content

No related content found.

  • 0 rated items found.
Advertisement

KNOWLEDGE CENTER

Datasheets.com Parts Search

185 million searchable parts
(please enter a part number or hit search to begin)
Engineering Careers
Jobs sponsored by
Advertisement
About EDN   |   Site Map   |   Contact Us   |   Subscription   |   RSS
© 2011 UBM Electronics. All rights reserved.
Use of this Web site is subject to its Terms of Use | Privacy Policy

Please visit these other UBM Canon sites

UBM Canon | Design News | Test & Measurement World | Packaging Digest | EDN | Qmed | Pharmalive | Appliance Magazine | Plastics Today | Powder Bulk Solids | Canon Trade Shows