Embedded Developer

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.

50 min

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

This lesson is part of the Pro plan. Upgrade to unlock the full lesson, the labs and the exam.

Upgrade Now

This lesson is part of a paid plan

Upgrade to Pro to unlock this course, its labs and its exam.

View Pricing Plans