文件名称:NO.20
介绍说明--下载内容均来自于网络,请自行研究使用
利用单片机、1个开关、8个LED发光二极管(水平排列),实现开关控制循环左移和右移流水灯效果。系统晶振12M,要求:
(1)开关合上时,8个LED从右到左以1秒间隔依次点亮(即任一时刻只能有1个LED亮),如此循环;
(2)开关断开时,8个LED从左到右以0.5秒间隔依次点亮(即任一时刻只能有1个LED亮),如此循环;(Using single chip microcomputer, 1 switches and 8 LED light emitting diodes (horizontal arrangement), the switch controls the effect of the left shift and right shift running water lamp. The system crystal oscillator 12M requires:
(1) when the switch is closed, the 8 LED is lit from right to left at one second interval (that is, only 1 LED lights at any time), so circulate.
(2) when the switch is disconnected, the 8 LED is lit from left to right at 0.5 seconds interval (that is, only 1 LED lights at any time), so circulate.)
(1)开关合上时,8个LED从右到左以1秒间隔依次点亮(即任一时刻只能有1个LED亮),如此循环;
(2)开关断开时,8个LED从左到右以0.5秒间隔依次点亮(即任一时刻只能有1个LED亮),如此循环;(Using single chip microcomputer, 1 switches and 8 LED light emitting diodes (horizontal arrangement), the switch controls the effect of the left shift and right shift running water lamp. The system crystal oscillator 12M requires:
(1) when the switch is closed, the 8 LED is lit from right to left at one second interval (that is, only 1 LED lights at any time), so circulate.
(2) when the switch is disconnected, the 8 LED is lit from left to right at 0.5 seconds interval (that is, only 1 LED lights at any time), so circulate.)
相关搜索: 单片机课程设计
(系统自动生成,下载前可以参看下载内容)