Key Scanning With A Small Number of Connections: Summer Circuitscollection

Download as pdf or txt
Download as pdf or txt
You are on page 1of 1

SUMMER CIRCUITSCOLLECTION

a 3.5 mm drill-bit and a piece of paper. (1 Vpp open circuit) should be large enough to be accepted
In order to keep the input impedance linear and constant at the logic input. A third method could be a combination
within an as wide as possible bandwidth, the 75 Ω termi- of the previous two. With a winding ratio of 1:5 the quality
nating resistor has a 270 nF capacitor connected in series. of the signal (especially the bandwidth) will be much better
At the secondary is a clamping circuit (C2 and Schottky and could give a better performance when used with the
diode D1), which gives the correct DC offset to the AC sig- potential divider.
nal. The screenshot of the oscilloscope shows the output The aim was to keep this circuit completely passive,
signal. This was taken at a sampling frequency of 48 kHz. avoiding the need for an external power supply. This has in
It is clear that this is the limit at which this circuit can be fact been achieved, albeit with a limited performance. No
used, at 96 kHz the logic ‘1’ level will become too small. doubt a different core material and a larger core should
A second possible method would be to have a potential give better results. The converter still has plenty of scope for
divider between 5 V and earth, set to be exactly in the mid- home experimentation!
dle of the two logic levels. An AC-coupled S/PDIF signal (014123)

Key Scanning with


a Small Number of Connections 014
If a large number of keys have to be scanned, the individual
keys are not normally connected directly to the microcon-
P0
troller. Instead, a matrix arrangement is used. This allows µC P1
µC P0
A

the number of port pins to be reduced to seven for twelve P2 B


P1
keys, for example. The software scans the rows and P3

columns and thus determines which key is pressed. How- P4 P2


C

ever, sometimes only a small microcontroller with just a few P5


D
port pins is available, so even this economical matrix P6
P3

method cannot be used.


Using a trick, the same problem can be solved using only
four port pins. This requires the use of four extra diodes 014090 - 11

and the possibility of individually configuring the pins as


either inputs or outputs via software. Four column lines (1-
4) are arranged in a matrix with the four row lines (A-D) that remaining port pins, which are configured as inputs.
are connected to the microcontroller, with each row line Thanks to the diodes, a voltage will be detected on only
connected to a column line by a diode (1N4148). The soft- one of the inputs, depending on which key is pressed, and
ware can recognise a pressed a key by applying a voltage the software can assign the appropriate action to this event.
to each row in turn while observing the states of the (014090-1)

Step-Up/Step-Down
Switching Regulator 015
If you wish to convert a range of possible input voltages which can take in an input voltage between +1.6 V and
into an output voltage that lies somewhere in the middle of +5.5 V and generate an output between +2.5 V and +5.5 V.
that range, a regulator that can automatically switch It is based around a switched capacitor (C2).
between step-up and step-down modes is required. Such A further special feature of the MAX1759 is the automatic
a device is the MAX1759 from Maxim (www.maxim-ic.com), detection of the potential divider R3/R4. This allows it to

30 Elektor Electronics 7-8/2001

You might also like