Name: Grade: 710 [10] 1) For the following MSP430 C program, fill in the comments next...
Name: Grade: 710 [10] 1) For the following MSP430 C program, fill in the comments next to the // to indicate the function of the corresponding line. Be brief, no more than one line per comment; be inspired by the existing comments. #include <msp43092553.b> //LEDI mounted on bit as an output #define LEDI B ITO #define LED2 BITO #define BUTTON BIT3 unsigned int folds = 1; int i=1; void main(void) WDTCTL = WDTPW + WDTHOLD; // Stop watchdog timer PLOUT = Ox00; PIDIR = 0x00; PIDIR = (LED1 LED2); //make sure all default outputs are zero //set Port 1 to all inputs //enables internal resistor on the button pin PIREN = BUTTON PIOUT &=-BUTTON PLIES & BUTTON; PHIE = BUTTON; enable_interrupto; //enable interrupts activities for :) PIOUT (LED2); For (1 = 1; i <=folds; i++) __delay_cycles(100000);} //oggle LED2 on P1 6 using XOR // for a number of times equal to folds, // Port 1 interrupt service routine wpragma vector=PORTI VECTOR interrupt void Port_1(void) //LEDI on to indicate beginning of interrupt service PIOUT = LED1 folds++; if (folds >=6){folds = 1;} delay_cyeles(20000); PIIFG & BUTTON _delay_cycles(20000); PIOUT &=-LEDI: allow some delay for switch debounce //allow some delay for switch debounce