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.

why I cann't put pin to zero

Other Parts Discussed in Thread: MSP430F2419

I am using MSP430F2419

int main(void)
{
    WDTCTL = WDTPW + WDTHOLD; // Stop watchdog timer

   while(1)
 {
       P1OUT &= ~0x02;
   }

}

why I cann't put p1.1 to zero?

  • Hi ashlly,

    You need to first set the GPIO pin as an output.  By default, all GPIO pins are input after a power cycle.

    After you stop the watch dog, use this command:

    P1DIR |= 0x02;

    btw, you can also use this command to do the same:

    P1DIR |= BIT1;

**Attention** This is a public forum