|
Jump to navigation
Multiplex LEDs with Fewer I/O Pins
06/12/07
Multiplexing an LED display is a great way to cut down on the number of I/O pins you need to use on your microcontroller, etc. to drive the display. If you are using standard common-cathode 7-segment numeric displays, for example, you would hook the CC from each digit to a separate I/O pin, then connect each group of like-segments to their own I/O pin. If you had 5 digits, you would need 12 I/O pins instead of the 36 you would need if you connected each LED separately.
The great thing about LEDs is that since they are diodes they only light when the current flows in one direction. You can use this fact to cut your I/O pin count down even further. In our 5-digit example above you would only need 8 pins! Normal Multiplexing: ![]()
This method is sometimes called "Charlieplexing", named after the fellow (Charlie Allen) over at Maxim who wrote an application note about it. ![]() The trick lies in the fact that each I/O pin on your microcontroller can be driven high, low or Hi-Z. Each pin can be used to drive a group of segments and a digit's common cathode (or anode), depending on its polarity. Just drive the right combinations of pins high, low or Hi-Z (set it as an input) to light the desired segment. For our example the combinations would look like this:
Note: Set pins not listed as High or Low as inputs (Hi-Z). Your schematic will look different depending on how many digits/segments you are driving. Here are the basic steps for creating your schematic:
That's it! You are still multiplexing your display, lighting it one digit at a time, but you are using the power of the diode to do it using fewer pins. Did you find this article interesting or useful? Why not subscribe to the Modd3d RSS Feed?
Category: Electronics
Posted by:
Scott
 
http://www.modd3d.com/articles/item/multiplex-leds-with-fewer-io-pins Comments
This is great thanks for the info
Posted by David on 04/10/09 at 18:26:06
No problem. Glad it helped!
Posted by Scott on 04/17/09 at 00:06:33
Posted by wow gold on 07/16/09 at 19:19:08
Sorry this is a dumb question, but is the CC just ground?
Posted by Nathan on 08/03/09 at 17:46:06
CC = Common Cathode. It's the negative that all the LEDs share inside each display package.
Posted by Scott on 08/05/09 at 19:43:54
Great description and diagrams of LED multiplexing. I can say I almost understand what's happening now, after looking at other sites blankly for half an hour. Thanks :)
Posted by Jez on 08/09/10 at 15:33:42
Add Comments |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
  Powered by Nucleus   |   All contents copyright © 2006-2008, Division 6. All rights reserved. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||