DocID13284 Rev 2 155/564
UM0404 Parallel ports
DP4 (FFCAh / E5h) SFR Reset Value: - - 00h
ODP4 (F1CAh / E5h) SFR Reset Value: - - 00h
Only bits 4 to 7 are implemented, all other bits will be read as “0”.
When I
2
C is enabled by setting bit XPEN of the register SYSCON and bit XI2CEN of register
XPERCON, pins P4.4 and P4.7 becomes fully dedicated to I
2
C interface, and all the other
alternate functions are bypassed (external memory and CAN2 functions). The pins are also
automatically configured as Open-Drain as requested by the I
2
C bus standard. The Port4
control registers P4, DP4 and ODP4 can no longer control P4.7 and P4.4 pins configuration:
writing in the bits corresponding to P4.4 and P4.7 in these registers has no effect on pins
behavior.
6.6.1 Alternate functions of Port4
During external bus cycles that use segmentation (for address space above 64 Kbytes) a
number of Port4 pins may output the segment address lines. The number of pins that is
used for segment address output determines the external address space which is directly
accessible. The other pins of Port4 (if any) may be used for general purpose I/O. If segment
address lines are selected, the alternate function of Port4 may be necessary to access for
external memory directly after reset. For this reason Port4 will be switched to this alternate
function automatically.
The number of segment address lines is selected via PORT0 during reset. The selected
value can be read from bit-field SALSEL in register RP0H (read only) in order to check the
configuration during run time.
The CAN interfaces use two or four pins of Port4 to interface the CAN Module to the
external CAN transceiver. In this case the number of possible segment address lines is
reduced. The same should be applied, when the I
2
C interface module is used.
1514131211109876543210
- - - - - - - - DP4.7 DP4.6 DP4.5 DP4.4 DP4.3 DP4.2 DP4.1 DP4.0
RW RW RW RW RW RW RW RW
Bit Function
DP4.y
Port direction register DP4 bit y
’0’: Port line P4.y is an input (high-impedance).
’1’: Port line P4.y is an output.
1514131211109876543210
--------
ODP4.
7
ODP4.
6
ODP4.
5
ODP4.
4
----
RW RW RW RW
Bit Function
ODP4.y
Port Open drain control register ODP4 bit y
’0’: Port line P4.y output driver in push/pull mode.
’1’: Port line P4.y output driver in open drain mode if P4.y is not a segment address
line output.