This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CCS/MSP432P401R: TurnOn Led by pushbutton

Part Number: MSP432P401R

Tool/software: Code Composer Studio

Hi everyone I am new to MSP432 . I want to turn on led by pressing push button.

Since i am new to this, i would like to know detailed about pin selction and coding details.can anyone please help in this.

#include "msp.h"

void main(void)
{
volatile uint32_t i;

WDTCTL = WDTPW | WDTHOLD; 


int value = P1IN & BIT1;


while(1)
{


if(value==0)

P1OUT |= BIT0;


else
P1OUT &= ~BIT0;

}
}

**Attention** This is a public forum