S1C6S3N2 TECHNICAL SOFTWARE
EPSON
II-79
CHAPTER 5: PERIPHERAL CIRCUITS (Input Ports)
;
LD
A,0H
;
LD
B,0H
;
LD
Y,YK0B0
;
;
K0ECLP:
CP
MY,0001B
;
JP
Z,K0ECLP0
;
JP
C,K0ECLP4
;
CP
MY,0010B
;
JP
Z,K0ECLP1
;
CP
MY,0100B
;
JP
Z,KPECLP2
;
CP
MY,1000B
;
JP
Z,K0ECLP3
;
JP
K0MLT
;
;
;
K0ECLP3:
ADD
A,1H
;
K0ECLP2:
ADD
A,1H
;
K0ECLP1:
ADD
A,1H
;
K0ECLP0:
ADD
A,B
;
;
LD
M
●
●
,A
;
K0ECLP4:
ADD
B,4H
;
INC
Y
;
CP
YL,4H
;
JP
NZ,K0ECLP
;
;
RET
;
Preparation: Clear A register
Clear B register
Store YK0B0 in Y register
Coding loop: Judge high input pin
K00 high input: Go to K0ECLP0
Not high input: Go to K0ECLP4
K01 high input:
Go to K0ECLP1
K02 high input:
Go to K0ECLP2
K03 high input:
Go to K0ECLP3
Multiple key entry: Execute multiple key entry
processing "K0MLT", and return to "IK0"
K03 high input: A
←
3
K02 high input: A
←
2
K01 high input: A
←
1
K00 high input: Add the value of B register
to A register
Store result in memory register M
●
●
Increase the value of B register by four
Address next buffer
Continue until four times
Return to "IK0"
This routine assumes that processing routines "K0NOENT"
and "K0MLT" have been prepared separately.
1. When the key scan is executed, the input status changes
and the condition is ready for an interrupt factor flag to
be set. Hence, the K03–K00 interrupt is masked in
advance.
2. When input ports are changed from high to low by pull-
down resistance, the fall of the waveform is delayed.
Hence, when fetching key scan input, set an appropriate
wait time.
Notes
Содержание S1C6S3N2
Страница 4: ......
Страница 6: ......
Страница 7: ...Hardware Hardware S1C6S3N2 I Technical Hardware ...
Страница 8: ......
Страница 141: ...Software Software S1C6S3N2 II Technical Software ...
Страница 142: ......
Страница 146: ......