Specifications

S1C62N82 TECHNICAL SOFTWARE EPSON II-29
CHAPTER 3: PERIPHERAL CIRCUITS (I/O Ports)
As shown in Figure 3.5.1, the four instruction steps above
load the data of the I/O ports into the A register.
• Loading P00–P03 output data into A register
Label Mnemonic/operand Comment
LD Y,0FCH ;Set the address of input/output
;port control register
OR MY,0001B ;Set as output port
LD Y,0F6H ;Set the address of port
LD A,MY ;A register P00P03
As shown in Figure 3.5.2, 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
P03 P02 P01 P00
Data register
P00
Data register
P01
Data register
P02
Data register
P03
A register
D3 D2 D1 D0
Data can be loaded from the I/O port into the B register or
MX instead of the A register.
Fig. 3.5.2
Control of I/O port (input)
Fig. 3.5.1
Loading into the A register