TC1784
General Purpose I/O Ports and Peripheral I/O Lines (Ports)
User´s Manual
9-3
V1.1, 2011-05
Ports, V1.1
– ENx - the pins in one port having the same ENx (x=0, 1, 2, ...), are controlled as a
group by a dedicated HW_EN signal.
– SEN - Single EN - the pin is controlled by its own, dedicated, single HW_EN signal
•
Digital port slices with HW_DIR defined are the ports described in
.
Note: HW_EN signal has higher priority then Emergency Stop. Emergency Stop is
functional when the pins are set in the GPIO mode
.
Note: HW_DIR signal, output case, switches the pad to push-pull output state.
HW_DIR signal, input case, switches the pad to the input state with pull-up/down
setting as defined by the IOCR register.
9.1.2
Description of the port operation
Each port line has a number of control and data bits, enabling very flexible usage of the
line. Each port pin can be configured for input or output operation. In input mode (default
after reset), the output driver is switched off (high-impedance). The actual voltage level
present at the port pin is translated into a logic 0 or 1 via a Schmitt-Trigger device and
can be read via the read-only register Pn_IN. An input signal can also be connected
directly to the various inputs of the peripheral units (AltDataIn). The function of the input
line from the pin to the input register Pn_IN and to AltDataIn is independent of whether
the port pin operates as input or output. This means that when the port is in output mode,
the level of the pin can be read by software via Pn_IN or a peripheral can use the pin
level as an input.
In output mode, the output driver is activated and drives the value supplied through the
multiplexer to the port pin. Switching between input and output mode is accomplished
through the Pn_IOCR register, which enables or disables the output driver. If a
peripheral unit uses a GPIO port line as bi-directional I/O line, register Pn_IOCR has to
be written for input or output selection. The Pn_IOCR register also controls the driver
type of the output driver and determines whether an internal weak pull-up or pull-down
device is alternatively connected to the pin when used as an input. This offers additional
advantages in an application.
The output multiplexer in front of the output driver selects the signal source for the GPIO
line when used as output. If the pin is used as general-purpose output, the multiplexer is
switched by software (Pn_IOCR register) to the Output Data Register Pn_OUT. Software
can set or clear the bit in Pn_OUT, and therefore it can directly influence the state of the
port pin. If the on-chip peripheral units use the pin for output signals, the alternate output
lines ALT1 to ALT3 can be switched via the multiplexer to the output driver. The data
written into the output register Pn_OUT by software can be used as input data to an
on-chip peripheral. This enables, for example, peripheral tests via software without
external circuitry.
When selected as general-purpose output line, the logic state of each pin of a port can
be changed individually by programming the pin-related bits in the Output Modification
Summary of Contents for TC1784
Page 1: ...User s Manual V1 1 2011 05 Microcontrollers TC1784 32 Bit Single Chip Microcontroller ...
Page 3: ...User s Manual V1 1 2011 05 Microcontrollers TC1784 32 Bit Single Chip Microcontroller ...
Page 950: ...TC1784 Direct Memory Access Controller DMA User s Manual 11 132 V1 1 2011 05 DMA V3 03 ...
Page 1949: ...TC1784 General Purpose Timer Array GPTA v5 User s Manual 21 297 V1 1 2011 05 GPTA v5 V1 14 ...
Page 2350: ...w w w i n f i n e o n c o m Published by Infineon Technologies AG Doc_Number ...