
Obsolete
Product(s)
- Obsolete
ST7L05, ST7L09
40/104
I/O PORTS (Cont’d)
Caution: The alternate function must not be acti-
vated as long as the pin is configured as input with
interrupt, in order to avoid generating spurious in-
terrupts.
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.
10.3 UNUSED I/O PINS
Unused I/O pins must be connected to fixed volt-
10.4 LOW POWER MODES
10.5 INTERRUPTS
The external interrupt event generates an interrupt
if the corresponding configuration is selected with
DDR and OR registers and the interrupt mask in
the CC register is not active (RIM instruction).
10.6 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.
Switching these I/O ports from one state to anoth-
er must be done in a sequence that prevents un-
wanted side effects. Recommended safe transi-
tions are illustrated in
Figure 24 Other transitions
are potentially risky and should be avoided, since
they are likely to present unwanted side-effects
such as spurious interrupt generation.
Figure 24. Interrupt I/O Port State Transitions
The I/O port register configurations are summa-
rized as follows:
Table 11. Port Configuration
Mode
Description
WAIT
No effect on I/O ports. External interrupts
cause the device to exit from WAIT mode.
HALT
No effect on I/O ports. External interrupts
cause the device to exit from HALT mode.
Interrupt Event
Event
Flag
Enable
Control
Bit
Exit
from
Wait
Exit
from
Halt
External interrupt
on selected external
event
-
DDRx
ORx
Yes
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 (DDR = 0)
Output (DDR = 1)
OR = 0
OR = 1
OR = 0
OR = 1
Port A
PA7
floating
pull-up interrupt
open drain
push-pull
PA6:1
pull-up
PA0
pull-up interrupt
Port B
PB4
pull-up
PB3
pull-up interrupt
PB2:1
pull-up
PB0
pull-up interrupt
1