MCU's choice of 12M and 11.0592M

Publisher:Zhenai5201314Latest update time:2015-09-22 Source: eefocusKeywords:MCU  12M  11  0592M Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere
1. The commonly used crystal oscillator frequency of the microcontroller is 1.2M-12M. Generally, one machine cycle is 12 clock cycles, so when using 12M, one machine cycle is 1US, which is easy to calculate and has the highest speed. Of course, there are also microcontrollers with higher frequencies. 

 For communication, 11.0592M is generally selected. It is not easy to achieve the standard baud rate for serial communication with a frequency of 12M, such as 9600 and 4800, and 11.0592M can be obtained when calculating. Therefore, in a microcontroller with a communication interface, 11.0592M is generally selected.    

You can find out by doing some calculation. For example, if we want to get a baud rate of 9600, the crystal oscillator is 11.0592M and 12M, timer 1 is mode 2, SMOD is set to 1, and see what the required TH1 value is.

Substitute into the formula:      11.0592M             9600=(2÷32)×((11.0592M/12)/(256-TH1))             TH1=250      12M                 9600=(2÷32)×((12M/12)/(256-TH1))                    TH1≈249.49    The above calculation shows that when using a 12M crystal, the calculated TH1 is not an integer, and the value of TH1 can only be an integer, so it will have a certain error and cannot produce an accurate 9600 baud rate. Of course, a certain error is acceptable in use. Even if a 11.0592M crystal oscillator is used, the error in the crystal itself will cause an error in the baud rate. However, the effect of the error in the crystal itself on the baud rate is very small and can be ignored.
Keywords:MCU  12M  11  0592M Reference address:MCU's choice of 12M and 11.0592M

Previous article:About the problem of stm8s207 timer entering interrupt at the same time
Next article:Relationship between motor speed control and microcontroller

Popular Resources
Popular amplifiers
Latest Microcontroller Articles
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号