Global Sources
EE Times-India
Stay in touch with EE Times India
 
EE Times-India > Processors/DSPs
 
 
Processors/DSPs  

Using a Dallas Semiconductor DS1075 EconOscillator to clock an 8051 microprocessor

Posted: 06 Apr 2001     Print Version  Bookmark and Share

Keywords:embedded 

PDF document

1 of 4 012601 Introduction EconOscillators have an internal oscillator that provides a base frequency, and they use a built-in divider chain to lower a base frequency to the desired rate. Each part number can divide down four base frequency rates (60 MHz, 66.67 MHz, 80 MHz, or 100 MHz) for adjustments up to 2052 times slower than the base part frequency. EconOscillators can be used for any type of clocked logic, including microprocessor, FPGA, and CPLD circuits, depending on system requirements. 8051 Microprocessors and RS232 Serial Communication When selecting a clock, two factors deserve careful consideration: clock rate and clock accuracy over the operational life span. In an 8051 microprocessor system, the use of RS232 serial communications often determines the system clock rate. Consider, for example, asynchronous mode 1 serial communication using a 12 MHz clock (the maximum clock rate for the original 8051). Table 1 shows the timer 1 auto- reload values required to establish standard baud rates. Table 1 - Baud Rate and Baud Rate Error Using a 12 MHz Crystal for an Original 8051 Microprocessor Timer 1 auto reload value Actual Baud Rate (Desired Baud Rate) Baud Rate Error 255 31250 (28800) 8.5% 254 15625 (14400) 8.5% 253 10417 (9600) 8.4% 249 / 250 4464 / 5208 (4800) 7% / 8.5% 243 2404 (2400) 0.16% The actual baud rates in Table 1 were calculated using the following formula (reproduced from Dallas Semiconductor's High-Speed Microcontroller User's Guide): )1255(1232 2 TH f BaudRate OCC SMOD -W W= SMOD = Baud Rate Doubler fOCC = Oscillator Rate TH1 = Timer 1 Auto-reload value The table numbers are based on these timer 1 conditions: 7 set to increment 12 clock cycles per timer (DS87C520 can increment timer 1 each 4 or 12 clock cycles) 7 auto reload mode enabled 7 baud rate doubler (SMOD=0) disabled. Most users of RS232 serial communication agree that any baud rate error over 3% is likely to cause communication errors, which occur in spite of synchronization of the start and stop bits during data Application Note 137 Using a Dallas Semiconductor DS1075 EconOscillator to Clock an 8051 Microprocessor www.dalsemi.com AN137 2 of 4 transfer. A 3% allowable error limits the maximum communication rate with a 12 MHz crystal to 2400 baud - not bad for the early 1990s, but a little slow for today's standards. Luckily, there are crystals that cater to 8051 serial communications: either an 11.059 MHz or 22.118 MHz crystal. Microprocessors using these crystals see a considerable improvement in baud rate (Table 2), achieving data transfer rates up to 57.6 kbps (115.2 kbps with a DS87C520 using the baud rate doubler, SMOD=1), which is respectable for most of today's microprocessor systems. Table 2 - Baud Rates Generated Using Crystal Frequencies Selected for RS232 Serial Communication Timer 1 Auto-Reload Value Baud Rate with Focc = 11.059 MHz Baud Rate with Focc = 22.118 Mhz 255 28.799.5 57598.9 254 14399.7 28799.5 253 9599.8 19199.6 250 4799.91 9599.83 244 2399.95 4799.91 232 1199.98 2399.95 208 599.98 1199.98 160 299.99 599.99 64 149.99 299.99 Note: Requiring the baud rate to be within 3% of the specified rate also places an accuracy requirement upon your clock. Even with an ideal clock rate selected for RS232 communication, if the clock varies more than 3%, you may not be able to communicate consistently. Using the DS1075 EconOscillator to Clock an 8051 Microprocessor As mentioned above, the DS1075 comes in four base varieties, with the internal oscillators running at 100 MHz, 80 MHz, 66.667 MHz, and 60 MHz. Using the internal divider chain to slow them down enough for an 8051 application, in theory either of these parts could be used. However, if you plan to use the serial port of your 8051, you should select the base part that best fits your microprocessor's needs, depending on both the baud rate required and baud rate generation formula provided with your microprocessor. In the case of the 8051 microprocessor in our example, oscillator frequencies of 11.059 MHz and 22.118 MHz were desirable, and an approximately 3% error rate was tolerable for baud rate generation. If you use the 66.667 MHz base part, you would be able to divide the base frequency by six (6) down to 11.111 MHz. This has a small error from the ideal frequency of 11.059 MHz (0.47%), and the error remains acceptably low even with a worst-case deviation of 1% from the programmed frequency. Thus, the DS1075-66 allows a maximum error of 1.47% from the desire frequency of 11.059 MHz, which is adequate for communication at rates up to 28.8 kbps. If you are using an 8051 with a higher allowable clock rate such as the DS87C520 (33 MHz maximum clock rate), you could simply divide the clock rate by three to 22.222 MHz. The maximum error is now 1.47% - still fine for communication at any of the 22.118 MHz baud rates. The higher clock rate also provides a higher level of processor performance for your other application needs as well. The big advantage in using the DS1075 for an 8051 design is flexibility. A design that started out using an original or equivalent 8051 microprocessor (12MHz maximum clock rate) can be simply upgraded by AN137 3 of 4 reprogramming the oscillator and replacing the microprocessor. Depending on the design, you may even be able to reprogram the DS1075 in-socket. If you are using the 40-pin DIP version of the 8051 microprocessor, Dallas Semiconductor and many other companies make several 100% compatible replacement chips. The fastest of them all, Dallas Semiconductor's DS89C420 offers a 50x performance increase over the original 8051 design, and has several resources available, including Watch Dog Timers, and Power Management, that were not available on the original 8051. Other chips such as the DS87C520 can provide up to an 11x-performance increase. (Dallas Semiconductor also makes other versions of the 8051 that have PWM and A/D converters for control applications, but they are not available in the 40-pin DIP package.) Hardware Setup To use the DS1075, you will need to establish a way to program its EEPROM registers. The easiest way is to purchase the DS1075K Programming/Evaluation Kit. The kit's hardware and Windows 95 software with samples provide an easy means to program the device and try it out in your application. Otherwise, the data sheet alone (available online at www.dalsemi.com) has all of the information required to program the device without a kit. Once the DS1075 is programmed, the schematic shown in Figure 1 (next page) shows how to wire the DS1075 for proper operation with an 8051 microprocessor. Note that the output of the DS1075 goes into XTAL1, and XTAL2 is not connected. XTAL2 is normally the crystal oscillator output of the 8051. Connecting anything to this pin will just load the microprocessor down, which is not necessary when any auxiliary clocked device can be connected in parallel with the microprocessor on XTAL1. (This is assuming that the joint loading of the auxiliary device and the 8051 does not exceed the output current specification of the DS1075.) AN137 4 of 4 Figure 1 - Hardware Setup for Using a DS1075 Oscillator to Clock an 8051 Microprocessor Contact Information Dallas Semiconductor 4401 S. Beltwood Parkway Dallas, TX 75244 Tel: 972-371-4448 Fax: 972-371-4799 Product Literature: (972) 371-4448 Sales and Customer Service: (972) 371-4969 World Wide Web Site: www.dalsemi.com Ordering Information: www.dalsemi.com/products/ordering.pdf FTP Site: ftp://ftp.dalsemi.com Datasheets: www.dalsemi.com/datasheets/pdfindex.html Package/Mechanical Drawings: www.dalsemi.com/datasheets/mechdwg.html




Comment on "Using a Dallas Semiconductor DS1075 ..."
Comments:  
*  You can enter [0] more charecters.
*Verify code:
 
 
Webinars

Seminars

Visit Asia Webinars to learn about the latest in technology and get practical design tips.

 

Go to top             Connect on Facebook      Follow us on Twitter      Follow us on Orkut

 
Back to Top