Tuesday, December 2, 2008

LED 7-Segment Multiplexing

In my first Digital Clock, I use 6 pcs. of CD4543,BCD to 7-Segment decoder, to drive 6 digit LED 7-Segment display for the sake of simplicity of the software. However, the hardware needs many components. As you can see in the post, the PCB of the clock is quite big and containing a lot of solder points. To reduce the number of components, I will integrate the function of CD4543 into the firmware. One digit requires 7 connections (wires) for all segments and 1 connection for common cathode (or anode). If I connect 6 digits to the MCU without any modification, I will need 7-segment x 6 digit = 42 connections . That means I need to use MCU with atleast 42 I/O pins. As you know, it is a waste for using a lot of MCU pins just for display. The required pins can be reduced dramatically by using a technique called Multiplexing.


Multiplexing technique is based on the idea of Persistence of vision of the human eyes. The sample schematic of 3 digits multiplexing is shown below. Segment a-g of each digit are connected together. Each digit is switched on-off by controlling signal at Digit 1, Digit 2 and Digit 3. For example, if Digit 1 is '1' , Digit 1 will be on. If Digit 1 is '0', Digit 1 will be off. People will see all 3 digits display in the same time if each digit switch on and off fast enough.

Led 7-Segment multiplexing
By using multiplexing technique the number of required connections for 6 digits display is reduced from 42 pins to 7-Segment+6 digits = 13 pins Wow!! I can drive 6 digits 7-segment display by using just a PIC16F627A.
Next time, I will post the program for LED 7-Segment Multiplexing

--- Updated 21 Dec 2008 --
The program for LED 7-Segment Multiplexing is now posted at 6 Digits LED 7-Segment Multiplexing


Nicolas said...

You could do better using the CMOS BCD-to-7-sement latch + the multiplexing.. and you reduce alot of your pin.. There you go

punkky said...

Thank you for your suggestion. I have been thinking about it and will post the update soon.

Raj said...

Nice! Here is the similar stuff I did.

Saqib said...

Thanks for this beautiful blog. Do you have knowledge of BASIC language for microcontrollers? If yes, then kindly upload a program that can run this multiplexed display.

Cindy Dy said...

So happy to be given a privilege to post a comment here. You have a wonderful site. Thank you for the effort to publish this.


Leslie Lim said...

This is really an interesting topic. Congratulations to the writer. I'm sure a lot of readers having fun reading your post. Hoping to read more post from you in the future. Thank you and God bless!