This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

How to observe transmitted data using UART Code

Other Parts Discussed in Thread: MSP430F2132

I am using MSP430F2132 MCU.

By loading below program I am not able to see expected waveform on P3.4 PIN.

 

#include <msp430.h>

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

unsigned int i;

 int main(void)

{

  WDTCTL = WDTPW + WDTHOLD;                 // Stop WDT

  P1DIR = 0xFF;                             // All P1.x outputs

  P1OUT = 0;                                // All P1.x reset

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

  P2OUT = 0;                                // All P2.x reset

  P3SEL = 0x30;                             // P3.4,5 = USCI_A0 TXD/RXD

  P3DIR = 0xFF;                             // All P3.x outputs

  P3OUT = 0;                                // All P3.x reset

  UCA0CTL1 |= UCSSEL_1;                     // CLK = ACLK

  UCA0BR0 = 0x03;                           // 32kHz/9600 = 3.41

  UCA0BR1 = 0x00;                           //

  UCA0MCTL = UCBRS1 + UCBRS0 ;               // Modulation UCBRSx = 3

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

  IE2 |= UCA0TXIE;                        // Enable USCI_A0 TX interrupt

  IFG2 |= 0x02;

   __bis_SR_register(LPM3_bits + GIE);       // Enter LPM3 w/ int until Byte RXed

}

 #pragma vector=USCIAB0TX_VECTOR

__interrupt void USCI0TX_ISR(void)

{

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

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

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

}

 While debugging TXBUF value loaded correctly.

But when I look for P3.OUT resistor It shows no effect.

Please help if any one have solution.

Jehan Patel