Specifications

Table Of Contents
S1C62740 TECHNICAL SOFTWARE EPSON II-21
CHAPTER 6: PERIPHERAL CIRCUITS (Input Ports)
;:
LD X,ZK0 ;STORE DIFFERENTIAL REGISTER
LD Y,ZDFK0
LD MY,MX
EI
RET
;
K1INT:
;* K1 INTERRUPT SERVICE ROUTINE
;
LD X,ZIK1
LD A,MX
;:
;:
LD X,ZK1 ;STORE DIFFERENTIAL REGISTER
LD Y,ZDFK1
LD MY,MX
EI
RET
;
(1) When input ports are changed from low to high by pull up
resistor, the rise of the waveform is delayed on account of the
time constant of the pull up resistor and input gate capaci-
tance. Hence, when fetching input ports, set an appropriate
wait time.
Particular care needs to be taken of the key scan during key
matrix configuration.
Make this waiting time the amount of time or more calculated
by the following expression.
10 × C × R
C: terminal capacitance 5 pF + parasitic capacitance ? pF
R: pull up resistance 300 k
(2) Write the interrupt mask register (EIK) only in the DI status
(interrupt flag = "0"). Writing during EI status (interrupt flag =
"1") will cause malfunction.
(3) Reading of interrupt factor flags is available at EI, but be careful
in the following cases.
If the interrupt mask register value corresponding to the inter-
rupt factor flags to be read is set to "1", an interrupt request will
be generated by the interrupt factor flags set timing, or an
interrupt request will not be generated. Be very careful when
interrupt factor flags are in the same address.
Programming notes