How To Handle 12 LED’s Utilizing Four Microcontroller Pins
If you have ever completed any electronics prior to you will almost certainly be acquainted with multiplexing but charlieplexing adds a new dimension. It really is a strategy commercially created at Maxim by Charlie Allen therefore the name but you can nevertheless use the technique in your own circuits.
Notice: The real technique has been around for some time but Maxim is 1 of the very first businesses to use it in a industrial chip.
Multiplexing simply indicates sharing regardless of whether it is
FDM Frequency division multiplexing
TDM Time division multiplexing
WDM Wavelength division multiplexing
Of program the other sort of multiplexing which each electronic engineer utilizes to steer indicators about a digital circuit makes use of standard logic gates and although not as glamorous as FDM, TDM and WDM it is a core technique for developing digital circuitry.
With a standard logic gate multiplexer you will have a minimum of two inputs that
you want to choose and send to a single output controlled by a handle signal.
The states of the output gates are as you would count on possibly substantial (logic 1) or lower (logic ) but charlieplexing recognizes yet another state:
Substantial Impedance.
Notice: This is the third state in addition to and one so it is typically called tri-state.
Higher impedance just implies switching off the output current circuit so no present can flow into or out of the output pin.
Of course high impedance output logic gates have been around for as prolonged as digital circuits have been used mainly for accessing a microprocessor bus wherever each machine is tri-stated to disconnect it from the shared bus whilst one more device outputs data to the bus.
Charliplexing
Charlieplexing uses the 3rd state to disconnect a pin from a mesh of units so no latest flows at that node and it’s ideally suited for management from a microcontroller
since it is effortless to modify the operation just by re-programming the microcontroller.
One particular of the uses of charlieplexing is to management numerous leds employing quite few pins. LEDs are also diodes so reversing the voltage across an LED indicates no current will flow. If you connect two leds to two output pins with the 2nd diode linked the opposite way to the initial one particular (and making use of latest limit resistors). Environment the output pins to 01 will turn on the 1st LED even though environment the output pins to 10 will turn on the 2nd LED.
Now add in a third output pin and add two diodes linked between each and every microcontroller pin as before. You now have 6 LEDs and by tristating every single microcontroller pin in flip only two output pins are ‘connected’ i.e. You can control each and every LED individually.
You have now managed 6 LEDs employing only three pins usually you would will need 6 specific output pins.
Th
e method for how several LEDs you can handle is:
LEDs = N * (N-1)
- Two pins presents two x (two-one) = 2
- 3 pins presents three x (3-1) = six
- 4 pins gives four x (4-one) = 12
Advantage of Charlieplexing
Very couple of pins management a lot of LEDs.
Disadvantage of Charlieplexing
Only selected sets of LEDs can be turned on at the very same time.
