Question: 1. Given the following C program written for the MSP430 LaunchPad: #include int num [9]={1,1,0,1,0,1,0,1,0}; void main (void) { } WDTCTL-WDTPW | WDTHOLD; int

1. Given the following C program written for the MSP430 LaunchPad: #include

 

1. Given the following C program written for the MSP430 LaunchPad: #include int num [9]={1,1,0,1,0,1,0,1,0}; void main (void) { } WDTCTL-WDTPW | WDTHOLD; int i=0,zeros=0, ones=0; P1DIR=BITO+BIT6; P10UT=0; while(i ones) P1OUT-BITO; else P1OUT=BIT6; while(1); a) Comment each line of code (10 pts) b) Run the code in CCS (Code Composer Studio) and tell which LED connected to P1.0 or LEM connected to P1.6 will turn on. (15 pts) (Observe P1 Registers) c) Provide a demo video as proof of your findings from part b. (15 pts)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

a Commented code c include msp430 h Include the MSP430 header file int num9 1 1 0 1 0 1 0 1 0 Define ... View full answer

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 Programming Questions!