How To Calculate Baud Rate in 8051 Microcontroller?

Short tutorial on how to calculate baud rate in 8051 microcontroller.

Baud Rate Calculation in 8051 Microcontroller

Baud Rate is defined as the data transmission rate that determines the symbols per second for serial communication. It is the number of symbols transmitted per second. It is also known as symbol rate and is denote by s. The baud rate calculation is must in 8051 microcontroller in order to allow data transfer between PC and microcontroller without any error. The baud rate of 8051 microcontroller must match the baud rate of the PC for the transmission purpose.
How To Calculate Baud Rate
Find here a short tutorial that explains you on how to calculate the baud rate of a microcontroller (8051).

Step 1: The baud rate in the 8051 is programmable and can be set through Timer 1.

Step 2: The 8051 has external clock of frequency 11.0592 MHz, which is first divided by 12. After which the machine cycle frequency is 921.6 kHz.

Step 3: Now, machine cycle frequency 921.6 kHz is divided by the 8051 microcontroller serial communication UART circuitry by 921.6 kHz divided by 32 gives you the frequency of 28,800 Hz.

Step 4: The baud rate should be programmed in mode 2 as we use Timer 1. To get baud rates compatible with PC, we must load TH1 with values: -3, -6, -12, -24. These values are fixed to find out suitable baud rate compatible with PCs COM port. PC baud rates values are set by the vendors and are fixed.

Related Topics