ST10F269-T3
The direction of the pin should be set to output by
the user, otherwise the pin will be in the
high-impedance state and will not reflect the state
of the output latch.
As can be seen from the port structure in Figure
26, the user software always has free access to
the port pin even when it is used as a compare
output. This is useful for setting up the initial level
of the pin when using compare mode 1 or the
double-register mode. In these modes, unlike in
compare mode 3, the pin is not set to a specific
value when a compare match occurs, but is
toggled instead.
When the user wants to write to the port pin at the
same time a compare trigger tries to clock the
output latch, the write operation of the user
software has priority. Each time a CPU write
access to the port output latch occurs, the input
Table 15 :
Alternate Functions of Port 2
Port 2 Pin
P2.0
P2.1
P2.2
P2.3
P2.4
P2.5
P2.6
P2.7
P2.8
P2.9
P2.10
P2.11
P2.12
P2.13
P2.14
P2.15
Alternate Function a)
CC0IO
CC1IO
CC2IO
CC3IO
CC4IO
CC5IO
CC6IO
CC7IO
CC8IO
CC9IO
CC10IO
CC11IO
CC12IO
CC13IO
CC14IO
CC15IO
-
-
-
-
-
-
-
-
EX0IN
EX1IN
EX2IN
EX3IN
EX4IN
EX5IN
EX6IN
EX7IN
Alternate Function b)
Alternate Function c)
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
T7IN T7 External Count Input
multiplexer of the port output latch is switched to
the line connected to the internal bus. The port
output latch will receive the value from the internal
bus and the hardware triggered change will be
lost.
As all other capture inputs, the capture input
function of pins P2.15...P2.0 can also be used as
external interrupt inputs (250ns sample rate at
32MHz CPU clock).
The upper eight Port 2 lines (P2.15...P2.8) also
can serve as Fast External Interrupt inputs from
EX0IN to EX7IN (Fast external interrupt sampling
rate is 31.25ns at 32MHz CPU clock).
P2.15 in addition serves as input for CAPCOM2
timer T7 (T7IN). The Table 15 summarizes the
alternate functions of Port 2.
Fast External Interrupt 0 Input
Fast External Interrupt 1 Input
Fast External Interrupt 2 Input
Fast External Interrupt 3 Input
Fast External Interrupt 4 Input
Fast External Interrupt 5 Input
Fast External Interrupt 6 Input
Fast External Interrupt 7 Input
Figure 25 :
Port 2 I/O and Alternate Functions
Alternate Function
P2.15
P2.14
P2.13
P2.12
P2.11
P2.10
P2.9
P2.8
P2.7
P2.6
P2.5
P2.4
P2.3
P2.2
P2.1
P2.0
a)
CC15IO
CC14IO
CC13IO
CC12IO
CC11IO
CC10IO
CC9IO
CC8IO
CC7IO
CC6IO
CC5IO
CC4IO
CC3IO
CC2IO
CC1IO
CC0IO
CAPCOM1
Capture Input / Compare Output
b)
EX7IN
EX6IN
EX5IN
EX4IN
EX3IN
EX2IN
EX1IN
EX0IN
c)
T7IN
Port 2
General Purpose
Input / Output
Fast External
Interrupt Input
CAPCOM2
Timer T7 Input
67/160