Back to ESAcademy Home Page


Microcontroller
Peripheral Timing
Calculator

Philips 89C51RX2 - UART baud rates

Enter your clock rate and the desired baud rate,
then click on the "Calculate" button

 

Home

News

Training Classes

Products

Consulting

Technical Library

Contact Us

Clock frequency (in MHz): (mhz)
Desired baud rate (in bps): (bps)

Mode 0 and 2

Mode 0 and 2 uses fixed baud rates.
Bit SMOD1 in special function register PCON can be used to select different speeds.

  Baud rates
6-clock mode
Baud rates
12-clock mode
Mode 0
rate=mhz/6

rate=mhz/12
Mode 2, SMOD1 = 1
rate=mhz/16

rate=mhz/32
Mode 2, SMOD1 = 0
rate=mhz/32

rate=mhz/64

Mode 1 and 3

In Mode 1 and 3 Timer 2 can be used as baud rate generator by setting bits TCLK and RCLK in special function register T2CON.

  6-clock mode 12-clock mode
Desired baud rate overflow rate
(microseconds)

rate=mhz/(16*bps)

rate=mhz/(32*bps)
RCAP2X reload
value for Timer 2

rel=65536-rate

RCAP2H RCAP2L

rel=65536-rate

RCAP2H RCAP2L
Real baud rate achieved with
bau rate generator

bpsr=mhz/(16*(65536-rel))

bpsr=mhz/(32*(65536-rel))
Difference to the desired
baud rate

var=(bpsr-bps)/bps

var=(bpsr-bps)/bps
Upcoming Classes
   

© ESAcademy, 2000
Author: Olaf Pfeiffer

All materials
provided 'as is'
see Disclaimer

www.esacademy.com
info@esacademy.com