Do you actually want 1152000 (*very* fast) or 115200 (standard PC uart frequency)...?

If the former, you are quite out of luck with a standard 8051 - it just can't go that fast.

the hex value & is this calculation correct?

Please suggest the crystal value

if by chance you mean 115200:

To calculate Timer-1 divisor:

divisor = crystal/384/baudrate

Note that only integer divisors in the range of 1-256 can be used.

To calculate the baudrate from the divisor:

baudrate = crystal/384/divisor

So the fastest baudrate you can get with this calculation and

11059200 Mhz is:
11059200 / 384 / 1 = 28800

But ... you may not have noticed the SMOD bit (PCON.7) - this but means: "Double the serial baud rate when using modes 1, 2 or 3 and Timer-1"

So: you can get: 28800*2 = 57600

1/2 way there, but not 115200.

To get 115200 using Timer-1 you would need double the crystal speed, or 22.118400 Mhz - Assuming you have an 8051 derivative that will go that fast (see NOTE1)

To get a baudrate of 1152000 you would need a crystal 10 times that frequency (221.184Mhz) - and I don't think you will find any 8051 derivative that can go that fast (wish ya could!)

If by chance you really have an 8052, then you have the option of using timer-2 to generate the baudrate. The formula is:

Baudrate = crystal/32/divisor

So with an 11.059Mhz 8032 you can get 115200 with a divisor of 3 which is quite possible.

To get 1152000 with a divisor of 1 (lowest), you would need 1152000x32 or 36.864 Mhz - I don't know if anyone makes an 8032 derivative that fast or not.

NOTE1: If you are using a faster 805x derivative, check the clocking and baudrate calculations, as they often are not the same as the original Intel spec.

NOTE2: When loading the divisor into the timer, you actually load (256-divisor) for Timer-1 and (65536-divisor) for Timer-2 - the timer counts up not down.

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here.
All logos and trade names are the property of their respective owners.