Back to ESAcademy Home Page


Microcontroller
Peripheral Timing
Calculator

Philips 8xC552, 8xC554, 8xC591 - I2C baud rates

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

 

Home

News

Training Classes

Products

Consulting

Technical Library

Contact Us

Recommended books:

The I2C Bus

The 8051 Microcontroller

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

Fixed Baud Rates

The I2C baud rate is set with the bits CR2..CR0 in Special Function Register S1CON. Depending on their contents, the following baud rates can be achieved:

Bits CR2..CR0

Baud rates
0
mhz/256
1
mhz/224
2
mhz/192
3
mhz/160
4
mhz/960
5
mhz/120
6
mhz/60
7 Using Timer 1 to
generate vriable
baud rate

Variable Baud Rate

If bits CR2..CR0 are set all set, Timer 1 can be used to generate a variable baud rate. Timer 1 needs to be configured to run in Mode 2. The counter reload value to achieve the desired baud rate is calculated below:

  Values
Desired Timer 1 run time
rate=mhz/(96*bps)
Closest possible
Timer 1 reload value

rel=256-rate
Real baud rate achieved
bpsr=mhz/(96*(256-rel))
Difference to the desired
baud rate

var=(bpsr-bps)/bps
Upcoming Classes
   

© ESAcademy, 2000
Author: Olaf Pfeiffer

All materials
provided 'as is'
see Disclaimer

www.esacademy.com
info@esacademy.com