CHAPTER 3: PERIPHERAL CIRCUITS (I/O Port)
II-25
• Loading P00–P03 input data into A register
Label
Mnemonic/operand
Comment
LD
Y,0FCH
;
Set address of I/O control port
AND
MY,1110B
;
Set port as input port
LD
Y,0F6H
;
Set address of port
LD
A,MY
;
A register
←
P00–P03
As shown in Figure 3.4.1, the four instruction steps above
load the data of the I/O ports into the A register.
D3
P03
D2
P02
D1
P01
D0
P00
A register
Examples of I/O port
control program
Fig. 3.4.1
Loading into the A register
Содержание E0C6001
Страница 4: ...Hardware E0C6001 I Technical Hardware ...
Страница 79: ...Software E0C6001 II Technical Software ...