Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

please fill in the comments, thank you. MSP430 C program, fill in the comments next to the I/ to indicate the function onding line. Be

image text in transcribed

please fill in the comments, thank you.

MSP430 C program, fill in the comments next to the I/ to indicate the function onding line. Be brief, no more than one line per comment; be inspired by the o D For the following of the correspo existing comments Winclude Rdefine LEDI BITO /LEDI mounted on bit0 as an output define LED2 BIT6 #define BUTTON BIT3 unsigned int folds 1; 1nt -1 void main(void) WDTCTL WDTPW+WDTHOLD: /Stop watchdog timer PIOUT0x00; Vmake sure all default outputs are zero PIREN I= BUTTON; PIoUT&BUTTON; PIIES &BUTTON: PIE BUTTON; -enable-interrupt(); Wenables internal resistor on the button pin Wenable interrupts activities for (:) P 1 OUT (LED2); For (i-1; 1folds, i++) //toggle LED2 on P1.6 using XOR /for a number of times equal to folds, L_delay_cycles(100000):) / Port 1 interrupt service routine #pragma vector-PORT 1VECTOR - interrupt void Port 1(void) PIOUT LEDI; folds ++, if(folds >= 6) {folds-1; } WLEDI on to indicate beginning of interrupt service /allow some delay for switch debounce /allow some delay for switch debounce | // delay_cycles(20000); P1EFG &=-BUTTON; _delay cycles(20000); PIOUT &LED1

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