AT89C2051 Timers

Sep 16, 2003 3 Replies

I am considering this MCU for a project but the info from Atmel leaves a lot to be desired. In looking at the Intel MCS-51 info it would appear that if one is going to use the serial interface that one of the timers must be used to generate the baud rate. True? What is the clock rate of the timers? Can it be adjusted (programmed)?


Brad schrieb:

Yes, at least if you need some useful baud rate.

The timer division ratio is of course programmable. However, you need to consider that the crystal frequency is first divided by 12, and the UART further divides by 16. So your crystal frequency should be a multiple of 16 x 12 x your maximum baud rate. This leads to those seemingly odd crystals you surely have seen before.

Practically, most of the time a 11.0592 MHz crystal is used, which is good for up to 19200 Bd (timer divides by 3). You could also use 7.3728 or 14.7456 MHz, or 22.1184 MHz, or ....

And take care to set the MSB in PCON, otherwise your UART clock is further divided by two.

Dipl.-Ing. Tilmann Reh Autometer GmbH Siegen - Elektronik nach Maß. http://www.autometer.de ================================================================== In a world without walls and fences, who needs Windows and Gates ? (Sun Microsystems)

"Brad" skrev i meddelandet news: snipped-for-privacy@posting.google.com...

Yes, you use one of the timers.

You may also want to look at an Atmel AVR as well.

AT89C2051 ATtiny2313 Flash 2kB 2kB RAM 128 128 EEPROM - 128 Pins 20 20 Freq 24 16 MIPS 2 13

8 bit timer - 1 16 bit timer 1 1 BAUD timer 1 in UART UART 1 1 ISP - yes ISP = In System Programming Watchdog - yes R/C osc - yes BrownOut - yes

Easier to program and free tools.

Best Regards, Ulf Samuelsson ulf@a-t-m-e-l.com This is a personal view which may or may not be share by my Employer Atmel Nordic AB

Hi, there are very similar microcontrollers out there that do not need touse a timer because they use a baudrate generator. For example the LPC900 series of Philips does not need an external clock (internal oscillator) and can generate all baudrates up to 115200 from this internal oscillator with the integrated baudraget generator. You will have T0 and T1 for your application and even a Real Time clock. Possible catch: The LPC900 family does not run @ 5V, just between 2.4V and 3.6V

you can check Keil's website:

formatting link
or Philips:
formatting link
sorry for that long URL, "typical big company" or some very usefull information is here:
formatting link

Cheers, Schwob

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required