Controlling 7-segments LED displays using AVR microcontroller

Summary of Controlling 7-segments LED displays using AVR microcontroller


This article outlines methods to control 7-segment LED displays with microcontrollers, comparing non-multiplexed and multiplexed configurations. It details direct I/O connections, shift registers like the 74HC595 for efficient output expansion, and driver ICs such as the 74LS247 or MAX7219. The text highlights a specific circuit using two displays controlled by five I/O pins with low power consumption, alongside downloadable code files for implementation.

Parts used in Controlling 7-segments LED Displays:

  • Microcontroller
  • 7-segment LED display (TDSL-5160 Vishay)
  • 74LS247 BCD-to-7-segments driver IC
  • 74HC595 shift register
  • NPN/PNP transistors
  • MAX7219 special driver IC

The many posibilities….
Non Multiplexed:
1. One or two displays directly to the i/o’s
2. One display with a 74LS247
3. Two displays with a 74HC595 and two 74LS247
Multiplexed:
1. Two displays with a 74LS247 and 2 i/o’s
2. Two displays with a 74HC595 and 2 NPN/PNP *
3. With a special driver IC e.g. MAX7219

Controlling two displays:
There are several possibilities to connect a 7-segments LED display to a microcontroller.
Directly to the i/o’s of the microcontroller, or a more economic way, with a shift-register e.g. the 74HC595 and multiplex the displays. With a shift register you only need 3 i/o’s and you have 8 outputs. Another possibility is the 74LS247 a BCD -> 7-segments driver IC, this takes 4 i/o’s. The diagram shows two 7-segments LED displays controlled by only 5 i/o’s. Ofcourse you can add more displays. With a minimum of components you’re able to control a maximum of displays. The circuit consumes about 20 mA with TDSL-5160 (Vishay) 7-segments LED displays.
two7segm
Download: upcounter.hex and upcounter.eep

For more detail: Controlling 7-segments LED displays using AVR microcontroller
 

Quick Solutions to Questions related to Controlling 7-segments LED Displays:

  • How can you connect displays directly to a microcontroller?
    You can connect one or two displays directly to the i/o's of the microcontroller.
  • What is an economic way to control multiple displays?
    A shift-register like the 74HC595 allows controlling displays with only 3 i/o's and 8 outputs.
  • Does the 74LS247 require many input/output pins?
    Yes, the 74LS247 BCD-to-7-segments driver IC takes 4 i/o's.
  • Can you add more displays to the circuit described?
    Yes, you can add more displays while maintaining a minimum of components.
  • What is the power consumption of the described circuit?
    The circuit consumes about 20 mA when using TDSL-5160 Vishay 7-segments LED displays.
  • How many i/o's are needed to control two displays with a 74HC595?
    With a 74HC595 and 2 NPN/PNP transistors, you can control two displays.
  • What component takes 4 i/o's according to the text?
    The 74LS247 is the component that takes 4 i/o's.
  • Is it possible to use a special driver IC for this project?
    Yes, you can use a special driver IC such as the MAX7219.

About The Author

Ibrar Ayyub

I am an experienced technical writer holding a Master's degree in computer science from BZU Multan, Pakistan University. With a background spanning various industries, particularly in home automation and engineering, I have honed my skills in crafting clear and concise content. Proficient in leveraging infographics and diagrams, I strive to simplify complex concepts for readers. My strength lies in thorough research and presenting information in a structured and logical format.

Follow Us:
LinkedinTwitter
Scroll to Top