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 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
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
Get step-by-step solutions from verified subject matter experts
