新闻中心

EEPW首页 > 嵌入式系统 > 设计应用 > 一段流水灯的单片机程序

一段流水灯的单片机程序

作者: 时间:2016-11-25 来源:网络 收藏
#include

#include
void delay(unsigned int);

本文引用地址:https://www.eepw.com.cn/article/201611/321326.htm

void main(void){
P1=0xaa;
while(1){
P1=_crol_(P1,1);
delay(500);
}
}

void delay(unsigned int xms){
unsigned int i,j;
for(i=xms;i>0;i--)
for(j=110;j>0;j--);
}



#include

_crol_ 为循环左移函数



关键词: 流水灯单片机程

评论


技术专区

关闭