首页 | 本学科首页   官方微博 | 高级检索  
     检索      

C语言循环语句实现单片机延时函数
引用本文:徐雷,孙长智.C语言循环语句实现单片机延时函数[J].安庆师范学院学报(自然科学版),2013(4):117-120.
作者姓名:徐雷  孙长智
作者单位:亳州师范高等专科学校 理化系,安徽 亳州,236800;亳州师范高等专科学校 理化系,安徽 亳州,236800
基金项目:高职IT专业校内实训基地建设研究(JD10101).物电实验实洲中心项门和安徽省优秀青年人才基金项目(2012SQRL274)资助.
摘    要:延时是单片机教学中最常用的概念之一,因此延时函数是单片机控制程序中的一个重要函数。分别利用while循环语句、do-while循环语句、for循环语句以及while和for循环语句组合实现t ms延时点亮一个按照一定频率闪烁的LED灯,以此为例,总结了C语言循环语句实现单片机延时函数的方法,帮助学生在掌握C语言知识的基础上,增强了对单片机延时概念的理解,提高了教学效果。

关 键 词:单片机  C语言  延时函数  循环语句

Implementation of Delay Function of Microcontroller Unit by Using C Loop Statements
XU Lei,SUN Chang-zhi.Implementation of Delay Function of Microcontroller Unit by Using C Loop Statements[J].Journal of Anqing Teachers College(Natural Science Edition),2013(4):117-120.
Authors:XU Lei  SUN Chang-zhi
Institution:(Department of chemical and physical, Bozhou Teachers College, Bozhou ,Anhui 236800 China)
Abstract:Delay is one of the most commonly used concepts in microcontroller teaching , and delay function is an important function in the controlling programs of microcontroller unit .Take flashing LED lamps at a constant frequency lighted by t ms delay function, which realized using while, do-while, for, and combination of while and for loop statements, as an example, the delay functions of microcontroller C loop statements are summarized to help students enhance understanding the delay concepts of micro-controller unit based on the C knowledge.The results show the teaching methods are very good.
Keywords:microcontroller unit  C language  delay function  loop statements
本文献已被 CNKI 维普 万方数据 等数据库收录!
设为首页 | 免责声明 | 关于勤云 | 加入收藏

Copyright©北京勤云科技发展有限公司  京ICP备09084417号