S1C6S3N2 TECHNICAL SOFTWARE
EPSON
II-77
CHAPTER 5: PERIPHERAL CIRCUITS (Input Ports)
(6) Key matrix (K00–K03
×
R00–R03) processing
This is the interrupt routine "IK0" which specifies the high
input key from the key matrix shown in Figure 5.7.2 and
converts it to the key code.
Note, however, that the duplicate input process "K0MLT" will
be executed when multiple keys are simultaneously pressed,
and the no-entry process "K0NOENT" will be executed when
interrupt is inadvertently generated.
Specifications
Fig. 5.7.2
Key matrix
(K00–K03
×
R00–R03)
DI
;
LD
X,74H
;
LDPX
MX,0000B
;
LD
MX,1111B
;
LD
X,7BH
;
LD
MX,1111B
;
EI
;
;
;
Disable interrupts
Set the differential registers DFK00–DFK03
to "0000"
Enable K00–K03 interrupt
Make R00–R03 high output
Enable interrupts
Data Bits
D3
D2
D1
D0
●
●
0H
No.3
No.2
No.1
No.0
●
●
1H
No.7
No.6
No.5
No.4
●
●
2H
No.B
No.A
No.9
No.8
●
●
3H
No.F
No.E
No.D
No.C
Address
At first, the key matrix is scanned and then the status of the
16 keys is read into the buffer memory. Next, these 16 data
are converted to high input key numbers.
Table 5.7.5
Contents of RAM
and input data buffer
Program
R03
R02
R01
R00
K03
K02
K01
K00
No.0
No.1
No.2
No.3
No.4
No.5
No.6
No.7
No.8
No.9
No.A
No.B
No.C
No.D
No.E
No.F
Address
0 H
Data
Input key code (No. 0–F)
Summary of Contents for S1C6S3N2
Page 4: ......
Page 6: ......
Page 7: ...Hardware Hardware S1C6S3N2 I Technical Hardware ...
Page 8: ......
Page 141: ...Software Software S1C6S3N2 II Technical Software ...
Page 142: ......
Page 146: ......