USART0- Receiver

Hello, i am Ravi beginner of MSP430 family controller(MSP430F1611). i am usin one downloaded code from TI website for interrupt based Receiver program i am debugging this program can't receive any charector from receive buffer. so please clarify anybody this group. herewith i am attached thos code.

#include

void main(void) { WDTCTL = WDTPW + WDTHOLD; // Stop WDT P3SEL |= 0x30; // P3.4,5 = USART0 TXD/RXD P3DIR |= 0x10; ME1 |= UTXE0 + URXE0; // Enable USART0 TXD/RXD UCTL0 |= CHAR; // 8-bit character UTCTL0 |= SSEL0; // UCLK = ACLK UBR00 = 0x03; // 32k/9600 - 3.41 UBR10 = 0x00; // UMCTL0 = 0x4A; // Modulation UCTL0 &= ~SWRST; // Initialize USART stat machine IE1 |= URXIE0; // Enable USART0 RX interrupt _BIS_SR(LPM3_bits + GIE); // Enter LPM3 w/ interrupt }

#pragma vector=UART0RX_VECTOR __interrupt void usart0_rx (void) { while (!(IFG1 & UTXIFG0)); // USART0 TX buffer ready? TXBUF0 = RXBUF0; // RXBUF0 to TXBUF0 }

Reply to
msp430
Loading thread data ...

// P3.4,5 = USART0 TXD/RXD

I suspect that the // 32k/9600 - 3.41 statement is not giving you a good enough frequency. I mean not close enough to 9600baud. Try

1200 if you can. Also I bet TI has an application not that should address this issue.

george

Reply to
GMM50

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.