Part Number: MSP430G2553
Tool/software: TI C/C++ Compiler
Hello,
i am a beginner in embedded c, i have a issue that while im running a program to recieve the character it is seen that the signal comes repeatedly for ex: if i type 'b' only once,it comes repeatedly
so please help to get a programme that if i type 'c' once it should come on the screen only once.im using code composer and my programme is written below
#include "msp430g2553.h"
#define TXD BIT2
#define RXD BIT1
int main(void)
{
WDTCTL = WDTPW + WDTHOLD; // Stop WDT
BCSCTL1 = CALBC1_1MHZ; // Set DCO
DCOCTL = CALDCO_1MHZ;
P1SEL |= RXD + TXD ; // P1.1 = RXD, P1.2=TXD
P1SEL2 |= RXD + TXD ; // P1.1 = RXD, P1.2=TXD
UCA0CTL1 |= UCSSEL_2; // SMCLK
UCA0BR0 = 104; // 1MHz 9600
UCA0CTL1 &= ~UCSWRST; // **Initialize USCI state machine**
while (1)
{
UCA0TXBUF = UCA0RXBUF;
__delay_cycles(1000000);
}
}