hey m using an Express card as my laptop does not has a serial port. When i use in device manager i see two COM port, one is of the express card & other is of MSP430, i select the one for express card & try to connect to hyperterminal. I am able to establish a connection but after that in the hyperterminal text area i cannot type any data to be transmitted & if i do type the data is not echoed back. Can you please help me where am i going wrong.
the code is:
#include "msp430xG46x.h"
void main(void)
{
volatile unsigned int i;
WDTCTL = WDTPW+WDTHOLD; // Stop WDT
FLL_CTL0 |= XCAP14PF; // Configure load caps
do
{
IFG1 &= ~OFIFG; // Clear OSCFault flag
for (i = 0x47FF; i > 0; i--); // Time for flag to set
}
while ((IFG1 & OFIFG)); // OSCFault flag still set?
P4SEL |= 0x0C0; // P4.7,6 = USCI_A0 RXD/TXD
UCA0CTL1 |= UCSSEL_1; // CLK = ACLK
UCA0BR0 = 0x03; // 32k/9600 - 3.41
UCA0BR1 = 0x00; //
UCA0MCTL = 0x06; // Modulation
UCA0CTL1 &= ~UCSWRST; // **Initialize USCI state machine**
IE2 |= UCA0RXIE; // Enable USCI_A0 RX interrupt
_BIS_SR(LPM0_bits + GIE); // Enter LPM0, interrupts enabled
}
// Echo back RXed character, confirm TX buffer is ready first
#pragma vector=USCIAB0RX_VECTOR
__interrupt void USCIA0RX_ISR (void)
{
while(!(IFG2&UCA0TXIFG))
UCA0TXBUF = UCA0RXBUF; // TX -> RXed character
}
I guess the interrupt ia not handled.
Thanx.
Sid