II-78
EPSON
S1C6S3N2 TECHNICAL SOFTWARE
CHAPTER 5: PERIPHERAL CIRCUITS (Input Ports)
YK0B0:
EQU
●
●
0H
;
;
;
IK0:
LD
X,75H
;
LD
MX,0000B
;
LD
X,7BH
;
LD
MX,0001B
;
LD
Y,YK0B0
;
;
IK0SCLP:
LD
A,1H
;
IK0SCDLLP: ADD
A,0FH
;
JP
NZ,IK0SCDLLP ;
LD
X,73H
;
LDPY
MY,MX
;
LD
X,7BH
;
ADD
MX,MX
;
JP
NZ,IK0SCLP
;
;
CALL
K0
;
LD
X,75H
;
LD
MX,1111B
;
LD
X,7BH
;
LD
MX,1111B
;
RET
;
;
;
K0:
LD
A,0H
;
LD
Y,YK0B0
;
K0RDLP:
CP
MY,0H
;
JP
K0RDCT
;
ADD
A,1H
;
K0RDCT:
INC
Y
;
CP
YL,4H
;
JP
NZ,K0RDLP
;
;
CP
A,0H
;
JP
Z,K0N0ENT
;
;
;
CP
A,2H
;
JP
NC,K0MLT
;
;
Input data buffer start address
Mask K00–K03 interrupt
Preparation: Make only R00 high output
Store YK0B0 in Y register
Scanning loop:
Delay: Preparation
Delay loop
Store K00–K03 data in the buffer
Address next buffer
Shift high output to the left
Continue until all are low
Execute key processing routine "K0"
Enable K00–K03 interrupt again
Make R00–R03 high output again
Return to "INIK"
Preparation: Clear A register
Store YK0B0 in Y register
Loop: If contents of input data buffer
are not "0",
then
add 1 to A register
and address next buffer
Continue until four times
If not high input
execute non-input processing "K0NOENT"
and return to "IK0"
If multiple key entry
execute multiple key entry processing "K0MLT"
and return to "IK0"
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: ......