Datasheet
C515C
Data Sheet 33 2003-02
Port Structure Selection of Port 5
After a reset operation of the C515C, the quasi-bidirectional 8051-compatible port
structure is selected. For selection of the bidirectional (CMOS) port 5 structure the bit
PMOD of SFR SYSCON must be set. Because each port 5 pin can be programmed as
an input or an output, additionally, after the selection of the bidirectional mode the
direction register DIR5 of port 5 must be written. This direction register is mapped to the
port 5 register. This means, the port register address is equal to its direction register
address. Figure 10 illustrates the port and direction register configuration.
Figure 10 Port Register, Direction Register
MCS02649
D
RQ
Q
Int. Bus, Bit 7
Write to IP 1
Delay:
2.5 Machine Cycles
Port Register
Direction Register
Enable
PDIR
Enable
Write to Port
Read Port
Internal
Bus
Instruction sequence for the programming of the direction registers:
ORL IP1, #80H ; Set bit PDIR
Write port x direction register with value YYH;#OYYHDIRx,MOV










