EmbeddedRelated.com
Forums
Memfault Beyond the Launch

8051 Baudrate

Started by Unknown August 8, 2006
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?

Thanks and best regards,
Franz


In news:44d85042$1_1@news.tiscalinet.ch,
McLion <@> typed:

> 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?
You are right, the baudrate options of 8051 are really that limited. That is why crystals like 11.0592 MHz are popular. Karl Olsen
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? > > Thanks and best regards, > Franz
It's a very old processor, early 80's, the early ones were also very slow so there wasn't much point in going any faster.
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
"Jim Granville" <no.spam@designtools.co.nz> schrieb im Newsbeitrag 
news:44d86e69$1@clear.net.nz...
> 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. >
It is a Syntek Controller and it seems to be 'exactly' 8051. - Mode0: /12 - Mode1: use Timer1: TH1 / SMOD - Mode2: /32 + /64 - Mode3: ->Mode0 With this Controller, 9600 seems to be the best that can be done. Thanks, Franz
McLion wrote:
<snip>
> "Jim Granville" <no.spam@designtools.co.nz> schrieb im Newsbeitrag > news:44d86e69$1@clear.net.nz... >>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. >> > > > It is a Syntek Controller and it seems to be 'exactly' 8051. > - Mode0: /12 > - Mode1: use Timer1: TH1 / SMOD > - Mode2: /32 + /64 > - Mode3: ->Mode0 > With this Controller, 9600 seems to be the best that can be done.
Can you give an example of your maths ? -jg
cbarn24050@aol.com wrote:
> 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? >> >> Thanks and best regards, >> Franz > > It's a very old processor, early 80's, the early ones were also very > slow so there wasn't much point in going any faster. >
It is not the controller, it is the choice of crystal. It will not divide into the standard PC baud rates. They did have 57600 in the 80's
"Jim Granville" <no.spam@designtools.maps.co.nz> schrieb im Newsbeitrag 
news:44d90b3a@clear.net.nz...
> McLion wrote: > <snip> >> "Jim Granville" <no.spam@designtools.co.nz> schrieb im Newsbeitrag >> news:44d86e69$1@clear.net.nz... >>>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. >>> >> >> >> It is a Syntek Controller and it seems to be 'exactly' 8051. >> - Mode0: /12 >> - Mode1: use Timer1: TH1 / SMOD >> - Mode2: /32 + /64 >> - Mode3: ->Mode0 >> With this Controller, 9600 seems to be the best that can be done. > >Can you give an example of your maths ?
- Mode0: /12 -> 1.08 MBaud - Mode1: use Timer1: TH1 / SMOD -> TH1 = 249, SMOD = 1 -> 9673 Baud - Mode2: /32 + /64 -> 406.25 kBaud + 203.13 kBaud - Mode3: ->Mode0 I dont know where you take the /16 divider from ? It is a 8051 ('exactly', like I wrote) core with no additonal options to use Timer2 or whatsoever. Franz
McLion wrote:
> "Jim Granville" <no.spam@designtools.maps.co.nz> schrieb im Newsbeitrag >>>It is a Syntek Controller and it seems to be 'exactly' 8051. >>>- Mode0: /12 >>>- Mode1: use Timer1: TH1 / SMOD >>>- Mode2: /32 + /64 >>>- Mode3: ->Mode0 >>>With this Controller, 9600 seems to be the best that can be done. >> >>Can you give an example of your maths ? > > > - Mode0: /12 -> 1.08 MBaud > - Mode1: use Timer1: TH1 / SMOD -> TH1 = 249, SMOD = 1 -> 9673 Baud > - Mode2: /32 + /64 -> 406.25 kBaud + 203.13 kBaud > - Mode3: ->Mode0 > > I dont know where you take the /16 divider from ? > It is a 8051 ('exactly', like I wrote) core with no additonal options to use > Timer2 or whatsoever. > > Franz > >
If there is no timer 2, and if this controller uses a vanilla /12 core, then you are correct, the ceiling from 13MHz is ~9600 Bd -jg
"Jim Granville" <no.spam@designtools.maps.co.nz> schrieb im Newsbeitrag 
news:44d9a729$1@clear.net.nz...
> McLion wrote: >> "Jim Granville" <no.spam@designtools.maps.co.nz> schrieb im Newsbeitrag >>>>It is a Syntek Controller and it seems to be 'exactly' 8051. >>>>- Mode0: /12 >>>>- Mode1: use Timer1: TH1 / SMOD >>>>- Mode2: /32 + /64 >>>>- Mode3: ->Mode0 >>>>With this Controller, 9600 seems to be the best that can be done. >>> >>>Can you give an example of your maths ? >> >> >> - Mode0: /12 -> 1.08 MBaud >> - Mode1: use Timer1: TH1 / SMOD -> TH1 = 249, SMOD = 1 -> 9673 Baud >> - Mode2: /32 + /64 -> 406.25 kBaud + 203.13 kBaud >> - Mode3: ->Mode0 >> >> I dont know where you take the /16 divider from ? >> It is a 8051 ('exactly', like I wrote) core with no additonal options to >> use Timer2 or whatsoever. > > If there is no timer 2, and if this controller uses a vanilla /12 core, > then you are correct, the ceiling from 13MHz is ~9600 Bd >
Unfortunately, for this project, the Controller is 'given'. And this Syntek seems to be sort of 'dumb'. It has a Timer2, but it can not be used as baudrate source for the UART. Thanks anyway. Have a nice day! Franz

Memfault Beyond the Launch