Hi,
I am trying to communicate to the Tera Terminal program running on Windows 7. I am using MSP430F5438A and its Experienter Board. I am connected to the PC in the following way
MSP430 ----> MAX3232 board ---->Serial to USB adapter ----> PC(USB PORT)
MAZ3232 Board : http://www.mouser.com/ds/2/272/max3232_manual_v100-37494.pdf
Serial to USB Adapter: http://sgcdn.startech.com/005329/media/sets/ICUSB232V2_Manual/ICUSB232V2.pdf
http://www.startech.com/Cards-Adapters/Serial-Cards-Adapters/USB-to-RS232-Serial-Adapter-Cable~ICUSB232V2#dnlds
The driver for the Serial to USB adapter is installed and working fine. I configured the Tera Terminal program for
9600, 8 bit and 1 bit stop. Mycode is as follows
#include "msp430x54xA.h"
void main(void)
{
WDTCTL = WDTPW + WDTHOLD; // Stop WDT
P3IN = 0x20; // P3.5 RXD input
P3OUT = 0x10; // P3.4 TXD output
P3SEL = 0x30; // P3.4,5 = USCI_A0 TXD/RXD
UCA0CTL1 |= UCSWRST; // **Put state machine in reset**
UCA0CTL1 |= UCSSEL_1; // CLK = ACLK
UCA0BR0 = 0x03; // 32kHz/9600=3.41 (see User's Guide)
UCA0BR1 = 0x00; //
UCA0MCTL = UCBRS_3+UCBRF_0; // Modulation UCBRSx=3, UCBRFx=0
UCA0CTL1 &= ~UCSWRST; // **Initialize USCI state machine**
UCA0IE |= UCRXIE; // Enable USCI_A0 RX interrupt
__bis_SR_register(LPM3_bits + GIE); // Enter LPM3, interrupts enabled
__no_operation(); // For debugger
}
// Echo back RXed character, confirm TX buffer is ready first
#pragma vector=USCI_A0_VECTOR
__interrupt void USCI_A0_ISR(void)
{
switch(__even_in_range(UCA0IV,4))
{
case 0:break; // Vector 0 - no interrupt
case 2: // Vector 2 - RXIFG
while (!(UCA0IFG&UCTXIFG)); // USCI_A0 TX buffer ready?
UCA0TXBUF = UCA0RXBUF; // TX -> RXed character
break;
case 4:break; // Vector 4 - TXIFG
default: break;
}
}
Questions:
1. Is this a right hardware setup to go with?
2. I am not seeing the characters echo back. Does someone has any experience with it.
Melissa
