Question

Write CCS(code composer studio) command for The microcontroller(MSP430g2553). It will wait for a button push with...

Write CCS(code composer studio) command for The microcontroller(MSP430g2553). It will wait for a button push with the red LED on and Green Led off. Once the button is pushed, the red led will go off, and green LED will light for 5 seconds. (Use a slight delay here (specific timing not specified). During that time, the MCU will keep track of button pushes. After 5 seconds, it will blink the red LED t he same number of times that were counted. The flashing rate of the led will be approxima tely 2 flashes per second. It will then return to the initial state with the Red led on and Green off, waiting for a button push.

Homework Answers

Answer #1

  BLINKING AN LED:

while(TRUE)
{
PIN_setOutputValue(hPin,Board_LED0,IOID_10);
Task_sleep (delaybyDurationUs / Clock_tickPeriod);
PIN_setOutputValue(hPin,Board_LED0,IOID_0);
Task_sleep (delaybyDurationUs / Clock_tickPeriod);
PIN_setOutputValue(hPin,Board_LED1,IOID_15);
Task_sleep (delaybyDurationUs / Clock_tickPeriod);
PIN_setOutputValue(hPin,Board_LED1,IOID_0);
Task_sleep (delaybyDurationUs / Clock_tickPeriod);
}
}

Give delay as per your requirement

Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions