
II-92
EPSON
S1C62N33 TECHNICAL SOFTWARE
CHAPTER 5: PERIPHERAL CIRCUITS (Stopwatch Counter)
Example of program
for stopwatch inter-
rupt
(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
v
v0H
SWL3
SWL2
SWL1
SWL0
v
v1H
SWH3
SWH2
SWH1
SWH0
Address
Data
v
v2H
Single digit seconds column (BCD)
v
v3H
Ten's digit seconds column (BCD)
v
v4H
Single digit minutes column (BCD)
v
v5H
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
YSITB
EQU
0
H;
YSWLB
EQU
v
v0H
;
DI
;
LD
X,7EH
;
OR
MX,0010B
;
SWLP:
LD
X,7AH
;
LD
Y,7EH
;
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
Specifications
Table 5.9.3
Correspondence between
stopwatch counter and store
data
Table 5.9.4
Timer data by "SWTM"
Program
Table 5.9.5
Data of memory register