您的位置 首页 嵌入式

555使用

C代码:/***************writer:shopping.w******************/#includereg52.h>#defineuintunsignedint#de

C代码:

/*************** writer:shopping.w ******************/
#include
#define uint unsigned int
#define uchar unsigned char

sbit Signal = P1^0;
sbit BEEP = P3^7;

void Delay(uint x)
{
uchar i;
while(x–)
{
for(i=0;i<120;i++);
}
}

void main()
{
while(1)
{
if(Signal)
{
BEEP=~BEEP;
Delay(3);
}
}
}

仿真电路:

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

为您推荐

联系我们

联系我们

在线咨询: QQ交谈

邮箱: kf@86ic.com

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

微信扫一扫关注我们

返回顶部