
I/O Configuration
RETI
; Back to main program
5
P1_0_HND
; Vector 2: Port 1 bit 0
...
; Task starts here
RETI
; Back to main program
5
8.2.6.2
Interrupt Edge Select Registers (PxIES)
Each PxIES bit selects the interrupt edge for the corresponding I/O pin.
•
Bit = 0: Respective PxIFG flag is set on a low-to-high transition
•
Bit = 1: Respective PxIFG flag is set on a high-to-low transition
NOTE:
Writing to PxIES
Writing to
or
for each corresponding I/O can result in setting the corresponding
interrupt flags.
PxIES
PxIN
PxIFG
0
→
1
0
May be set
0
→
1
1
Unchanged
1
→
0
0
Unchanged
1
→
0
1
May be set
8.2.6.3
Interrupt Enable Registers (PxIE)
Each PxIE bit enables the associated PxIFG interrupt flag.
•
Bit = 0: The interrupt is disabled
•
Bit = 1: The interrupt is enabled
8.3
I/O Configuration
8.3.1 Configuration After Reset
After a reset, all port pins are configured as inputs with their module functions disabled. To prevent floating
inputs, all port pins, including unused ones (
), should be configured according to the
application needs as early as possible during the initialization procedure.
8.3.2 Configuration of Unused Port Pins
To prevent a floating input and to reduce power consumption, unused I/O pins should be configured as I/O
function, output direction, and left unconnected on the PC board. The value of the PxOUT bit is don't care,
because the pin is unconnected. Alternatively, the integrated pullup or pulldown resistor can be enabled
by setting the PxREN bit of the unused pin to prevent a floating input. See the
System Resets, Interrupts,
and Operating Modes, System Control Module (SYS)
chapter for termination of unused pins.
NOTE:
Configuring port PJ and shared JTAG pins:
The application should make sure that port PJ is configured properly to prevent a floating
input. Because port PJ is shared with the JTAG function, floating inputs may not be noticed
when in an emulation environment. Port J is initialized to high-impedance inputs by default.
297
SLAU272C – May 2011 – Revised November 2013
Digital I/O
Copyright © 2011–2013, Texas Instruments Incorporated