Welcome![Sign In][Sign Up]
Location:
Search - LED fla

Search list

[OtherFLASH_LED

Description: 七彩LED指示灯,通电后,按开关开启后,每隔四秒钟LED闪一次,且每次闪的颜色可以变化可以组合出多种颜色循环。七彩LED灯用红绿蓝三色的共阳LED灯,驱动直接用78P153的I/0。-Colorful LED lights, electricity, press switch to open, the LED flash every four seconds once, and each flash can change the color of a variety of colors can be combined cycle. Colorful LED lights with red and green and blue LED lights for a total of Shenyang, the 78P153 drive directly I/0.
Platform: | Size: 1024 | Author: james | Hits:

[SCMbeep-qu-dong

Description: 上一节讲了利用累计定时中断次数实现LED灯闪烁,这个例子同时也第一次展示了我最完整的实战程序框架: 用switch语句实现状态机,外加定时中断。这个框架看似简单,实际上就是那么简单。我做的所有开发项目都是基于这个简单框架, 但是非常好用。上一节只有一个单任务的LED灯在闪烁,这节开始,我们多增加一个蜂鸣器报警的任务,要教会大家四个知识点: 第一点:蜂鸣器的驱动程序框架编写。 第二点:多任务处理的程序框架。 第三点:如何控制蜂鸣器声音的长叫和短叫。 第四点:如何知道1秒钟需要多少个定时中断,也就是如何按比例修正时间精度。 具体内容,请看源代码讲解。 实现功能:同时跑两个任务,第一个任务让一个LED灯1秒钟闪烁一次。第二个任务让蜂鸣器在前面3秒发生一次短叫报警,在后面6秒发生一次长叫报警,反复循环。 -Speaking on a cumulative timer interrupt frequency using LED lights flashing, this example also shows my first real full procedural framework: With a switch statement to achieve a state machine, plus a timer interrupt. This framework may seem simple, actually so simple. I do all the development projects are based on this simple framework, But it is very easy to use. Previous section only a single task LED lights flashing, this festival started, we multi-task a buzzer alarm increases, the knowledge to teach you four points: First point: Driver Framework buzzer preparation. The second point: the procedural framework of multi-tasking. The third point: how to control the buzzer sounds and the short length is called is called. The fourth point: How do you know how much a 1 second timer interrupt, which is how a pro rata correction time accuracy. Details, see the source code to explain. Function: run two tasks simultaneously, the first task to make a LED light fla
Platform: | Size: 3072 | Author: 高飞 | Hits:

CodeBus www.codebus.net