S1C6S3N2 TECHNICAL SOFTWARE
EPSON
II-61
CHAPTER 5: PERIPHERAL CIRCUITS (Clock Timer)
(4) Alarm bell using clock timer and BZ output
When called every 8 Hz, this subroutine generates the alarm
bell sound by switching the BZ output ON and OFF, as
shown in the timing chart.
Specifications
Fig. 5.6.3
Alarm bell timing chart
XTISF
EQU
0001B
;
XBESYNF
EQU
0010B
;
YFTM
EQU
◆ ◆
◆ ◆
H
;
;
;
BE:
LD
Y,YFTM
;
FAN
MY,XTISF
;
JP
NZ,BZOF
;
;
LD
X,70H
;
LD
A,MX
;
AND
A,1100B
;
CP
A,0000B
;
JP
NZ,BE1
;
;
OR
MY,XBESYNF
;
JP
BZ
;
;
BE1:
FAN
MY,XBESYNF
;
JP
Z,BZOF
;
CP
A,1000B
;
JP
NZ,BZOF
;
;
AND
MY,XBESYNF XOR 0FH ;
JP
BZ
;
0.5-sec flag (TISF)
Bell sound synchro flag
Address of timing flag set
TISF = "0" or "1"?
TISF = "1": Execute "BZOF", return to parent routine
TISF = "0": Is the timer data of 2 Hz and 4 Hz
all "0"?
Both 2 Hz and 4 Hz are "0": Reset BESYNF
Execute "BZ", return to parent routine
2 Hz and 4 Hz not both "0":
When BESYNF = "0"
or 4 Hz = "1"
execute "BZOF", return to parent routine
In other cases: Reset BESYNF
Execute "BZ", return to parent routine
Program
Time
TISF
2 Hz
4 Hz
8 Hz interrupt
BZ output
n sec
(n+1) sec
"1"
"0"
"1"
"0"
"1"
"0"
ON
OFF
Содержание S1C6S3N2
Страница 4: ......
Страница 6: ......
Страница 7: ...Hardware Hardware S1C6S3N2 I Technical Hardware ...
Страница 8: ......
Страница 141: ...Software Software S1C6S3N2 II Technical Software ...
Страница 142: ......
Страница 146: ......