- 1、本文档共7页,可阅读全部内容。
- 2、有哪些信誉好的足球投注网站(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
- 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
keil c51程序设计中几种精确延时方法(Several precise delay methods in Keil C51 programming)
keil c51程序设计中几种精确延时方法(Several precise delay methods in Keil C51 programming)
Baidu space? |? | login Baidu home page?
?????????????????????????
No fragrance Langhammer
Life is change, change is life.
The home page blog album | personal files | friends
?
View Article
?
Several precise delay methods in Keil C51 programming
2008-08-21 12:21
??? the delay usually has two methods: one is the hardware delay, to use the timer / counter, this method can improve the efficiency of the CPU, also can do accurate delay; the other is a software delay, this method is mainly used for the body.
1 use timer / counter to achieve accurate delay
Monolithic integrated circuit system usually selects 11.0592 MHz, 12 MHz or 6 MHz crystal oscillator. The first one is easier to generate various standard baud rates, and the latter two are 1 s and 2 s respectively, which is convenient for precise delay. This procedure assumes the use of a crystal oscillator with a frequency of 12 MHz. The longest delay time is up to 216=65 536 Mu s. If the timer works in the way 2, you can achieve a very short time accurate delay; if the use of other timing methods, you should consider reloading the timing of the initial value (reinstall the timer, the initial value of 2 machine cycles).
In practice, interrupts are often used for timing, such as performing an appropriate cycle to achieve delays of a few seconds or even longer. The use of timer / counter delay, from the programs execution efficiency and stability of two considerations, is the best solution. It should be noted that, C51 prepared by the interrupt service program compiled automatically with PUSH ACC, PUSH PSW, POP PSW and POP ACC statement execution occupies 4 machine cycles; if a program has values of 1 statements, and will take up to 1 machine cycles. The time consumed by these statements should be taken into account when calculating the initial value of the timing, and subtracted from the initial value to achieve the minimum error.
2 software de
您可能关注的文档
- 2012高考病句题汇总(2012 college entrance examination questions summary sentences).doc
- 2012高考分类试题--修改病句试题及答案(2012 college entrance examination questions, modify incorrect classification questions and answers).doc
- 2013-01-08_qq玫瑰伴侣(2013-01-08_qq rose companion).doc
- 2012年幼儿园教师招聘考试《学前心理学》试题及答案(2012 kindergarten teacher recruitment examination pre-school psychology examination questions and answers).doc
- 2013-2014学年度第一学期期末质量调研九年级化学测试题(九下)(2013-2014 semester of the end of the first semester of quality survey, grade nine chemistry test questions (nine below)).doc
- 2012以前情侣应该做的99件事情(你做了几件了)(2012 99 things that lovers should have done before (have you done a couple of things )).doc
- 2012初中物理教学论文 如何提高初中物理教学课堂效率(2012 how to improve the efficiency of junior high school physics teaching in junior high school physics teaching).doc
- 2012广东中考时政热点专题与试题------建设幸福广东,共建共享成果(2012, Guangdong hot topics and examination questions - --- building a happy Guangdong, co construction and sharing of results).doc
- 2013-2014学年第一学期九年级质量检测化学试题(The first semester of the 2013-2014 year, grade nine, quality test chemistry questions).doc
- 2012百度联盟峰会分成预计将超20亿元(2012 Baidu alliance summit divided into 2 billion yuan is expected to exceed).doc
文档评论(0)