摘要
延时是单片机教学中最常用的概念之一,因此延时函数是单片机控制程序中的一个重要函数。分别利用while循环语句、do-while循环语句、for循环语句以及while和for循环语句组合实现t ms延时点亮一个按照一定频率闪烁的LED灯,以此为例,总结了C语言循环语句实现单片机延时函数的方法,帮助学生在掌握C语言知识的基础上,增强了对单片机延时概念的理解,提高了教学效果。
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.
出处
《安庆师范学院学报(自然科学版)》
2013年第4期117-120,共4页
Journal of Anqing Teachers College(Natural Science Edition)
基金
高职IT专业校内实训基地建设研究(JD10101)
物电实验实训中心项目和安徽省优秀青年人才基金项目(2012SQRL274)资助
关键词
单片机
C语言
延时函数
循环语句
microcontroller unit
C language
delay function
loop statements