1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
marishachu [46]
4 years ago
15

Write programs for two MSP430 boards to do the following:

Computers and Technology
1 answer:
Rainbow [258]4 years ago
7 0

Answer:

Explanation:

#include "msp430g2553.h"

#define TXLED BIT0

#define RXLED BIT6

#define TXD BIT2

#define RXD BIT1

const char string[] = { "Hello World\r\n" };

unsigned int i; //Counter

int main(void)

{

WDTCTL = WDTPW + WDTHOLD; // Stop WDT

DCOCTL = 0; // Select lowest DCOx and MODx settings

BCSCTL1 = CALBC1_1MHZ; // Set DCO

DCOCTL = CALDCO_1MHZ;

P2DIR |= 0xFF; // All P2.x outputs

P2OUT &= 0x00; // All P2.x reset

P1SEL |= RXD + TXD ; // P1.1 = RXD, P1.2=TXD

P1SEL2 |= RXD + TXD ; // P1.1 = RXD, P1.2=TXD

P1DIR |= RXLED + TXLED;

P1OUT &= 0x00;

UCA0CTL1 |= UCSSEL_2; // SMCLK

UCA0BR0 = 0x08; // 1MHz 115200

UCA0BR1 = 0x00; // 1MHz 115200

UCA0MCTL = UCBRS2 + UCBRS0; // Modulation UCBRSx = 5

UCA0CTL1 &= ~UCSWRST; // **Initialize USCI state machine**

UC0IE |= UCA0RXIE; // Enable USCI_A0 RX interrupt

__bis_SR_register(CPUOFF + GIE); // Enter LPM0 w/ int until Byte RXed

while (1)

{ }

}

#pragma vector=USCIAB0TX_VECTOR

__interrupt void USCI0TX_ISR(void)

{

P1OUT |= TXLED;

UCA0TXBUF = string[i++]; // TX next character

if (i == sizeof string - 1) // TX over?

UC0IE &= ~UCA0TXIE; // Disable USCI_A0 TX interrupt

P1OUT &= ~TXLED; }

#pragma vector=USCIAB0RX_VECTOR

__interrupt void USCI0RX_ISR(void)

{

P1OUT |= RXLED;

if (UCA0RXBUF == 'a') // 'a' received?

{

i = 0;

UC0IE |= UCA0TXIE; // Enable USCI_A0 TX interrupt

UCA0TXBUF = string[i++];

}

P1OUT &= ~RXLED;

}

You might be interested in
Which Cisco IOS command is used to disable a device from performing naming lookups?
Ilia_Sergeevich [38]

Answer:

No ip dns server.

Explanation:

The DNS stands for domain name services. It can be statically or dynamically configured to a workstation from the DHCP request. It resolves the ip address of a server to it's name, so a client is not burdened by memorizing the ip address of every website.

In the cisco ios,  the "NO" command is used to negate other commands, so when a "no ip dns server" is used configured on a device, it stops every website name lookups.

3 0
4 years ago
Read the following scenario:
Fofino [41]

Answer:

I think it is the second answer choice honestly

Explanation:

I'm gonna say either the first one or second one because the word film has something to with behind the scenes work not being an actor.

8 0
3 years ago
Read 2 more answers
If an object someThing has a method someMethod( ), then you can call the method using the statement ____________ .
Stels [109]

Answer:

C) someThing.someMethod( )

Explanation:

The methods in a class can be accessed outside the class (assuming they are public methods and not private to the class) by using the dot(.) symbol and calling the method on the instance or object of the class.

In this case, the object of the class someThing, calls the method, someMethod( ) by using a dot and the name of the method with a parentheses at the end. This enables the code in the method act on the class instance or object.

8 0
3 years ago
For the krylov subspace method, run the Arnoldi method in matlab. You can get the matrix A in 10x10 or 20x20. Get a screenshot o
Firdavs [7]

Answer:

20x10

Explanation:

5 0
3 years ago
Read 2 more answers
What's a good online University to attended for cyber security certificate.?
IrinaK [193]

Answer:

If your in the UK, a great university to attend is Lancaster University for a cyber security certificate.

Explanation:

8 0
3 years ago
Other questions:
  • You will be given a grocery list, followed by a sequence of items that have already been purchased. You are going to determine w
    7·1 answer
  • When you declare a variable of a basic, primitive type, such as int x = 10;, the memory address where x is located holds the ___
    12·2 answers
  • Our Client, a renowned trading company, suffered a sudden, devastating power outage that caused their server to cease functionin
    13·1 answer
  • Order the steps for creating an outlook data file
    9·2 answers
  • Which process is based on repulsion of oil and water?
    5·1 answer
  • how to get into harvard stanford mit ivy league guaranteed upper middle class need aid 9th grade, computer science major have no
    15·1 answer
  • What is the difference between computer hardware and computer software?<br>​
    10·1 answer
  • The operating system software is necessary for a computer to function. true or false?
    12·1 answer
  • Which cyber protection condition establishes a protection.
    12·1 answer
  • Question 1 of 10
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!