S1C6S3N2 TECHNICAL SOFTWARE
EPSON
II-95
CHAPTER 5: PERIPHERAL CIRCUITS (Stopwatch Counter)
ORG
108H
;
;
JP
INST
;
;
;
YSITB
EQU
● ▲
● ▲
H
;
;
;
INST:
PUSH
XH
;
PUSH
XL
;
PUSH
YH
;
PUSH
YL
;
PUSH
A
;
PUSH
B
;
PUSH
F
;
;
LD
X,7AH
;
LD
Y,YSITB
;
LD
MY,MX
;
LD
X,76H
;
AND
MY,MX
;
;
FAN
MY,0001B
;
JP
Z,INSIT1
;
CALL
SIT0
;
;
INSIT1:FAN
MY,0010B
;
JP
Z,INRT
;
CALL
SIT1
;
;
INRT:
Vector address of stopwatch interrupts
If SWT interrupts occur, go to "INST"
Buffer address of stopwatch interrupt factor flags
Store value of X register in stack
Store value of Y register in stack
Store value of A register in stack
Store value of B register in stack
Store value of flag group in stack
(Reset and) store
stopwatch interrupt factor flags
in the buffer
Mask the stopwatch interrupt factor flags
by value of stopwatch interrupt mask register
If the ST10Hz interrupt factor flag is set
and enabled
then
execute "SIT0"
If the ST1Hz interrupt factor flag is set
and enabled
then
execute "SIT1"
Program
For details of "INRT", see "4.5 Example of Interrupt Vector
Processing".
Regardless of the setting of the mask register (EISWIT), the
interrupt factor flag (SWIT) is set to "1" when the corre-
sponding counter overflows. Therefore, the presence of each
interrupt factor is judged according to the result of ANDing
the factor flag stored in the buffer with the mask register.
Note
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: ......