Re: 8051 Baudrate
- From: Jim Granville <no.spam@xxxxxxxxxxxxxxxxx>
- Date: Tue, 08 Aug 2006 22:58:42 +1200
McLion wrote:
Hi
Is it just me or is the Baudrate setting of a 8051 core really so limited?
I have a 8051 compatible controller with 13MHz Osc (unfortunately, this is a given situation and not chnageable). Is it true that 9600 is the fastest possible Baudrate that somehow fits to the standard baudrates of a PC? I was looking for something a bit faster, i.e. 57600.
Can somebody confirm this or guide me toward the correct setting if I am wrong?
This depends on the 80C51 variant, and how old it is.
If you go back a very long time, they have a minimum of /16 for the BAUD
and another /12 for the clocks. So that limits your ratios. /12/16/N
Newer ones ( eg AT89C51RE2) have Baud Dividers, with higher ratio baud options, so can divide /16/N.
Some even have fractional dividers, which vary the /16 to sometimes be /15, so the average baud can be more accurately controled.
From your unusual 13Mhz, to 9600 is 1354.166', or to 57.6 is 225.6944,
and that /16 is 14.1059, which is 0.75% off the usable 14.
Note this is even, so you can divide by 7, and get 115.2K with 0.75% error, from 13.0MHz
The generic 89C52, can use timer2, as baud, and in that case, it divides by 2 then /16, then reload value. So, for your 57.6K in a generic 89C52, you divide by another 7.
-jg
.
- Prev by Date: Re: 8051 Baudrate
- Next by Date: graphics in lcd using T6963c
- Previous by thread: Re: 8051 Baudrate
- Next by thread: Re: 8051 Baudrate
- Index(es):
Relevant Pages
|