Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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 Finclude
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 Finclude "msp.h" volatile cnt: void main(void) { NOT_A->CTL-WDT_A_CTL_PKINDT_A_CTL_HOLD; P1->DIR - Ox01; TIMER AO->CCRO) - 50000; TIMER_A0->CTL = TIMER_A_CTL_TASSEL_2 TIMER_A_CTL_MC_1 while (1) for (cnt-0;cntCCTL[O] & TIMER A CCTLN CCIFG)-0) P1-OUT Ox013 TIMER_A0->OCTLO) = -TIMER_A_CCTLN_CCIEGT TIMER_A_CTL_CLRI P1->OUT - Ox01; for (cnt=0; entCTL - WDT_A_CTL_PW P1->DIR = Ox01; P1->REN = Ox02; P1->OUT = Ox01; while (1) if (PI->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 Finclude "msp.h" volatile cnt: void main(void) { NOT_A->CTL-WDT_A_CTL_PKINDT_A_CTL_HOLD; P1->DIR - Ox01; TIMER AO->CCRO) - 50000; TIMER_A0->CTL = TIMER_A_CTL_TASSEL_2 TIMER_A_CTL_MC_1 while (1) for (cnt-0;cntCCTL[O] & TIMER A CCTLN CCIFG)-0) P1-OUT Ox013 TIMER_A0->OCTLO) = -TIMER_A_CCTLN_CCIEGT TIMER_A_CTL_CLRI P1->OUT - Ox01; for (cnt=0; entCTL - WDT_A_CTL_PW P1->DIR = Ox01; P1->REN = Ox02; P1->OUT = Ox01; while (1) if (PI->IN & Ox02) P1->OUT = 0x01; else P1->OUT = Ox00
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started