Global Sources
EE Times-Asia
Stay in touch with EE Times Asia
?
EE Times-Asia > Optoelectronics/Displays
?
?
Optoelectronics/Displays??

Keyboard, display multiplexing: The traditional approach

Posted: 23 Jul 2015 ?? ?Print Version ?Bookmark and Share

Keywords:multiplex? keyboards/switches? I/O pins? displays? controller?

In Webster's Dictionary, "multiplex" is defined as "many" or "multiple". Coincidentally, in an electronics context the word can have several meanings. Whilst they all share the intention to economise on the number of connections used, there are subtle differences. It can mean combining messages on to a single communications channel for transmission and reception. In a similar vein, it can also mean configuring several continuous inputs (either digital or analogue) so that only one is accessed at a time. It can also mean the technique of configuring displays and keyboards/switches in a matrix in order to reduce the number of I/O lines used in hardware. This article is about the last option.

If you had 12 switches and you wanted to monitor each one individually, you would need 12 I/O (only input). Multiplexing will allow you to reduce that. If you configure it as a 6 x 2 matrix, this would require only eight (6+2) I/O pins, or if you altered the approach to a 3 x 4 (as shown in figure 1) you would be down to seven I/O pins.

Figure 1: A 4 x 3 matrix for 12 switches.

Signals Out0 to Out3 are normally at logic high. A logic low signal is moved sequentially through these outputs and at each stage the inputs In0 to In2 are inspected. If any of switches in a particular column are closed, the corresponding input reads zero and so you know which switch is pressed. It is possible to reduce the number of I/O line from the controller by using decoders. You could get the four driver lines by using a 2-to-4 line decoder to drive the switch matrix. This works very well up to the point that you have two keys in the same row closed, and then the low signal is fed back possible creating a false closed signal and more importantly loading the outputs that are at a logic one. The way around this is to insert a diode in series with the switch. This technique can be used on any kind of switch including ones that are not momentary by nature. You can see an example of using the diodes together with some thumbwheel switches in figure 2.

Figure 2: The micro enables each BCD switch in turn by activating each transistor. Where a switch is closed the associated micro input is pulled low and the micro can read the setting on each BCD (or hexadecimal) switch in turn.


1???2?Next Page?Last Page



Article Comments - Keyboard, display multiplexing: The ...
Comments:??
*? You can enter [0] more charecters.
*Verify code:
?
?
Webinars

Seminars

Visit Asia Webinars to learn about the latest in technology and get practical design tips.

?
?
Back to Top