您的位置 首页 设计

XS128单片机试验:B口灯替换闪亮

includehidefh>*commondefinesandmacros*includederivativeh*derivative-specificdefinitions*includ

#include /* common defines and macros */
#include “derivative.h” /* derivative-specific definitions */
#include “WQ.h”
//This is the firstprogramof mine,its used to text the board;
//LED will twinkle in very fast speed;
void DELAY(int y)
{
int i,x;
for (i=y;i>0;i–)
for(x=220;x>0;x–);
}
void main(void) {
DDRB =0XFF; //置1,作为输出口
while(1){
PORTB=0x55;
DELAY(550);
PORTB=0XAA;
DELAY(550);
}

}

声明:本文内容来自网络转载或用户投稿,文章版权归原作者和原出处所有。文中观点,不代表本站立场。若有侵权请联系本站删除(kf@86ic.com)https://www.86ic.net/ziliao/sheji/255045.html

为您推荐

联系我们

联系我们

在线咨询: QQ交谈

邮箱: kf@86ic.com

关注微信
微信扫一扫关注我们

微信扫一扫关注我们

返回顶部