II-92
EPSON
S1C6S3N2 TECHNICAL SOFTWARE
CHAPTER 5: PERIPHERAL CIRCUITS (Stopwatch Counter)
(1) Combining interrupt factor flag and stopwatch counter
This program uses the generation of the stopwatch 1 Hz
interrupt factor flag to execute timer display from the 1/100
second to the 10 minute columns.
Data Bits
D3
D2
D1
D0
▲
▲
0H
SWL3
SWL2
SWL1
SWL0
▲
▲
1H
SWH3
SWH2
SWH1
SWH0
Address
Data
▲
▲
2H
Single digit seconds column (BCD)
▲
▲
3H
Ten's digit seconds column (BCD)
▲
▲
4H
Single digit minutes column (BCD)
▲
▲
5H
Ten's digit minutes column (BCD)
Stores SWIT in the memory register address M and creates
data greater than a second digit. Through this, simultane-
ous display of 1/100 second and 1/10 second stopwatch
data, and second/minute data will be possible.
Data Bits
D3
D2
D1
D0
0
H
IK1
IK0
SWIT1
SWIT0
Address
Example of program
for stopwatch inter-
rupt
Specifications
Table 5.9.3
Correspondence between
stopwatch counter and store
data
Table 5.9.4
Timer data by "SWTM"
Address
Program
Table 5.9.5
Data of memory register
YSITB
EQU
0
H
;
YSWLB
EQU
▲
▲
0H
;
;
;
DI
;
LD
X,7EH
;
OR
MX,0010B
;
;
SWLP:
LD
X,7AH
;
LD
Y,7EH
;
AND
MY,1011B
;
LD
A,MX
;
SWT interrupt factor flag buffer address
Stopwatch counter low order data buffer address
Disable interrupts
Initial start stopwatch counter
Preparation: Store interrupt factor flag address in the X register
Stop the stopwatch counter
Store stopwatch interrupt factor flags
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: ......