II-66
EPSON
S1C6S3N2 TECHNICAL SOFTWARE
CHAPTER 5: PERIPHERAL CIRCUITS (Clock Timer)
(4) Clock using timer 2 Hz interrupt
This program is for a clock that uses the timer 2 Hz inter-
rupt. It judges when 1 second elapses after the 2 Hz inter-
rupt and counts the clock's seconds.
Address
Data
0H
Second count data (single digit seconds column, BCD)
1H
Second count data (ten's seconds column, BCD)
2H
Minute count data (single digit minutes column, BCD)
3H
Minute count data (ten's digit minutes column, BCD)
XTISF
EQU
0001B
;
YFTM
EQU
◆ ◆
◆ ◆
H
;
YCKS
EQU
0H
;
;
;
TI2:
LD
X,YFTM
;
FAN
MX,XBTSF
;
JP
NZ,TI21
;
;
OR
MX,XTISF
;
RET
;
TI21:
AND
MX,XTISF XOR 0FH ;
LD
X,YCKS
;
CALZ
CT60
;
RET
;
JP
CK
;
;
;
0.5-sec flag (TISF)
Address of timing flag set
Start address of second counter data (BCD)
TISF = "0" or "1"?
TISF = "0": Set TISF
Return to "INTI"
TISF = "1": Reset TISF
Increment the second counter data by 1
No carry: Return to "INTI"
Carry:
Execute clock processing for
at least a minute "CK",
and return to "INTI"
Program
Table 5.6.4
Clock data
Specifications
Содержание S1C6S3N2
Страница 4: ......
Страница 6: ......
Страница 7: ...Hardware Hardware S1C6S3N2 I Technical Hardware ...
Страница 8: ......
Страница 141: ...Software Software S1C6S3N2 II Technical Software ...
Страница 142: ......
Страница 146: ......