晟矽微单片机第二天

[复制链接]
 楼主| 34af9uc 发表于 2020-10-14 22:32 | 显示全部楼层 |阅读模式
本帖最后由 34af9uc 于 2020-10-14 23:03 编辑


//晟矽微单片机第二天//qq:74145445//快手:共同学习stm8


#include"MC32P7311.h"
void           yanshi();                     //延时
void           main()
{
P00D           =1;                   //P0 口数据位
P00OE          =1;                   //P0 口输出使能寄存器0:作为输入口1:作为输出口
         
for(;;)
{
P00D           =1;        
yanshi();
P00D           =0;        
yanshi();
}

}

void           yanshi()                     //延时
{
unsigned char x,y;
for(x=100;x>0;x--)
{
for(y=100;y>0;y--);
}

}

319

主题

487

帖子

63

粉丝
快速回复 在线客服 返回列表 返回顶部

319

主题

487

帖子

63

粉丝
快速回复 在线客服 返回列表 返回顶部