How To Manage twelve LED's Using 4 Microcontroller Pins

Published: 15th April 2011
Views: N/A

If you have at any time done any electronics prior to you will almost certainly be acquainted with multiplexing but charlieplexing adds a new dimension. It's a technique commercially produced at Maxim by Charlie Allen hence the title but you can nevertheless use the approach in your individual circuits.

Notice: The real strategy has been close to for some time but Maxim is a single of the first companies to use it in a business chip.

Multiplexing simply means sharing no matter whether it is

FDM Frequency division multiplexing

TDM Time division multiplexing

WDM Wavelength division multiplexing

Of course the other sort of multiplexing which every single digital engineer uses to steer signals around a digital circuit uses standard logic gates and though not as glamorous as FDM, TDM and WDM it is a core approach for designing digital circuitry.

With a regular logic gate multiplexer you will have a minimum of two inputs that you want to pick and deliver to a single output controlled by a manage signal.

The states of the output gates are as you would expect possibly high (logic one) or low (logic ) but charlieplexing recognizes another state:

High Impedance.

Be aware: This is the third state in addition to and one so it is often named tri-state.

Large impedance just indicates switching off the output current circuit so no current can movement into or out of the output pin.

Of course large impedance output logic gates have been all around for as lengthy as digital circuits have been utilised primarily for accessing a microprocessor bus wherever each device is tri-stated to disconnect it from the shared bus whilst another gadget outputs data to the bus.

Charliplexing

Charlieplexing makes use of the 3rd state to disconnect a pin from a mesh of units so no latest flows at that node and it really is ideally suited for handle from a microcontroller given that it's simple toalter the operation just by re-programming the microcontroller.

A single of the utilizes of charlieplexing is to control several leds making use of extremely handful of pins. LEDs are also diodes so reversing the voltage across an LED implies no existing will flow. If you connect two leds to two output pins with the second diode connected the reverse way to the very first one (and making use of current limit resistors). Setting the output pins to 01 will flip on the 1st LED although setting the output pins to ten will flip on the 2nd LED.

Now add in a third output pin and add two diodes related among each microcontroller pin as ahead of. You now have six LEDs and by tristating each microcontroller pin in flip only two output pins are 'connected' i.e. You can manage each LED individually.

You have now managed 6 LEDs making use of only 3 pins normally you would need 6 personal output pins.

The system for how numerous LEDs you can handle is:

LEDs = N * (N-1)



  • Two pins presents two x (2-1) = 2


  • 3 pins presents 3 x (three-one) = six


  • 4 pins presents 4 x (four-1) = twelve



Benefit of Charlieplexing

Very number of pins handle many LEDs.

Disadvantage of Charlieplexing

Only particular sets of LEDs can be turned on at the identical time.


picaxe

Report this article Ask About This Article


Loading...
More to Explore