Specifications

S1C62N82 TECHNICAL SOFTWARE EPSON II-23
CHAPTER 3: PERIPHERAL CIRCUITS (Output Ports)
Examples of output
port control
program
• Loading B register data into R00–R03
Label Mnemonic/operand Comment
LD Y,0F3H ;Set address of port
LD MY,B ;R00R03 B register
As shown in Figure 3.3.1, the two instruction steps above
load the data of the B register into the output ports.
The output data can be taken from the A register, MX, or
immediate data instead of the B register.
• Bit-unit operation of output ports
Label Mnemonic/operand Comment
LD Y,0F3H ;Set address of port
OR MY,0010B ;Set R01 to 1
AND MY,1011B ;Set R02 to 0
The three instruction steps above cause the output port to
be set, as shown in Figure 3.3.2.
R03 R02 R01 R00
No change
Sets "1"
Sets "0"
No change
Address 0F3H
D3 D2 D1 D0
Fig. 3.3.1
Control of the output port
Fig. 3.3.2
Setting of the output port
D3 D2 D1 D0
Data register
R00
Data register
R01
Data register
R02
Data register
R03
B register