User manual

Code Mercenaries
9
II
II
OO
OO
--
--
WW
WW
aa
aa
rr
rr
rr
rr
ii
ii
oo
oo
rr
rr
55
55
66
66
4.2.5 Switch Matrix Mode Pins
IO-Warrior56 supports scanning of a 8x8 matrix of
keys or switches. When this function is enabled
P0.0..7 will turn off their internal pull up resistors
and will be used as the Y lines that are periodically
driven to Gnd voltage level. P2.0..7 will serve as
the X matrix inputs, they will keep their internal
pull up resistors active so a closed switch in the
matrix will pull down the X line when the
corresponding Y line is driven low.
To allow more than two switches to be closed at
the same time and still be able to faultlessly detect
which of the matrix points are closed it is
necessary to insert a diode in series with every key
or switch in the matrix. The kathodes of the diodes
have to be connected to the Y lines (P0.0..7).
The following pins get reassigned when the key
mode is enabled:
The matrix is scanned every 4msec. Debounce
time is 16msec.
When IO-Warrior enters the suspend mode the X
and Y lines will be pulled high by internal pull up
resistors. Closing a switch/key does not wake the
IO-Warrior.
Function IOW56
X0
X1
P2.0
P2.1
X2
X3
X4
X5
P2.2
P2.3
P2.4
P2.5
X6
X7
Y0
Y1
P2.6
P2.7
P0.0
P0.1
Y2
Y3
Y4
Y5
P0.2
P0.3
P0.4
P0.5
Y6
Y7
P0.6
P0.7
V 1.0.3, November 6nd 2012 for chip version V1.1.0.1