Case File: The Baud Rate That Was Almost Right
A serial port that works with short messages and garbles long ones is usually a baud rate that is a few percent off. A UART makes its bit clock by dividing the CPU clock, so only some rates can be made exactly. Compute the divider register, the real rate, the signed error in percent, whether it is acceptable (within two percent), and for a frame format such as 8N1 or 8E1 the bytes per second and the time to send a hundred bytes. Run it on ports that you cannot see. The ports are generated for you alone.
Case File: The Baud Rate That Was Almost Right
A serial port that works with short messages and garbles long ones is usually a baud rate that is a few percent off. A UART makes its bit clock by dividing the CPU clock, so only some rates can be made exactly. Compute the divider register, the real rate, the signed error in percent, whether it is acceptable (within two percent), and for a frame format such as 8N1 or 8E1 the bytes per second and the time to send a hundred bytes. Run it on ports that you cannot see. The ports are generated for you alone.
In this lesson:
- uart
- serial
- baud rate
- clock
- python
- case-file
This lesson is part of a paid plan
Upgrade to Pro to unlock this course, its labs and its exam.
View Pricing Plans