unrecognized token UCTL0 &= ˜SWRST

Status
Not open for further replies.

chintan_gaurav8

Newbie level 2
Joined
Jun 16, 2010
Messages
2
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Location
ahmedabad
Activity points
1,299
Hi, I write following program for UART transmission for MSP430. but it shows me error at "UCTL0 &= ˜SWRST;" that is "unrecognized token". Is it need to define any other library?

Code:
#include "io430.h"
int main( void )
{
  // Stop watchdog timer to prevent time out reset
  // Stop watchdog timer to prevent time out reset
  WDTCTL = WDTPW + WDTHOLD;
  P3SEL |= 0x30; // P3.4,5 = USART0 TXD/RXD
ME1 |= UTXE0 + URXE0; // Enable USART0 TXD/RXD
UCTL0 |= CHAR; // 8-bit character
UTCTL0 |= SSEL0; // UCLK = ACLK = 32.768kHz
UBR00 = 0x03; // 32.768kHz/9600 - 3.41
UBR10 = 0x00;
UMCTL0 = 0x4a; // Modulation
UCTL0 &= ˜SWRST; // Initialize USART state machine
IE1 |= URXIE0 + UTXIE0; // Enable USART0 RX/TX interrupt
 
 
  return 0;
}
 

Status
Not open for further replies.

Similar threads

Cookies are required to use this site. You must accept them to continue using the site. Learn more…