Question: We are using the MSP432P401R launchpad and coding on Code Composer 1) Write and test the following code on your Launchpad. Based on the code,

We are using the MSP432P401R launchpad and coding on Code Composer

We are using the MSP432P401R launchpad and coding on Code Composer 1)

1) Write and test the following code on your Launchpad. Based on the code, describe the behavior of the LED1, and include your reasoning/explanation #include "msp.h" volatile cnt; void main(void) { NDT_A->CTL = WDT_ACTL_PWI WDT A CTL_HOLD; P1->DIR - Ox01; TIMER_A0->OCR[0] = 50000; TIMER_A0->CTL - TIMER_A_CTL_TASSEL_2 TIMER_A_CTL_MC_1 | TIMER_A_CTL_CLR; while (1) for (cnt-0; entCCTL[0] & TIMER_A_CCTLN_CCIFG) !=0) { P1->OUT A= Ox01; TIMER_A0->CCTLTO) = -TIMER_A_CCTLN_CCIFG; P1->OUT = Ox01; for (cnt-0;cntCTL = WDT A CTL PW | WDT A CTL HOLD; P1->DIR = Ox01; P1->REN = Ox02; P1->OUT = Ox01; while (1) if (P1->IN & Ox02) P1->OUT = 0x01; else P1->OUT = Ox00; 1) Write and test the following code on your Launchpad. Based on the code, describe the behavior of the LED1, and include your reasoning/explanation #include "msp.h" volatile cnt; void main(void) { NDT_A->CTL = WDT_ACTL_PWI WDT A CTL_HOLD; P1->DIR - Ox01; TIMER_A0->OCR[0] = 50000; TIMER_A0->CTL - TIMER_A_CTL_TASSEL_2 TIMER_A_CTL_MC_1 | TIMER_A_CTL_CLR; while (1) for (cnt-0; entCCTL[0] & TIMER_A_CCTLN_CCIFG) !=0) { P1->OUT A= Ox01; TIMER_A0->CCTLTO) = -TIMER_A_CCTLN_CCIFG; P1->OUT = Ox01; for (cnt-0;cntCTL = WDT A CTL PW | WDT A CTL HOLD; P1->DIR = Ox01; P1->REN = Ox02; P1->OUT = Ox01; while (1) if (P1->IN & Ox02) P1->OUT = 0x01; else P1->OUT = Ox00

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!