Accessing individual I/O pin on MSP430
In the MSP430, accessing individual pins is commonly written using defines and bitwise operators:

P2OUT &amp;= ~BIT1;    /* Pin P2.1 = 0 */
P2OUT |= BIT1;     /* Pin P2.1 = 1 */
P2OUT ^= BIT1;     /* Toggle Pin P2.1 */


Be sure to include the proper header file for your specific chip that contains the port and pin (BIT#) defines.