II-72
EPSON
S1C6S3N2 TECHNICAL SOFTWARE
CHAPTER 5: PERIPHERAL CIRCUITS (Input Ports)
(2) Input ports determination per bit
This is an example of whether each terminal is high or low,
using computational command on the input port (K00–K03)
registers.
ON/OFF switching of BZ output, or BZ frequency is con-
trolled according to the result of the determination.
YDTB
EQU
● ★
● ★
H
;
;
;
KYTS:
LD
X,73H
;
CP
MX,0001B
;
JP
NZ,KYTS2
;
CALL BZ4
;
;
KYTS2:
LD
Y,YDTB
;
LD
A,MY
;
LD
X,73H
;
XOR
A,MX
;
JP
Z,KYTSOF
;
CALL
BZ2
;
;
KYTSOF:
LD
X,73H
;
FAN
MX,0001B
;
JP
NZ,KYTSLP
;
CALL
BZOF
;
;
KYTSLP:
LD
X,77H
;
FAN
MX,0001B
;
JP
Z,KYTSLP
;
JP
KYTS
;
Data buffer address
If only K00 is high input
then
sound BZ at 4 kHz
If the value of RAM, YDTB
does not match the value of K00–K03
then
sound BZ at 2 kHz
If K00 is low input
then
stop the buzzer
Loop: K10 pin is low or high?
Low input:
Loop
High input: Returns to KYTS
Program
Specifications
Содержание S1C6S3N2
Страница 4: ......
Страница 6: ......
Страница 7: ...Hardware Hardware S1C6S3N2 I Technical Hardware ...
Страница 8: ......
Страница 141: ...Software Software S1C6S3N2 II Technical Software ...
Страница 142: ......
Страница 146: ......