This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Compiler/MSP430F169: USART/MSP430F169

Part Number: MSP430F169

Tool/software: TI C/C++ Compiler

I use msp430f169 to collect siginal  with internal A/D and transfer by usart0. Can Baud rate achieve above 115200 when Crystal is 8M?

I receive the data and find data is wrong.

The frequency of signal is between 100Hz to 3000Hz.

Can you recommend  another MSP430 to help me realize the function of signal collection and transferring. The accury of A/D is better than 12 bit,the Baud rate is better than 1M.

Thanks!

  • Yes, you can. Even with BRCLK = 1MHz, you can get 115200 baud rate. But I think you need to calculate the parameters to save in registers by yourself.

    I will advice FR2153, with 12bit ADC. For baud rate calculation, you can refer to UG or this website:http://software-dl.ti.com/msp430/msp430_public_sw/mcu/msp430/MSP430BaudRateConverter/index.html

    Eason

  • Thank you for your answer.I think my caculation about baud rate is right. I test 4 times,fist baud rate is 115200,second is 230400,third is 460800,fourth is 921600.

    I receive data by using uartassist  from PC,when the baud rate is 921600 ,the data will dislocation, i think MSP430F169 can not support  the higher speed baud rate. When i use 115200,230400,460800,the  receive data is right. The following is my program,thanks for your help!

    #include <msp430x16x.h>
    #include "math.h"

    unsigned int ADvalue;
    unsigned char a[2];

    void ADC12Init(void);
    void UART0Init(void);


    void UART_Send_Byte(unsigned char mydata)
    {
    TXBUF0=mydata;
    while((UTCTL0&0x01)==0);
    }


    void main(void)
    {
    WDTCTL=WDTPW+WDTHOLD;
    BCSCTL1 &=~0x80;
    BCSCTL2 |=SELM1;
    BCSCTL2 |=0x88;
    ADC12Init();
    UART0Init();
    _EINT();
    ADC12CTL0|=ADC12SC;
    while(1);
    }


    void ADC12Init(void)
    {
    P6SEL =0X01;
    ADC12CTL0&=~ENC;
    ADC12CTL0 = ADC12ON;
    ADC12CTL1 = CONSEQ_0+SHP+ADC12SSEL_2;
    ADC12MCTL0=SREF_0;
    ADC12IE =BIT0;
    ADC12CTL0 |= ENC;
    }

    void UART0Init(void)
    {
    UCTL0 &=~SWRST;
    UCTL0=0x10;
    UTCTL0 =SSEL0+SSEL1;
    UBR00 =0x40;                 //Crystal IS 7.392MHz,115200
    UBR10 =0x00;
    UMCTL0 =0x01;
    ME1 =0x80;
    P3SEL |=0X30;
    P3DIR |=0X10;
    }

    #pragma vector=ADC_VECTOR
    __interrupt void ADC(void)
    {
    switch(ADC12IV)
    {
    case 0x02:break;
    case 0x04:break;
    case 0x06:
    ADvalue =ADC12MEM0;
    a[0]=ADvalue&0xFF;
    a[1]=(ADvalue>>8)&0xFF;
    UART_Send_Byte(a[1]);
    UART_Send_Byte(a[0]);
    ADC12CTL0 |=ADC12SC;
    default:break;
    }
    }

  • As you have solved the problem, I will close this thread.

  • Sorry,I  do not know whether my program is right.

    My question is when i use 921600  baud rate,my receive data is wrong.While i use 115200,230400,460800,receive data is right.

  • The max baud rate seems can reach 1000000000/500 = 2M. But I don't know the highest baud rate form the spec.

    For G2 or FRAM device,  it is clearly show that it can reach over 1M baud rate.

    G2553:

    F2153:

    If you want me to double check it for you, please post the data you saved in related registers.

    Eason

**Attention** This is a public forum