Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

image text in transcribed

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

8. Explain the contact hypothesis.

Answered: 1 week ago

Question

7. Identify four antecedents that influence intercultural contact.

Answered: 1 week ago