Texas Instruments MSP430x1xx User Manual
Page 126
Ports P1, P2
8-6
8.2.1.5
Interrupt Edge Select P1IES, P2IES
Each interrupt edge select register contains a bit for each corresponding I/O
pin to select what type of transition triggers the interrupt flag.
When:
Bit = 0: The interrupt flag is set with a low-to-high transition
Bit = 1: The interrupt flag is set with a high-to-low transition
Note:
Changing the P1IES and P2IES bits can result in setting the associated
interrupt flags.
PnIES.x
PnIN.x
PnIFG.x
0
→
1
0
Unchanged
0
→
1
1
May be set
1
→
0
0
May be set
1
→
0
1
Unchanged
8.2.1.6
Interrupt Enable P1IE, P2IE
Each interrupt enable register contains bits to enable the interrupt flag for each
I/O pin in the port. Each of the sixteen bits corresponding to pins P1.0 to P1.7
and P2.0 to P2.7 is located in the P1IE and P2IE registers.
When:
Bit = 0: The interrupt request is disabled
Bit = 1: The interrupt request is enabled
Note:
Port P1, Port P2 Interrupt Sensitivity
Only transitions, not static levels, cause interrupts.
If an interrupt flag is still set when the RETI instruction is executed (for
example, a transition occurs during the interrupt service routine), an interrupt
occurs again after RETI is completed. This ensures that each transition is
acknowledged by the software.
8.2.1.7
Function Select Registers P1SEL, P2SEL
P1 and P2 port pins are often multiplexed with other peripheral modules to
reduce overall pin count on MSP430 devices (see the specific device data
sheet to determine which other peripherals also use the device pins). Control
registers P1SEL and P2SEL are used to select the desired pin function—I/O
port or other peripheral module. Each register contains eight bits
corresponding to each pin, and each pin’s function is individually selectable.
All bits in these registers are reset by the PUC signal. The bit definitions are:
Bit = 0: Port P1 or P2 function is selected for the pin
Bit = 1: Other peripheral module function is selected for the pin