Question

Write a program for the msp430FR6989 to make led1 and led 2 alternate blinking 2. repeat...

Write a program for the msp430FR6989 to make led1 and led 2 alternate blinking 2. repeat the program to make each led blink 5 times in a sequence, then 5 times simultaneously

Homework Answers

Answer #1

Hello,
       Please find the answer to the first question (Program 1) attached below. If the answer has helped you please give a thumbs up rating. Thank you and have a nice day!

************ C Code for Led 1 and 2 alternate blinking *******

//Demo app to blink LED1 and LED2 on the TI Launchpad
//which is attached to P1.0 and P2.0 respectively
//The green LED(LED2) is connected to P1.6

#include <msp430g2553.h>

int main(void) {
volatile int i;

// stop watchdog timer
WDTCTL = WDTPW | WDTHOLD;
// set up bit 0 and bit 1 of P1 as output
P1DIR = 0x02;
// intialize bit 0 of P1 to 0 and bit 1 to 1
P1OUT = 0x02;


// loop forever
for (;;) {
    // toggle bit 0 and bit 1 of P1
    P1OUT ^= 0x03;
    // delay for a while
    for (i = 0; i < 0x6000; i++);
}
}

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
design a C++ program that make use to embedded in a Arduino micro controller. that will...
design a C++ program that make use to embedded in a Arduino micro controller. that will control a conveyor belt. the program must be able to start and stop the conveyor belt. should have 3 led light on it.( red led is used when conveyor is running) (yellow led is when conveyor is about to move must blink 10 times and should sound a beeping alarm) (green is when conveyor is stop) you also have to add a Start and...
Write an assembly program that toggles a LED connected to pin4 of PORTB with a custom...
Write an assembly program that toggles a LED connected to pin4 of PORTB with a custom delay time.
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...
In Java. Write a program that reads-in a times table-number. The program, using this table-number will...
In Java. Write a program that reads-in a times table-number. The program, using this table-number will produce the following report (as shown). The first item in the report is a number with starting value 1. Second column is the word “ X ” (representing the times symbol). Third column is the table-number (itself). Following is an equal sign “ = “ (representing a result). Last column is the result of the operation for that line or row which is the...
Write a VSC (macro) program that computes and displays a Fibonacci sequence. A Fbonacci sequence is...
Write a VSC (macro) program that computes and displays a Fibonacci sequence. A Fbonacci sequence is generated by adding the two most recent sequence numbers together, i.e., 1, 1, 1+1-2, 1+2=3, 2+3=5, 3+5=8, … The user will enter the number of terms in the sequence to be displayed. Assemble this program using the VSC assembler (ASM), and simulate this program using the VSC simulator (SIM). Include a copy of the source listing (SOURCE.DAT), the assembled listing (SLIST.DAT) and the simulation...
Write a python program to determine the smallest number in a sequence and illustrate it with...
Write a python program to determine the smallest number in a sequence and illustrate it with a table showing the values of the variables for each step. use the sequence​ {7,5,3,2,4}
JAVA (Don't make it too complicated) Write a program that prompts the user for the name...
JAVA (Don't make it too complicated) Write a program that prompts the user for the name of a text file. The file should consist of a sequence of integers, one integer per line. The program will read in each line (using nextLine()), parse it as an int (using Integer.parseInt()), and report the number of values and their average. The average should be computed as a double. Your program should do some basic exception handling: (1) If the file cannot be...
Write a Java program segment (not an entire program) that will summarize the season results for...
Write a Java program segment (not an entire program) that will summarize the season results for 5 players on one of TRU’s basketball teams. Each player played 10 games. Your program segment should ask the user for a player’s name, followed by the points that player scored in each of the 10 games (a total of 11 pieces of input). Your program will then produce the summary line shown below for that player.   Your program should get the data for...
Hi, I'm currently stuck with my homework. I need to know how to write this program...
Hi, I'm currently stuck with my homework. I need to know how to write this program in Python as below: Write function repeatPhrase(phrase, n), which prints the given phrase n times, alternating between lowercase and uppercase. For example, repeat('The sky is blue', 5) would print: the sky is blue THE SKY IS BLUE the sky is blue THE SKY IS BLUE the sky is blue Please help me, thank you very much!
Write a program which: Write a program which uses the following arrays: empID: An array of...
Write a program which: Write a program which uses the following arrays: empID: An array of 7 integers to hold employee identification numbers. The array should be initialized with the following values: 1, 2, 3, 4, 5, 6, 7. Hours: an array of seven integers to hold the number of hours worked by each employee. payRate: an array of seven doubles to hold each employee’s hourly pay rate. Wages: an array of seven doubles to hold each employee’s gross salary....
ADVERTISEMENT
Need Online Homework Help?

Get Answers For Free
Most questions answered within 1 hours.

Ask a Question
ADVERTISEMENT