Uart and clock

Discussion in 'VHDL' started by Neil, Jun 25, 2005.

  1. Neil

    Neil Guest

    Hi, All,
    While programming UART, I encounter a problem: if the baud rate is
    9600, how to calculate the ferequence for receive/transmit data of
    UART? I get a expression: freq = 9600/(systemClock * 16). but where
    the 16 comes from? why it is 16? How to get...? Thank you!

    Regards!
    -- Neil
     
    Neil, Jun 25, 2005
    #1
    1. Advertising

  2. Neil

    Dave Higton Guest

    In message <>
    "Neil" <> wrote:

    > Hi, All,
    > While programming UART, I encounter a problem: if the baud rate is
    > 9600, how to calculate the ferequence for receive/transmit data of
    > UART? I get a expression: freq = 9600/(systemClock * 16). but where
    > the 16 comes from? why it is 16? How to get...? Thank you!


    It's conventional to clock the receiver at 16 times the baud rate,
    to make it easy to sample the bits close to the middle. Remember
    that the receiver is not normally synchronised to the transmitter.

    There's no need to clock the transmitter faster than 1 times (or 2
    times if you need one and a half stop bits, but no-one has used
    that in years), but you only usually want to provide one clock rate
    for both Rx and Tx.

    Dave
     
    Dave Higton, Jun 25, 2005
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Valentin Tihomirov

    Are clock and divided clock synchronous?

    Valentin Tihomirov, Oct 23, 2003, in forum: VHDL
    Replies:
    11
    Views:
    3,392
    louis lin
    Oct 28, 2003
  2. Replies:
    4
    Views:
    759
    Peter Alfke
    Apr 27, 2006
  3. Replies:
    5
    Views:
    2,259
    Ricardo
    Jun 23, 2006
  4. himassk
    Replies:
    1
    Views:
    1,259
    Paul Uiterlinden
    May 16, 2007
  5. pankaj.goel
    Replies:
    6
    Views:
    967
    pankaj.goel
    Nov 25, 2008
Loading...

Share This Page