![]() |
|
|
|
#1 |
|
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 |
|
|
|
|
#2 |
|
Posts: n/a
|
In message < .com>
"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 |
|