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
Why is Apple using social media ?
jeka57 [31]

Apple uses social media to promote their products and increase user-engagement. This is a very effective method of advertising.

6 0
4 years ago
Why did scientists who study weather need more advanced technology? Check all that apply.
kobusy [5.1K]

Answer:

All options are correct.

Explanation:

All options apply to the question because they all need technology for development and improvement. Scientists needed to develop more technologies in order to attend all their necessities, such as anticipating weather changes, forecasting weather previously, predicting weather behaviour in different places and in one specific place, accounting for reasons and natural resources related to weather changes, and much more. Therefore, technology provides faster and more consistent data for all these informations needed, since all technology tools to study weather were developed according to their specific needs.

4 0
3 years ago
Read 2 more answers
This is not what I asked for​
jolli1 [7]
?? What does that mean? What is the question
3 0
3 years ago
What types of storage can be used to access your data on a another computer
vladimir1956 [14]
1. Cloud Storage, such as dropbox or Google drive,
2. Network attached storage, where all your data is stored on a central NAS, and you can access it in Windows explorer or Mac Finder
3 Data on flash drive or on an external hard drive.
3 0
3 years ago
What is the full form of MPEG?<br> The full form for MPEG is ________.
SVEN [57.7K]

Answer:

Moving Picture Experts Group

Explanation:

5 0
2 years ago
Other questions:
  • Which of the following is a goal of paraphrasing and summarizing?
    14·2 answers
  • Help asap. 10 points.
    8·2 answers
  • 5. In Access, data is stored in a _______ once a form is completed. A. cell B. page C. record D. form
    13·1 answer
  • What is wrong with the following code?
    11·1 answer
  • Note oj cyber security​
    6·1 answer
  • What is the primary purpose of endnotes?
    6·2 answers
  • Opinion on sandshrew​
    13·1 answer
  • What is a good range for CPU usage to be considered running well?
    15·1 answer
  • A time stamp indicates the date and time that a measurement was taken. A data scientist has a list containing 10,000 time stamps
    6·1 answer
  • a central issue in the microsoft antitrust lawsuit involved microsoft's integration of its internet browser into its windows ope
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!