MSP430 GPIO
Pin Selection
The PxSEL register lets you choose whether to use a peripheral or GPIO functionality for each
pin. As you can see in the diagram below, DriverLib provides functions to specify this
functionality.
Pin Flexibility
7 6 5 4 3 2 1 0
SEL
IN / OUT
Peripheral
(e.g. Timer)
Most pins on MCU’s are multiplexed to provide
you with greater flexibility
Often, two (or more) digital peripherals are
connected to the pin – in this case, some families
use PxDIR to select between them, while others
have multiple PxSEL registers
P1SEL.1
“PxSEL = 0”
“PxSEL = 1”
GPIO_setAsPeripheralModuleFunctionOutputPin( port, pin );
GPIO_setAsPeripheralModuleFunctionInputPin( port, pin );
In some devices, you’ll actually find two select registers – which provides more pin mux options.
3 - 12 MSP430 Workshop - Using GPIO with MSP430ware