Re: 8051 Baudrate



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

.



Relevant Pages

  • Re: Krumme Baudraten unter Windows (XP)
    ... > Ich habe mir mal vom Codeproject eine Klasse CSerialPort heruntergeladen ... > Baud verwendet. ... Üblicherweise besitzen die seriellen Schnittstellen einen Quarz, ... Baudrate heruntergeteilt. ...
    (microsoft.public.de.vc)
  • Re: Daten von COM-Port lesen
    ... daß das Hyperterminalprogramm sich irgendwie mit dem ... >> Scanner auf eine Baudrate einigt? ... Metrologic-Scanner und die lassen sich nur bis 38400 Baud programmieren. ...
    (microsoft.public.de.fox)
  • Serial port: flushing & changing baudrate problem
    ... new baud rate settings ... My understanding is that tcdrain and tcflush care just about flushing ... through serial are actually read before the baudrate exchange. ...
    (comp.os.linux.development.apps)
  • Re: Micro choice with 4 UARTs
    ... >>>quickly (4800 baud to 19200 baud) and only a few hundred bytes per ... >> At that baudrate you could easily do it in software without too much ... >And one piece of bit bang code could run all serial ports running at the ... >same baud rate. ...
    (comp.arch.embedded)
  • Re: 8051 Baudrate
    ... Newer ones have Baud Dividers, with higher ratio baud options, so can divide /16/N. ... With this Controller, 9600 seems to be the best that can be done. ...
    (comp.arch.embedded)