Announcement

Collapse
No announcement yet.

Diablo16 UART - baudrate error calculation

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Diablo16 UART - baudrate error calculation

    Hi, is it possible to calculate baudrate error for command com_SetBaud(“comport”, “baudrate/10”)? I need to set highest possible baudrate, but I dont know how precise Diablo's UART is...Other (MCU) side can communicate precisely for example 307200Bd, 384000Bd, 460800Bd, 512000Bd, 576000Bd, 768000Bd, 921600Bd, so If I set com_SetBaud(COM0, 92160) will be baudrate error really 0.00%?

  • #2
    Hi cap, it'll be in the datasheet: http://www.4dsystems.com.au/productp...ons_R_1_16.pdf

    Page 242.

    if you use the actual baud rate instead of the constant, you'll be at 0% if your other device can use as close as possible.
    for example, when i use 600,000 baud, I use 625,000 for teensy, results in a 0% error for both linked up

    Tony
    Last edited by tonton81; 21st March 2017, 02:05 AM.

    Comment


    • #3
      Note that Diablo uses 16 bit integers, so the maxium specifable baud rate using that call is 0xffff or 655350 baud, the actual baud rate will be 729167.

      Also check out the next page of the manual, it lists 5 'special' high baud rates, which have 0% error
      Mark

      Comment


      • #4
        Thank You for Your answers. I see it is about specifable vs. actual baud rates, so is there any equation to calculate actual baud rate from value that I set to function com_SetBaud()?

        Comment


        • #5
          ActualBaudRate = TRUNC(4375000/TRUNC(4375000/DesiredBaudRate))
          Mark

          Comment

          Working...
          X