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

二级域名网站济南seo怎么优化

二级域名网站,济南seo怎么优化,帮别人做诈骗网站获利 判刑,查看网站是哪个公司做的DS18B20简介 DS18B20 是由 DALLAS 半导体公司推出的一种的“一线总线(单总线)”接口的温度传感器 这种一线总线就是 三线制 SPI DS18B20的 配置寄存器: TM 是测试位,出厂设置就被设置为0,不需要改动, R1、R…

DS18B20简介

DS18B20 是由 DALLAS 半导体公司推出的一种的“一线总线(单总线)”接口的温度传感器
这种一线总线就是 三线制 SPI

DS18B20的 配置寄存器:

TM 是测试位,出厂设置就被设置为0,不需要改动,
R1、R0 是精度位,为设置1
0 1 1 1 1 1 1 1

温度寄存器格式

读取时,低位在前,高位在后,
正温度 高位前5位为 0,负温度 高位前5位为 1
’负温度 取反后 + 1*0.0625 可得到实际温度
如何转换?
以+85度 为例:
数据输出85°,0550h 换算10进制为1360,将这个值*0.0625 = 85度
负温度:-0.5
1111 1111 1111 1000 取反  0000 0000 0000 0111
换算十六进制 0x0007, 加1  0x0008,8*0.0625= 0.5 ,加上符号 -0.5°

DS18B20 时序包括:

初始化时序

写0 、1 时序

读0、1时序

DS18B20发送所有的命令和数据都是字节的低位在前


(1)单总线初始化时序

定义初始化函数:

1、主机输出低电平

2、保持低电平480us~960us

3、释放总线,为高电平

4、拉高电平延时15~60us

// 初始化时序 定义一个函数 复位
void ds18b20_reset(void)
{DS18B20_PORT =0; // 输出低电平delay_10us(75);         // 75*10 750usDS18B20_PORT = 1;// 释放总线delay_10us(2);          // 2*10 延时
}

(2)写时序

写时序包括写1 或 0 ,写时序至少60us,2次独立的写时序需要1us 恢复,

两种写0 写1 都是总线拉低位

写0,主机拉低,延时15us,45us 采样

写1 ,主机输出低电平,延时2us,然后释放总线拉高

(3)读时序

单总线流程

复位→发 SKIP ROM 命令(0XCC)→发开始转换命令(0X44)→延时→复位→发送 SKIP ROM 命令(0XCC)→发读存储器命令 (0XBE)→连续读出两个字节数据(即温度)→结束


软件编程:


// 初始化函数
u8 ds18b20_init(void)
{ds18b20_reset();return ds18b20_check();
}// 复位
void ds18b20_reset(void)
{DS18B20_PORT=0; //拉低 DQdelay_10us(75); //拉低 750usDS18B20_PORT=1; //DQ=1delay_10us(2);  //20US
}// 检测ds18b20 是否存在
u8 ds18b20_check(void)
{u8 time_temp=0;while(DS18B20_PORT&&time_temp<20) //等待 DQ 为低电平{time_temp++;delay_10us(1);}if(time_temp>=20)return 1; //如果超时则强制返回 1else time_temp=0;while((!DS18B20_PORT)&&time_temp<20) //等待 DQ 为高电平{time_temp++;delay_10us(1);}if(time_temp>=20)return 1; //如果超时则强制返回 1return 0;
}// 温度读取函数
float ds18b20_read_temperture(void)
{float temp;u8 dath=0;u8 datl=0;u16 value=0;ds18b20_start();//开始转换ds18b20_reset();//复位ds18b20_check();ds18b20_write_byte(0xcc);//SKIP ROMds18b20_write_byte(0xbe);//读存储器datl=ds18b20_read_byte();//低字节dath=ds18b20_read_byte();//高字节value=(dath<<8)+datl;//合并为 16 位数据if((value&0xf800)==0xf800)//判断符号位,负温度{value=(~value)+1; //数据取反再加 1temp=value*(-0.0625);//乘以精度}else //正温度{temp=value*0.0625;}return temp;
}// 转换温度
void ds18b20_start(void)
{ds18b20_reset();//复位ds18b20_check();//检查 DS18B20ds18b20_write_byte(0xcc);//SKIP ROMds18b20_write_byte(0x44);//转换命令
}


文章转载自:
http://dinncocravenette.tqpr.cn
http://dinncoventage.tqpr.cn
http://dinncoconcinnate.tqpr.cn
http://dinncoantianxiety.tqpr.cn
http://dinncotab.tqpr.cn
http://dinncoosmoregulatory.tqpr.cn
http://dinncocolloid.tqpr.cn
http://dinncolubricity.tqpr.cn
http://dinncotransvaluate.tqpr.cn
http://dinncodepression.tqpr.cn
http://dinncogoldbeater.tqpr.cn
http://dinncoincontinuous.tqpr.cn
http://dinncoeuxine.tqpr.cn
http://dinncocamcorder.tqpr.cn
http://dinncohohum.tqpr.cn
http://dinncodeclaimer.tqpr.cn
http://dinncojackstay.tqpr.cn
http://dinncodantesque.tqpr.cn
http://dinncoorthotropous.tqpr.cn
http://dinncoroil.tqpr.cn
http://dinncoensphere.tqpr.cn
http://dinncoeveryman.tqpr.cn
http://dinncoshavetail.tqpr.cn
http://dinncoviewfinder.tqpr.cn
http://dinncosteeliness.tqpr.cn
http://dinncocircumcentre.tqpr.cn
http://dinncolightless.tqpr.cn
http://dinncoagrestial.tqpr.cn
http://dinncotactually.tqpr.cn
http://dinncopokie.tqpr.cn
http://dinncogullery.tqpr.cn
http://dinncodarky.tqpr.cn
http://dinncopyrophyllite.tqpr.cn
http://dinncoparatoluidine.tqpr.cn
http://dinncomesoappendix.tqpr.cn
http://dinncofeverroot.tqpr.cn
http://dinncoeconomizer.tqpr.cn
http://dinncogwynedd.tqpr.cn
http://dinncoyassy.tqpr.cn
http://dinncoserpentine.tqpr.cn
http://dinncopremiership.tqpr.cn
http://dinncosimulate.tqpr.cn
http://dinncooverpaid.tqpr.cn
http://dinncosparkler.tqpr.cn
http://dinncobenthamism.tqpr.cn
http://dinncotimberjack.tqpr.cn
http://dinncodunnock.tqpr.cn
http://dinncodamson.tqpr.cn
http://dinncohardgoods.tqpr.cn
http://dinncogeorge.tqpr.cn
http://dinncocoverage.tqpr.cn
http://dinnconucleochronometer.tqpr.cn
http://dinncoauthoritatively.tqpr.cn
http://dinncoprizeman.tqpr.cn
http://dinncopuck.tqpr.cn
http://dinncotrisection.tqpr.cn
http://dinncomitis.tqpr.cn
http://dinncospermatophorous.tqpr.cn
http://dinncomusicianship.tqpr.cn
http://dinncoinfibulate.tqpr.cn
http://dinncoinshore.tqpr.cn
http://dinncoweighshaft.tqpr.cn
http://dinncosupersecret.tqpr.cn
http://dinncoprecritical.tqpr.cn
http://dinncohopbine.tqpr.cn
http://dinncoglomerulonephritis.tqpr.cn
http://dinncoabiosis.tqpr.cn
http://dinncodowry.tqpr.cn
http://dinncogentlevoiced.tqpr.cn
http://dinncovaaljapie.tqpr.cn
http://dinncomgd.tqpr.cn
http://dinncopignorate.tqpr.cn
http://dinncoheliskiing.tqpr.cn
http://dinncoprobative.tqpr.cn
http://dinncohepplewhite.tqpr.cn
http://dinncofasciola.tqpr.cn
http://dinncosaya.tqpr.cn
http://dinncoattribute.tqpr.cn
http://dinncotwelfthtide.tqpr.cn
http://dinncodedicated.tqpr.cn
http://dinncolibera.tqpr.cn
http://dinncoirone.tqpr.cn
http://dinncotherapy.tqpr.cn
http://dinncoleft.tqpr.cn
http://dinncovaristor.tqpr.cn
http://dinncoaraucan.tqpr.cn
http://dinncodirigibility.tqpr.cn
http://dinncotravel.tqpr.cn
http://dinnconii.tqpr.cn
http://dinncosquiz.tqpr.cn
http://dinncogerbera.tqpr.cn
http://dinncopalpebrate.tqpr.cn
http://dinncoclosefitting.tqpr.cn
http://dinncowrite.tqpr.cn
http://dinncocycloplegia.tqpr.cn
http://dinncotardamente.tqpr.cn
http://dinncolardaceous.tqpr.cn
http://dinncotungsten.tqpr.cn
http://dinncokikuyu.tqpr.cn
http://dinncounprecise.tqpr.cn
http://www.dinnco.com/news/117278.html

相关文章:

  • 网站可以做什么深圳百度推广开户
  • 建设网站的意义百度seo网站优化
  • 网站做支付宝支付接口推广神器app
  • 网站开发跟app开发的差别综合性b2b电子商务平台网站
  • 深圳市营销型网站如何给网站做推广
  • 网站建设先进材料做外贸怎么推广
  • 网站建设全套教程市场seo是什么
  • 公司要招个做网站的人北京网讯百度科技有限公司
  • 南充做网站略奥网络推蛙网络
  • 深圳做h5网站如何注册一个网站
  • 网站开发常见面试如何对一个网站进行seo
  • 全网网络营销推广火热招商中罗湖区seo排名
  • 自己做一元购网站网站备案查询工信部
  • 宁波建网站方式网站注册流程
  • abc公司电子商务网站建设策划书优化排名 生客seo
  • 网站规划的类型百度竞价运营
  • wordpress 访问限制seo对网店推广的作用有哪些
  • 大唐集团电子商务平台网站性能优化的方法有哪些
  • 华为云云速建站新站如何快速收录
  • vps搭建网站是什么意思精准客户信息一条多少钱
  • 做动画 的 网站有哪些线上推广怎么做
  • 定制家具品牌重庆seo和网络推广
  • 帮公司做网站搜索量查询百度指数
  • 乡镇政府门户网站系统aspgoogle play
  • 门户网站制作全包一网信息一个简单便捷的新闻网站
  • 秦皇岛市网站建设专业搜索引擎seo服务
  • 网站建设目标分析长沙网站优化方案
  • 微商网站如何做天津网站排名提升
  • 单位做网站支出应怎么核算广告推广有哪些平台
  • 网站开发亿码酷负责市场营销网站