cjjh2014 发表于 2021-8-15 23:03

【Silicon Labs 开发套件评测】+ 温湿度传感器硬件了解

<p align="center" style="text-align:center">&nbsp;</p>

<p align="justify" style="text-align:justify"> &nbsp;</p>

<p align="justify" style="text-align:justify"><span style="font-size:10.5pt"><span style="text-justify:inter-ideograph"><span style="font-family:Calibri"><span style="font-size:10.5000pt"><span style="font-family:宋体"><font face="宋体">如图所示开发板里的右下角处白色器件就是</font><font face="Calibri">SILICON LABS</font><font face="宋体">公司自产的</font><font face="Calibri">SI7021</font><font face="宋体">温湿度传感器。通过查阅厂家的数据手册,大概的特点如下:</font></span></span><span style="font-size:9.5000pt"><span style="background:#ffffff"><span style="font-family:Helvetica"><span style="color:#000000"><span style="letter-spacing:0.0000pt"><span style="font-style:normal">Si7021-A20-GM 数字相对湿度和温度传感器集成了湿度和温度传感器元件、模拟到数字转换器、信号处理和 I</span></span></span></span></span></span><span style="font-size:7.0000pt"><span style="background:#ffffff"><span style="font-family:Helvetica"><span style="color:#000000"><span style="letter-spacing:0.0000pt"><span style="font-style:normal">2</span></span></span></span></span></span><span style="font-size:9.5000pt"><span style="background:#ffffff"><span style="font-family:Helvetica"><span style="color:#000000"><span style="letter-spacing:0.0000pt"><span style="font-style:normal"><font face="Helvetica">单芯片中的</font> C 接口。Si7021-A20-GM 的温度精度为 &plusmn;0.4 &deg;C,相对湿度精度为 &plusmn;3%。创新的 CMOS 设计也为相对湿度和温度传感器提供了业内最低的功耗。通过全工厂校准,Si7021-A20-GM 在多氯联苯组装过程中无需额外的 RH/温度校准。</span></span></span></span></span></span></span></span></span></p>

<p align="justify" style="text-align:justify"> &nbsp;</p>

<p align="justify" style="text-align:justify"><span style="font-size:10.5pt"><span style="text-justify:inter-ideograph"><span style="font-family:Calibri"><span style="font-size:10.5000pt"><span style="font-family:宋体"><font face="宋体">其它的相关内容在规格书里有有详细描述,本人只对这个器件的</font><font face="Calibri">I2C</font><font face="宋体">接口进行重点学习。</font><font face="Calibri">I2C</font><font face="宋体">通信主要用于板内器件的通信,属于同步通信方式,是主从器件共用一个时钟的,且接线简单,只有两条线</font><font face="Calibri">SCL</font><font face="宋体">、</font><font face="Calibri">SDA</font><font face="宋体">就可以进行数据的发送与接收。</font><font face="Calibri">I2C</font><font face="宋体">有硬件</font><font face="Calibri">I2C</font><font face="宋体">和</font></span></span><span style="font-size:9.5000pt"><span style="background:#ffffff"><span style="font-family:Arial"><span style="color:#4d4d4d"><span style="letter-spacing:0.0000pt"><span style="font-style:normal"><font face="Arial">通用的模拟</font>I2C代码</span></span></span></span></span></span><span style="font-size:9.5000pt"><span style="background:#ffffff"><span style="font-family:宋体"><span style="color:#4d4d4d"><span style="letter-spacing:0.0000pt"><span style="font-style:normal"><font face="宋体">实现</font><font face="Arial">I2C</font><font face="宋体">功能</font></span></span></span></span></span></span><span style="font-size:9.5000pt"><span style="background:#ffffff"><span style="font-family:Arial"><span style="color:#4d4d4d"><span style="letter-spacing:0.0000pt"><span style="font-style:normal"><font face="Arial">,只需要会</font>MCU的IO口操作即可。</span></span></span></span></span></span></span></span></span></p>

<p style="text-align:justify"><span style="font-size:10.5pt"><span style="font-family:Calibri"><span style="font-size:10.5000pt"><span style="font-family:宋体">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font face="Calibri">I2C</font><font face="宋体">的读写主要有以下几个步骤:</font></span></span><span style="font-size:10.5000pt"><span style="font-family:Calibri"><font face="宋体">起始信号</font></span></span><span style="font-size:10.5000pt"><span style="font-family:宋体"><font face="宋体">、</font></span></span><span style="font-size:10.5000pt"><span style="font-family:Calibri"><font face="宋体">写数据信号</font></span></span><span style="font-size:10.5000pt"><span style="font-family:宋体"><font face="宋体">、</font></span></span><span style="font-size:10.5000pt"><span style="font-family:Calibri"><font face="宋体">读数据信号</font></span></span><span style="font-size:10.5000pt"><span style="font-family:宋体"><font face="宋体">、</font></span></span><span style="font-size:10.5000pt"><span style="font-family:Calibri"><font face="宋体">答信号</font></span></span><span style="font-size:10.5000pt"><span style="font-family:宋体"><font face="宋体">、</font></span></span><span style="font-size:10.5000pt"><span style="font-family:Calibri"><font face="宋体">非应答信号</font></span></span><span style="font-size:10.5000pt"><span style="font-family:宋体"><font face="宋体">、</font></span></span><span style="font-size:10.5000pt"><span style="font-family:Calibri"><font face="宋体">终止信号</font></span></span><span style="font-size:10.5000pt"><span style="font-family:宋体"><font face="宋体">。</font></span></span><span style="font-size:10.5000pt"><span style="font-family:宋体"><font face="宋体">在进行</font><font face="Calibri">I2C</font><font face="宋体">读写操作之前需要先了解下规格书里的相关内容:</font></span></span></span></span></p>

<ol>
        <li style="text-align:justify"><span style="font-size:10.5pt"><span style="font-family:Calibri"><span style="font-size:10.5000pt"><span style="font-family:宋体"><font face="宋体">从机地址就是</font><font face="Calibri">SI7021</font><font face="宋体">的地址用十六进制表示是</font><font face="Calibri">0X40,</font><font face="宋体">因为地址为</font><font face="Calibri">7</font><font face="宋体">位 </font><font face="Calibri">A0-A6</font><font face="宋体">。</font></span></span></span></span></li>
</ol>

<p style="text-align:justify"> &nbsp;</p>

<ol start="2">
        <li style="text-align:justify"><span style="font-size:10.5pt"><span style="font-family:Calibri"><span style="font-size:10.5000pt"><span style="font-family:宋体"><font face="宋体">相关的命令及参数</font></span></span></span></span></li>
</ol>

<p style="text-align:justify"> &nbsp;</p>

<p style="text-align:justify"><span style="font-size:10.5pt"><span style="font-family:Calibri"><span style="font-size:10.5000pt"><span style="font-family:宋体"><font face="Calibri">3.</font></span></span><span style="font-size:9.5000pt"><span style="background:#ffffff"><span style="font-family:Arial"><span style="color:#4d4d4d"><span style="letter-spacing:0.0000pt"><span style="font-style:normal"><font face="Arial">命令和数据</font>I2C发送过程:</span></span></span></span></span></span></span></span></p>

<p style="text-align:justify"> &nbsp;</p>

<p style="text-align:justify"> &nbsp;</p>

<ol start="3">
        <li style="text-align:justify"><span style="font-size:10.5pt"><span style="font-family:Calibri"><span style="font-size:9.5000pt"><span style="background:#ffffff"><span style="font-family:Arial"><span style="color:#4d4d4d"><span style="letter-spacing:0.0000pt"><span style="font-style:normal"><font face="Arial">温度和湿度的计算公式:</font></span></span></span></span></span></span></span></span></li>
</ol>

<p style="text-align:justify"> &nbsp;</p>

<p style="text-align:justify"> &nbsp;</p>

<p style="text-align:justify">&nbsp;</p>

<p style="text-align:justify"><span style="font-size:10.5pt"><span style="font-family:Calibri"><span style="font-size:10.5000pt"><span style="font-family:宋体"><font face="Calibri">4.</font><font face="宋体">还有最重要的一点是时序图:</font></span></span></span></span></p>

<p style="text-align:justify"> &nbsp;</p>

<p style="text-align:justify"><span style="font-size:10.5pt"><span style="font-family:Calibri"><span style="font-size:10.5000pt"><span style="font-family:宋体"><font face="宋体">以上这些内容在图片里已经可以让人比较容易理解,这里就没有再用文字进行重复描述了。然后就是对开发板原理图的了解,需要知道</font><font face="Calibri">SI7021</font><font face="宋体">的外围电路。</font></span></span></span></span></p>

<p style="text-align:justify"> &nbsp;<span style="font-size:10.5pt"><span style="font-family:Calibri"><span style="font-size:10.5000pt"><span style="font-family:宋体"><font face="宋体">此为器件</font><font face="Calibri">SCL</font><font face="宋体">、</font><font face="Calibri">SDA</font><font face="宋体">的开关</font></span></span></span></span></p>

<p style="text-indent:0.0000pt; text-align:justify"><span style="font-size:10.5pt"><span style="font-family:Calibri">&nbsp;&nbsp;&nbsp;&nbsp;</span></span> &nbsp; &nbsp;<span style="font-size:10.5pt"><span style="font-family:Calibri"><span style="font-size:10.5000pt"><span style="font-family:宋体"><font face="宋体">器件的连接单片机的</font><font face="Calibri">IO</font><font face="宋体">口</font></span></span></span></span></p>

<p style="text-align:justify">&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;<span style="font-size:10.5pt"><span style="font-family:Calibri"><span style="font-size:10.5000pt"><span style="font-family:宋体"><font face="宋体">有了这些内容后面就是进软件程序的编写了,由理篇幅的原因,软件的操作实现会在下一篇报告里再进行分享。</font></span></span></span></span></p>

soso 发表于 2021-8-16 09:35

<p>一篇文章搞懂一个知识点,挺好。</p>

freebsder 发表于 2021-8-17 20:30

<p>&plusmn;0.4 &deg;C这个精度还行</p>

w494143467 发表于 2021-8-18 12:57

<p>这个温度传感器的特性怎么样?</p>

cjjh2014 发表于 2021-8-18 20:31

w494143467 发表于 2021-8-18 12:57
这个温度传感器的特性怎么样?

<p>看参数还行,准备做成样品进行测试。</p>

eew_e3eEw7 发表于 2021-9-12 07:33

<p>I2C接口通讯还是挺实用的,很多同一块板里的各IC通讯基本上都用得上。I2C协议看起来内容有点复杂,但真正掌握了,以后用起来会非常方便。还有硬件I2C的使用与模拟I2C的使用,一开始看起来模拟I2C会更好操作与理解,但真正掌握了硬件I2C后,建立模块程序了,也是很方便的。</p>

cjjh2014 发表于 2021-9-13 07:58

<p>是的。</p>
页: [1]
查看完整版本: 【Silicon Labs 开发套件评测】+ 温湿度传感器硬件了解