文件名称:dingshi
介绍说明--下载内容来自于网络,使用问题请自行百度
两个定时实验,1.具体要求:采用定时器T0的溢出中断,单片机P1.0接发光二极管LED0。T0的每一次中断,在中断处理程序中都会对LED0的状态做一次改变(P1.0输出信号进行反转)。
2.具体要求:定时器T1每0.05秒中断一次,单片机P1口接8个发光二极管LED0~LED7,编写程序,使发光二极管有规律地循环点亮。例如:开机后,第一秒钟LED0、LED2亮,第二秒钟LED1、LED3亮,第三秒钟LED4、LED6亮,第四秒钟LED5、LED7亮,第五秒钟LED0、LED2、LED4、LED6亮,第六秒钟LED1、LED3、LED5、LED7亮,第七秒钟全亮,第八秒钟全灭;再从头开始一直循环下去。-Two experiments from time to time, 1. Specific requirements: the use of the T0 timer overflow interrupt, single-chip LED P1.0 then LED0. T0 every interruption, in the interrupt handling process LED0 will make a change in the state (P1.0 output signal inversion). 2. The specific requirements of: T1 timer interrupt once every 0.05 seconds, I received P1 single-chip 8 LED LED0 ~ LED7, the preparation procedure, so that light-emitting diode light cycle regularly. For example: boot, the first seconds LED0, LED2 light, the second a matter of seconds LED1, LED3-liang, the third seconds LED4, LED6 Liang, fourth seconds LED5, LED7 Liang, fifth seconds LED0, LED2, LED4 , LED6 Liang, Sixth seconds LED1, LED3, LED5, LED7 bright, bright full seconds seventh, eighth second body again from the beginning has been the cycle continues.
2.具体要求:定时器T1每0.05秒中断一次,单片机P1口接8个发光二极管LED0~LED7,编写程序,使发光二极管有规律地循环点亮。例如:开机后,第一秒钟LED0、LED2亮,第二秒钟LED1、LED3亮,第三秒钟LED4、LED6亮,第四秒钟LED5、LED7亮,第五秒钟LED0、LED2、LED4、LED6亮,第六秒钟LED1、LED3、LED5、LED7亮,第七秒钟全亮,第八秒钟全灭;再从头开始一直循环下去。-Two experiments from time to time, 1. Specific requirements: the use of the T0 timer overflow interrupt, single-chip LED P1.0 then LED0. T0 every interruption, in the interrupt handling process LED0 will make a change in the state (P1.0 output signal inversion). 2. The specific requirements of: T1 timer interrupt once every 0.05 seconds, I received P1 single-chip 8 LED LED0 ~ LED7, the preparation procedure, so that light-emitting diode light cycle regularly. For example: boot, the first seconds LED0, LED2 light, the second a matter of seconds LED1, LED3-liang, the third seconds LED4, LED6 Liang, fourth seconds LED5, LED7 Liang, fifth seconds LED0, LED2, LED4 , LED6 Liang, Sixth seconds LED1, LED3, LED5, LED7 bright, bright full seconds seventh, eighth second body again from the beginning has been the cycle continues.
(系统自动生成,下载前可以参看下载内容)
下载文件列表
dingshi/dingshi/2.DSN
dingshi/dingshi/DS.DSN
dingshi/dingshi/定时.doc
dingshi/dingshi
dingshi
dingshi/dingshi/DS.DSN
dingshi/dingshi/定时.doc
dingshi/dingshi
dingshi
本网站为编程资源及源代码搜集、介绍的搜索网站,版权归原作者所有! 粤ICP备11031372号
1999-2046 搜珍网 All Rights Reserved.