hi
well i am working on a project which involves sending and receiving data from a microcontroller. for this i have written a simple code in which the microcontroller is sending a byte of data to the computer, but when i try viewing the data in hyperterminal nothing is being displayed, instead whatever i type is just getting echoed from the microcontroller. i am using a MSP430FG4619, the board i am using has an usb interface(picture of test board uploaded). the code that i have written to just send some bytes to pc is :
#include <msp430FG4619.h>
void main(void)
{
volatile unsigned int i;
WDTCTL = WDTPW+WDTHOLD;
FLL_CTL0 |= XCAP14PF;
P4SEL |= 0xC0;
do
{
IFG1 &= ~OFIFG;
for (i = 0x47FF; i > 0; i--);
}
while ((IFG1 & OFIFG));
ME2 |= UTXE1 + URXE1;
U1CTL |= CHAR;
U1TCTL |= SSEL1;
U1BR0 = 0x09;
U1BR1 = 0x00;
U1MCTL = 0x08;
U1CTL &= ~SWRST;
IE2 |= URXIE1 + UTXIE1;
}
#pragma vector=USART1RX_VECTOR
__interrupt void USART1_rx (void)
{
while (!(IFG2 & UTXIFG1));
TXBUF1 = 0x42;
}
since i am new to this i didnt know much about it, just wrote this code seeing some examples.
can anyone find out what's wrong with this code?? or is there some other way to go about this??
thanks in advance!!
