The final formula for baud rate is as below. The above factors should be loaded to Timer1(TH1) in Mode2 in order to generate the required baud rate. If we look at the standard baud rates used for serial communication shown in the table below, we can observe that all the baud rates are factors or multiples of the Tclk (28.8K)! This results in low error rates and hence is a commonly used crystal with 8051. The value seems to be odd but we see how it makes sense. Usually, an 11.0592 Mhz crystal oscillator is used to provide the clock to 8051. The timer again divides the Mclk by 32 and uses it as the timer frequency, say Tclk. The crystal frequency Fclk is divided by 12 internally which is used to execute instructions also known as Machine Clock. Both the devices Rx/Tx should be set to same baud rate for successful communication.įor the 8051 the Timer 1' is used to generate the baud rate in Auto reload mode. The main criteria for UART communication is its baud rate. This bit is also cleared from within the software. It signals that byte is received and should be read quickly prior to being replaced by a new data.
0 Comments
Leave a Reply. |