- 1、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。。
- 2、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 3、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
- 4、该文档为VIP文档,如果想要下载,成为VIP会员后,下载免费。
- 5、成为VIP后,下载本文档将扣除1次下载权益。下载后,不支持退款、换文档。如有疑问请联系我们。
- 6、成为VIP后,您将拥有八大权益,权益包括:VIP文档下载权益、阅读免打扰、文档格式转换、高级专利检索、专属身份标志、高级客服、多端互通、版权登记。
- 7、VIP文档为合作方或网友上传,每下载1次, 网站将根据用户上传文档的质量评分、类型等,对文档贡献者给予高额补贴、流量扶持。如果你也想贡献VIP文档。上传文档
查看更多
基于FPGA温度传感器DS18B20的Verilog设计
赖青松
(江西师范大学 南昌 电子信息工程)
摘 要: 本文利用数字温度传感器 DS18B20 的数据接口和特点 ,阐述了一种基于现场可编程门阵列( FPGA)控制DS18B20的方法。使用 FPGA 作为控制器 ,严格控制DS18B20 的时序 ,在单总线上实现读写功能 ,完成测量数字温度的功能。将测量的二进制数转换为BCD码 ,并通过数码管显示。系统设计使用 Verilog 语言。
由于 DS18B20 是采用一根 I/ O 总线读写数据,因此DS18B20 对读写数据位有严格的时序要求。DS18B20 遵循相应的通信协议从而保证数据传输的正确性和完整性。该通信协议定义了多种信号时序:初始化时序、 写时序、 读时序
1、初始化时序:
During the initialization sequence the bus master transmits (TX) the reset pulse by pulling the 1-Wire bus low for a minimum of 480us. The bus master then releases the bus and goes into receive mode (RX). When the bus is released, the 5k pullup resistor pulls the 1-Wire bus high.When the DS18B20 detects this rising edge, it waits 15us to 60us and then transmits a presence pulse by pulling the 1-Wire bus low for 60us to 240us.
初始化时序中,控制器发送一个480us-960us的低电平的复位信号,然后释放总线,也就是总线为高电平,此时,控制器准备接收DS18B20的反应信号,当总线释放后,如果存在DS18B20,那么DS18B20将在15-60us内发送一个持续60-240us的反应信号。
2、写时序:(因为本设计总线上只挂了一个DS18B20,所以不用读取64位序列号,直接发送忽略rom命令skin rom)
There are two types of write time slots: “Write 1” time slots and “Write 0” time slots. The bus master uses a Write 1 time slot to write a logic 1 to the DS18B20 and a Write 0 time slot to write a logic 0 to the DS18B20. All write time slots must be a minimum of 60us in duration with a minimum of a 1us recovery time between individual write slots. Both types of write time slots are initiated by the master pulling the 1-Wire bus low
写时序有写1和写2时序,首先将总线拉低电平,拉低后15us之内必须把所要向DS18B20写的数据传到总线上,DS18B20将在15us-60us内采样总线上的数据,如果为高则写1,为低则写0;写完一次后释放总线。每两次写数据之间时隙要大于1us
3、读时序:
All read time slots must be a minimum of 60us in duration with a minimum of a 1us recovery time between slots. A read time slot is initiated by the master device pulling the 1-Wire bus low for a minimum of 1us and then releasing the bus (see Figure 14). After the master initiates the read time slot, the DS18B20 will begin transmitting a 1 or 0 on bus. The DS18B20 transmits a 1 by leaving the bus high and transmits a 0 by pulling the bus low. Output
您可能关注的文档
最近下载
- 2025年成都市金牛区某国企招聘工作人员若干人备考题库含答案详解.docx VIP
- 2025年成都市金牛区某国企招聘工作人员若干人备考题库参考答案详解.docx VIP
- .铝合金门窗的新技术应用.pdf VIP
- 第六部分犬的保健.ppt VIP
- 国际货币基金组织IMF债务可持续分析框架.docx VIP
- 外墙立面改造工程施工方案.docx VIP
- TD_T 1012-2016 土地整治项目规划设计规范.docx VIP
- 小学五年级英语期中测试卷(含听力材料).doc.docx VIP
- 2025年成都市金牛区某国企招聘工作人员若干人备考题库附答案详解.docx VIP
- 机械基础机械基础(初级)试题库.docx VIP
原创力文档


文档评论(0)