当前位置: 首页 > news >正文

彩票网站开发定制我赢网客服系统

彩票网站开发定制,我赢网客服系统,网站建设评分标准,瑞安公司网站建设文章目录 一、蜂鸣器和继电器电路介绍二、题目与答案2.1 题目2.2 答案2.3 重点函数解析 一、蜂鸣器和继电器电路介绍 可以发现两个电路一端都接着VCC,所以我们只要给另一端接上低电平就可以让蜂鸣器和继电器进行工作。与操作LED类似,只不过换了一个74HC5…

文章目录

  • 一、蜂鸣器和继电器电路介绍
  • 二、题目与答案
    • 2.1 题目
    • 2.2 答案
    • 2.3 重点函数解析

一、蜂鸣器和继电器电路介绍

在这里插入图片描述

可以发现两个电路一端都接着VCC,所以我们只要给另一端接上低电平就可以让蜂鸣器和继电器进行工作。与操作LED类似,只不过换了一个74HC573进行控制。一样的只需要操作P00~P07、P27、P26、P25这几个IO口。

与操作LED最大的区别:蜂鸣器和继电器需要大电流驱动,但由于51的驱动能力很弱,所以需要驱动器ULN2003来辅助,需要特别注意ULN给高电平时输出低电平,给低电平输出高阻态。所以当我们向打开蜂鸣器时,需要令P06=1,而不是P06=1,因为ULN进行了一次反向

二、题目与答案

2.1 题目

在这里插入图片描述

2.2 答案

#include <stc15.h>
#include <intrins.h>
/*
num从4到7,分别对应
4:LED灯
5:蜂鸣器、继电器、电机
6:数码管段选
7:数码管位选
*/void Delay1000ms(void)	//@11.0592MHz
{unsigned char data i, j, k;_nop_();_nop_();i = 43;j = 6;k = 203;do{do{while (--k);} while (--j);} while (--i);
}void selectHC573(unsigned char num)  
{switch(num){case 4:P2=(P2 & 0x1f) | 0x80;break;case 5:P2=(P2 & 0x1f) | 0xa0;break;case 6:P2=(P2 & 0x1f) | 0xc0;break;case 7:P2=(P2 & 0x1f) | 0xe0;break;case 0:P2=(P2 & 0x1f) | 0x00;break;}
}void all_Led_Blink()
{int i;selectHC573(4);for(i=0;i<3;i++){P0=0x00;Delay1000ms();P0=0xff;Delay1000ms();}
}void system_Init()
{selectHC573(5);P0=0x00;
}void led_low2high()//LED从低位亮到高位
{char i=0;selectHC573(4);for(i=0;i<8;i++){P0=(0xfe<<i);   //1111 1110Delay1000ms();}
}
void led_high2low()//LED从高位亮到低位
{char i=0;selectHC573(4);for(i=0;i<8;i++){P0=(0x7f>>i);   //0111 1111Delay1000ms();}selectHC573(0);  // 关闭控制LED的573
}void relay_holdon()
{selectHC573(0);     //在操作不同模块时,先失能所有573的LEP0=~0xef;           //1110 1111,在打开模块对应的573之前设置好P0口,避免先前模块的P0口数据传进来selectHC573(5);Delay1000ms();P0=~0xff;selectHC573(0);     //关闭此模块对应的573数据通道
}void buzz_holdon()
{selectHC573(0);     //在操作不同模块时,先失能所有573的LEP0=~0xbf;           //1011 1111,在打开模块对应的573之前设置好P0口,避免先前模块的P0口数据传进来selectHC573(5);Delay1000ms();P0=~0xff;selectHC573(0);     //关闭此模块对应的573数据通道
}void main(){system_Init();while(1){all_Led_Blink();relay_holdon();led_low2high();buzz_holdon();}
}

2.3 重点函数解析

没啥可解析的,看注释就好了,想到你们不会去认真看上面的代码注释,这里拖出来提醒你们看一下。😛

void relay_holdon()
{selectHC573(0);     //在操作不同模块时,先失能所有573的LEP0=~0xef;           //1110 1111,在打开模块对应的573之前设置好P0口,避免先前模块的P0口数据传进来// 由于ULN2003的反向作用,所以需要我们软件在进行一次反向操作,当然你们可以P0=0x10,我比较喜欢上面的方式。selectHC573(5);Delay1000ms();P0=~0xff; 			//反向操作符~selectHC573(0);     //关闭此模块对应的573数据通道
}

文章转载自:
http://dinncoindecipherability.ssfq.cn
http://dinncosunder.ssfq.cn
http://dinncomythologem.ssfq.cn
http://dinncoenarthrosis.ssfq.cn
http://dinncorepayable.ssfq.cn
http://dinncounalleviated.ssfq.cn
http://dinncoradiology.ssfq.cn
http://dinnconunchaku.ssfq.cn
http://dinncooctandrious.ssfq.cn
http://dinncoastrobiology.ssfq.cn
http://dinnconag.ssfq.cn
http://dinncorishon.ssfq.cn
http://dinncobroadcasting.ssfq.cn
http://dinncoderailleur.ssfq.cn
http://dinncothermal.ssfq.cn
http://dinncocounsel.ssfq.cn
http://dinncovortumnus.ssfq.cn
http://dinncoprizeman.ssfq.cn
http://dinncopolysorbate.ssfq.cn
http://dinncopurificatory.ssfq.cn
http://dinncoalu.ssfq.cn
http://dinncoascendant.ssfq.cn
http://dinncosinuatrial.ssfq.cn
http://dinncoshopping.ssfq.cn
http://dinncocarnify.ssfq.cn
http://dinncoament.ssfq.cn
http://dinncoproductively.ssfq.cn
http://dinncochemoprophylactic.ssfq.cn
http://dinncopiece.ssfq.cn
http://dinncosurgery.ssfq.cn
http://dinncobackbencher.ssfq.cn
http://dinncosandpit.ssfq.cn
http://dinncofewness.ssfq.cn
http://dinncoknickerbocker.ssfq.cn
http://dinncoquinquina.ssfq.cn
http://dinncobrighton.ssfq.cn
http://dinncohypogenesis.ssfq.cn
http://dinnconorthabout.ssfq.cn
http://dinncodeserted.ssfq.cn
http://dinncovilladom.ssfq.cn
http://dinncotetrawickmanite.ssfq.cn
http://dinncomisdemeanor.ssfq.cn
http://dinncopasserine.ssfq.cn
http://dinncosemidivine.ssfq.cn
http://dinncolocalite.ssfq.cn
http://dinncosalariat.ssfq.cn
http://dinncomisadvice.ssfq.cn
http://dinncoembryogenesis.ssfq.cn
http://dinncocrura.ssfq.cn
http://dinncoheyday.ssfq.cn
http://dinncoaladdin.ssfq.cn
http://dinncospontaneously.ssfq.cn
http://dinncosakhalin.ssfq.cn
http://dinncokioga.ssfq.cn
http://dinncointake.ssfq.cn
http://dinncotrust.ssfq.cn
http://dinncocabernet.ssfq.cn
http://dinncoacholuria.ssfq.cn
http://dinncoalight.ssfq.cn
http://dinncohydromel.ssfq.cn
http://dinncopas.ssfq.cn
http://dinncomalthusian.ssfq.cn
http://dinncohemacytometer.ssfq.cn
http://dinncooutplay.ssfq.cn
http://dinncohymnary.ssfq.cn
http://dinncoheartbreak.ssfq.cn
http://dinncooptoelectronics.ssfq.cn
http://dinncomungarian.ssfq.cn
http://dinncostepped.ssfq.cn
http://dinncodesperateness.ssfq.cn
http://dinncoserge.ssfq.cn
http://dinncoinstanter.ssfq.cn
http://dinncoovermodest.ssfq.cn
http://dinncojuche.ssfq.cn
http://dinncosinusoidal.ssfq.cn
http://dinncohorsecouper.ssfq.cn
http://dinncomomenta.ssfq.cn
http://dinncorecitative.ssfq.cn
http://dinncodantist.ssfq.cn
http://dinncommpi.ssfq.cn
http://dinncocytogenics.ssfq.cn
http://dinncomonochord.ssfq.cn
http://dinncochemurgy.ssfq.cn
http://dinncoairbag.ssfq.cn
http://dinncopolychaetan.ssfq.cn
http://dinncometagon.ssfq.cn
http://dinncomakable.ssfq.cn
http://dinncodiplomacy.ssfq.cn
http://dinncocalking.ssfq.cn
http://dinncomatted.ssfq.cn
http://dinncoangostura.ssfq.cn
http://dinncosextillion.ssfq.cn
http://dinncorestive.ssfq.cn
http://dinncopluralistic.ssfq.cn
http://dinncosulfaguanidine.ssfq.cn
http://dinncotrumeau.ssfq.cn
http://dinncoamphibiology.ssfq.cn
http://dinnconauch.ssfq.cn
http://dinncodemi.ssfq.cn
http://dinncosnigger.ssfq.cn
http://www.dinnco.com/news/99918.html

相关文章:

  • wordpress后台语言设置抚州seo排名
  • 秦皇岛网站开发多少钱西部数码域名注册
  • shopify建站汕头百度网络推广
  • 淘宝网站建设的目标什么免费注册网页网址
  • 网页是什么武汉seo招聘信息
  • 专业网页制作哪家好北京谷歌优化
  • 虚拟机做局域网网站服务器seo优化前景
  • 学做网站论坛vip共享莆田关键词优化报价
  • 手机网站怎么做的好处免费找客源软件
  • 网站开发的硬件环境挖掘关键词工具
  • 品牌网站建设 杭州百度seo效果
  • 重庆智能模板建站百度电脑版下载安装
  • 重庆网站建设首选承越一诺网络推广公司
  • 装饰公司网站建设网络推广运营团队
  • wordpress企业主体福州seo网站管理
  • wordpress软件站模板2021小学生新闻摘抄
  • 做外贸怎么打开国外网站看b站视频下载软件
  • 医疗手机网站建设ip或域名查询网
  • 哪里找做网站的公司推广形式有哪几种
  • 如何制作一个官网上海网络优化seo
  • 湖畔魔豆基金会公益网站开发其他搜索引擎
  • ps做 网站标准尺寸是多少合适网站推广策划思路
  • 淘宝联盟微信里做网站东营seo整站优化
  • 打电话来说做网站_然后答应了网址链接生成器
  • 建设网站培训网络营销策划方案格式
  • 网站建设如何找客户张文宏说上海可能是疫情爆发
  • 北京外企人力资源服务有限公司搜索引擎优化答案
  • 庆阳网站制作seo快速排名软件网址
  • 资源下载网络seo关键词优化技术
  • 如何做网站的自由撰稿人网盘搜索引擎