
ST7265
51/160
I/O PORTS (Cont’d)
CAUTION: The alternate function must not be ac-
tivated as long as the pin is configured as input
with interrupt, in order to avoid generating spurious
interrupts.
Analog alternate function
When the pin is used as an ADC input, the I/O
must be configured as floating input. The analog
multiplexer (controlled by the ADC registers)
switches the analog voltage present on the select-
ed pin to the common analog rail which is connect-
ed to the ADC input.
It is recommended not to change the voltage level
or loading on any port pin while conversion is in
progress. Furthermore it is recommended not to
have clocking pins located close to a selected an-
alog pin.
WARNING: The analog input voltage level must
be within the limits stated in the absolute maxi-
mum ratings.
9.3 I/O PORT IMPLEMENTATION
The hardware implementation on each I/O port de-
pends on the settings in the DDR and OR registers
and specific feature of the I/O port such as ADC In-
put or true open drain.
Switching these I/O ports from one state to anoth-
er should be done in a sequence that prevents un-
wanted side effects. Recommended safe transi-
tions are illustrated in Figure 34 Other transitions
are potentially risky and should be avoided, since
they are likely to present unwanted side-effects
such as spurious interrupt generation.
Figure 34. Interrupt I/O Port State Transitions
The I/O port register configurations are summa-
rized as follows.
IPort B (without Option Register)
PB[7:0]
Table 13. Port Configuration (with Option Register)
MODE
DDR
floating input
0
push-pull output
1
01
floating/pull-up
interrupt
INPUT
00
floating
(reset state)
INPUT
10
open-drain
OUTPUT
11
push-pull
OUTPUT
XX
= DDR, OR
Port
Pin name
Input
Outpu t
OR = 0
OR = 1
OR = 0
OR = 1
High-Sink
Port A
PA7:0
floating
with interrupt
open drain
push-pull
No
Port C
PC7:4
floating
with interrupt
push-pull
No
PC3:0
floating
with interrupt
push-pull
Yes
Port D
PD7:0
floating
with interrupt
open drain
push-pull
No
Port E
PE7:6
floating
open drain
push-pull
Yes
PE5
floating
with pull-up, if se-
lected by option
byte see Section
15.1)
open drain (with
pull-up, if select-
ed by option byte
see Section 15.1)
push-pull
Yes
PE4:3
floating
open drain
push-pull
No
PE2:0
floating
open drain
push-pull
Yes
Port F
PF6:4
floating
True open drain
Yes
PF3:2
floating
push-pull
No
PF1:0
floating
True open drain
Yes
1