Serial Ports: Difference between revisions
m
→Baud Rate: Added 0 divisor comment
[unchecked revision] | [unchecked revision] |
m (→Initialization) |
m (→Baud Rate: Added 0 divisor comment) |
||
Line 112:
In order to set the speed of the port, calculate the divisor required for the given baud rate and program that in to the divisor register. For example, a divisor of 1 will give a of 115200 baud, a divisor of 2 will give 57600 baud, 3 will give 38400 baud, etc.
Do not be tempted to use a divisor of 0 to try to get an infinite baud rate, it won't work. Most serial controllers will generate a unspecified and unpredictable baud rate (and anyway infinite baud would mean infinite transmission errors as they are proportional.)
To set the divisor to the controller:
|