E0C6001 TECHNICAL SOFTWARE
II-14
The E0C6001 has one 4-bit input port (K00–K03). Input port
data can be read as a 4-bit unit (K00–K03).
The state of the input ports can be obtained by reading the
data (bits D3, D2, D1, D0) of address 0E0H. The input ports
can be used to send an interrupt request to the CPU via the
input interrupt condition flag. See Section 3.8 "Interrupt
and Halt", for details.
• Loading K00–K03 into the A register
Label
Mnemonic/operand
Comment
LD
Y,0E0H
;
Set address of port
LD
A,MY
;
A register
←
K00–K03
As shown in Figure 3.1.1, the two instruction steps above
load the data of the input port into the A register.
Control of
the input port
Examples of input
port control
program
D3
K03
D2
K02
D1
K01
D0
K00
A register
The data of the input port can be loaded into the B register
or MX instead of the A register.
Fig. 3.1.1
Loading the A register
Содержание E0C6001
Страница 4: ...Hardware E0C6001 I Technical Hardware ...
Страница 79: ...Software E0C6001 II Technical Software ...