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.

PGA900: PGA900 UART baud rate

Part Number: PGA900

Hi:

I want to use 38400 baud rate. But the BAUD_RATE= 5.51 that use PGA900 datasheet baud rate equation .

How could I set the register? 5 or 6?

 

I set baud rate to 19200, UART commnicate is ok.

But when I set baud rate to 38400, PGA900 board can't receive date successfuly.

Thanks

  • Hi Hao Su,

    Let me get back to you tomorrow with a better reply.

    Thanks,

    -Cole

  • Hi Hao Su,

    Just thought I'd let you know I've been out on holiday and sick leave. I'll get back to you as soon as I can.

    Best,

    -Cole

  • Hi Hao Su,

    Looks like you were already given the answer 3 years ago: https://e2e.ti.com/support/sensors-group/sensors/f/sensors-forum/814856/pga900-could-pga900-have-rs485-output-with-sn65hvd7 

    Max baud rate is 83333 baud. I will say, the datasheet does ask to round.

    However, it looks like you're using the example code as is. That means, you might be using a different CPU CLK that you'll be deriving the value from. The code has a different equation for that located in pga900_uart.h 

    Funnily enough, I can't find where in the code that BAUD_RATE is actually written to:

    Best,

    -Cole

  • Hi Cole:

    CPU_CLK was set to 1MHZ now .  I need 38400 baud rate or higher such like 57600.

    Then I find baud rate divider is 5.51 when I use  your equation. I can't communicate with PC in 38400 baud rate whether I use 5 or 6 as divider.

    By the way, 83333 is not standard baud rate in PC com.  I can only chose 38400 or 57600 when I want to have higher baud rate than 19200.

    Please help , thanks.

  • Hi hao Su,

    I see what you're saying. Is there a reason you want increase the baud rate and test the communication using the computer? The tests show the PGA900 can handle the communication at this rate. But the question you're really asking is for the FTDI and USB end of communication pipeline. In a real system, the PGA900 doesn't have to deal with a PC Com directly. I'm not sure there's any easy way to fix what you're asking for without debugging a circuit that doesn't relate to TI devices, and more importantly, the PGA900.

    Edit: You can also try playing around with the CPU_CLK value away from 1MHz and seeing if you get different results. Maybe 2MHz CPU_CLK

    Best,

    -Cole

    PS. By the way, I did find the baud rate assignment in the pga900.h file occurs within the UART_Config() function.