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.

Higher Baud Rates

Other Parts Discussed in Thread: MSP430FG4618

Hi, I am working on MSP430 Experimenter Board on MSP430FG4618. Presently , I am sending voltage signal via uart to the pc @ 115200 baud rate . I am giving 8Mhz frequency to the uart module and also to the MSP. I want to achieve higher baud rates than that . So I tried to give higher baud rates by putting the corresponding values in the uart control register . I am able to see some output in the hyperterminal window. But , in my vc++ program , I am not able to see any output . I have used the windows API and DCB structure . What is the problem ? Why am I not able to recieve the output in my vc++ program . I want the vc++ program because I am sending integer type via the uart by breaking it into individual bytes . So , I need to stich the bytes together at the recieving side . So, I am not sure if what I am getting in hyperterminal is correct ( as I am breaking the data into bytes and sending ). Please could someone tell what is going on and how I can achieve baud rates greater than 115200. Thanks Srikant Avasarala
  • First, you need to set a higher baudrate on the PC side too, of course. Yet you might face a problem here: despite the fact that you maybe can select higher baudrates in the COM driver, the PC hardware is often limited to 115200 and does not properly support the next higher step. I was unable to do a reliable loopback form one PC port to another with higher baudrates than 115200 on my development machine. The other thing is the MSp side. The UARTs in almos tall MSPs support a maximum baudrate of 1MBit. It is, however, difficult to find a proper divider from system clock to bit clock when the bit clock is high. Unless you can provide a system clock that fits well, the resulting bit error might exceed what is tolerable. One more issue can be the required level shifter that converts the TTL level signals to the (inverted and symmetrical) RS232 voltages. The cheaper ones are limited in maximum baudrate too. Above this limit, the signals get blurred, the voltages don't rise enough or the included voltage converter cannot provide the required current. You can convert the integer to a (4 letter) hex value and send it. This way you'll get readable characters on HyperTerm, 4 digits giving one INT value. You can use sprintf or ITOA (with base 16) to produce a string with the converted value, and then send the string char by char.
  • Hi Srikant

    please check FT232RL on Ftdi Chip site. This chip is a converter from serial to USB. It implements virtual com port on PC. Serial speed can be set up to 3Mbps, non standard baudrates can be used. On MSP site you will connect the chip to USCI and on PC you will see additional serial port that can be configured according to your needs. You will be not limited to regular baudrates and the limitations on standard RS232.

    Regards,
    Piotr Romaniuk, Ph.D.
    ELESOFTROM

  • Hi

    Jens-Michael Gross said:

    It is, however, difficult to find a proper divider from system clock to bit clock when the bit clock is high.

    Please could you elaborate. Also , i am using a RS232 to USB converter on the pc side to achieve higher baud rates . Even then I am not able to receive anything on the vc++ program on the pc . I am not able to figure out how to go about it since I need to send the data at baud rates higher than 115200 . Also in the MSP430X4XX family data sheet ,  chapter number 19 page 561 , I read "In this mode, the maximum USCI baud rate is 1/16 the UART source clock frequency BRCLK ". I am giving 8 MHz as the BRCLK (from the MCLK) . Even then why am I not able to get results?

    Thanks

    Srikant Avasarala

  • Srikant Avasarala said:
    In this mode, the maximum USCI baud rate is 1/16 the UART source clock frequency BRCLK

    'this mode' means the overclocking mode. While it gives better results than the normal mode (it has to do with when the majority votes are taken). Since the overclocking requires 16 sub clocks per bit, the maximum baudrate when BRCLK is (Mhz will be 512,000Bd.

    You can, however, use the normal mode for getting a baudrate of 1MBd (more is not supported)

    My statement about finding a divider was about baudrates which are no whole fractions of BRCLK. Then the closer the baudrate is to BRCLK the higher the timing errors are.
    So if BRCLK is 8MHz and the wanted baudrate is 460800, (115,299*4), the required divider (for oversampling mode) would be 1.111, which means 11.1% error for the first bit, 22.2% error on the second, and the modulation cannot do anything, as increasing the divider by 1 would be 2 and cause -88.9% error.

  • FT232 allows setting exactly 1Mbps, as well as other non standard speeds (there is also non integer divider feature).

    Rgeards,
    Piotr Romaniuk, Ph.D.
    ELESOFTROM

  • Hi Srikant,

    I have got one more question, in what direction do you need that high speed?
    From PC to MCU or the reverse direction?

    It is important, because if you use USB-RS232 converters they provide high throughput from PC->MCU, but in reversed direction the achieved speed is limited due to USB nature. This type of interface uses polling method, so packet can be transmited from MCU only every 1ms. Hence, you cannot expect full speed in that direction.

    Regards,
    Piotr Romaniuk, Ph.D.
    ELESOFTROM

  • Hi Piotr Romaniuk,


    I am sending the data from MCU to PC side .

    Thanks,

    Srikant Avasarala

**Attention** This is a public forum