DocID13284 Rev 2 169/564
UM0404 Parallel ports
6.9 Port7
If this 8-bit port is used for general purpose I/O, the direction of each line can be configured
via the corresponding direction register DP7. Each port line can be switched into push-pull
or open-drain mode via the open-drain control register ODP7.
P7 (FFD0h / E8h) SFR Reset Value: - - 00h
DP7 (FFD2h / E9h) SFR Reset Value: - - 00h
ODP7 (F1D2h / E9h) ESFR Reset Value: - - 00h
6.9.1 Alternate functions of Port7
The upper four lines of Port7 (P7.7...P7.4) are used as capture inputs or compare outputs
(CC31IO...CC28IO) for the CAPCOM2 unit.
How CAPCOM2 unit is connected to Port7 lines and how to handle them by software is
similar to the Port2 lines description.
As all other capture inputs, the capture input function of pins P7.7...P7.4 can also be used
as external interrupt inputs with a sample rate of eight CPU clock cycles.
1514131211109876543210
- - - - - - - - P7.7 P7.6 P7.5 P7.4 P7.3 P7.2 P7.1 P7.0
RW RW RW RW RW RW RW RW
Bit Function
P7.y Port data register P7 bit y
1514131211109876543210
- - - - - - - - DP7.7 DP7.6 DP7.5 DP7.4 DP7.3 DP7.2 DP7.1 DP7.0
RW RW RW RW RW RW RW RW
Bit Function
DP7.y
Port direction register DP7 bit y
’0’: Port line P7.y is an input (high-impedance).
’1’: Port line P7.y is an output.
1514131211109876543210
--------
ODP7
.7
ODP7
.6
ODP7
.5
ODP7
.4
ODP7
.3
ODP7
.2
ODP7
.1
ODP7
.0
RW RW RW RW RW RW RW RW
Bit Function
ODP7.y
Port Open Drain control register ODP7 bit y
’0’: Port line P7.y output driver in push-pull mode.
’1’: Port line P7.y output driver in open-drain mode.