CHAPTER 3: PERIPHERAL CIRCUITS (Input Port)
II-15
• Bit-unit checking of input ports
Label
Mnemonic/operand
Comment
DI
;
Disable interrupt
LD
Y,0E0H
;
Set address of port
INPUT1: FAN
MY,0010B
;
JP
NZ,INPUT1
;
Loop until K01 becomes "0"
INPUT2: FAN
MY,0010B
;
JP
Z,INPUT2
;
Loop until K01 becomes "1"
This program loopes until a rising edge is input to input port
K01.
The input port can be addressed using the X register instead
of the Y register.
When the input port is changed from high level to low level with a
pull-down resistor, the signal falls following a certain delay caused
by the time constants of the pull-down resistance and the input
gate capacitance. It is therefore necessary to observe a proper
wait time before the input port data is read.
Note
Содержание E0C6001
Страница 4: ...Hardware E0C6001 I Technical Hardware ...
Страница 79: ...Software E0C6001 II Technical Software ...