- 2
- 0
- 约5.01千字
- 约 13页
- 2026-10-19 发布于江苏
- 举报
单片机蓝桥杯往年例题(3篇)
1.例题:
编写程序,实现一个单片机控制LED灯闪烁,要求LED灯每秒闪烁一次,闪烁5次后停止。
答案:
```c
includereg51.h
defineLEDP2
voiddelay(unsignedintms){
unsignedinti,j;
for(i=0;ims;i++)
for(j=0;j120;j++);
}
voidmain(){
unsignedcharcount=0;
while(1){
LED=0xFF;
原创力文档

文档评论(0)