外文翻译---数字温度传感器ds18b20的原理与应用(编辑修改稿)内容摘要:

sue one of the five ROM function mands. All ROM function mands are 8 bits long. A list of these mands follows (refer to flowchart in Figure 5): Read ROM [33h] This mand allows the bus master to read the DS18B20’s 8bit family code, unique 48bit serial number, and 8bit CRC. This mand can only be used if there is a single DS18B20 on the bus. If more than one slave is present on the bus, a data collision will occur when all slaves try to transmit at the same time (open drain will produce a wired AND result). Match ROM [55h] The match ROM mand, followed by a 64bit ROM sequence, allows the bus master to address a specific DS18B20 on a multidrop bus. Only the DS18B20 that exactly matches the 64bit ROM sequence will respond to the following memory function mand. All slaves that do not match the 64bit ROM sequence will wait for a reset pulse. This mand can be used with a single or multiple devices on the bus. Skip ROM [CCh] This mand can save time in a single drop bus system by allowing the bus master to access the memory functions without providing the 64bit ROM code. If more than one slave is present on the bus and a Read mand is issued following the Skip ROM mand, data collision will occur on the bus as multiple slaves transmit simultaneously (open drain pulldowns will produce a wired AND result). Search ROM [F0h] When a system is initially brought up, the bus master might not know the number of devices on the 1Wire bus or their 64bit ROM codes. The search ROM mand allows the bus master to use a process of elimination to identify the 64bit ROM codes of all slave devices on the bus. Alarm Search [ECh] The flowchart of this mand is identical to the Search 无 锡 职 业 技 术 学 院 毕业设计说明书(英文翻译) 9 ROM mand. However, the DS18B20 will respond to this mand only if a n alarm condition has been encountered at the last temperature measurement. An alarm condition is defined as a temperature higher than TH or lower than TL. The alarm condition remains set as long as the DS18B20 is powered up, or until another temperature measurement reveals a nonalarming value. For alarming, the trigger values stored in EEPROM are taken into account. If an alarm condition exists and the TH or TL settings are changed, another temperature conversion should be done to validate any alarm conditions. DS18B 20 12 of 26 Example of a ROM Search The ROM search process is the repetition of a simple threestep routine: read a bit, read the plement of the bit, then write the desired value of that bit. The bus master performs this simple, threestep routine on each bit of the ROM. After one plete pass, the bus master knows the contents of the ROM in one device. The remaining number of devices and their ROM codes may be identified by additional passes. The following example of the ROM search process assumes four different devices are connected to the same 1Wire bus. The ROM data of the four devices is as shown: ROM1 00110101... ROM2 10101010... ROM3 11110101... ROM4 00010001... The search process is as follows: 1. The bus master begins the initialization sequence by issuing a reset pulse. The slave devices respond by issuing simultaneous presence pulses. 2. The bus master will then issue the Search ROM mand on the 1Wire bus. 3. The bus master reads a bit from the 1Wire bus. Each device will respond by placing the value of the first bit of their respective ROM data onto the 1Wire bus. ROM1 and ROM4 will place a 0 onto the 1Wire bus, ., pull it low. ROM2 and ROM3 will place a 1 onto the 1Wire bus by allowing the line to stay high. The result is the logical AND of all devices on the line, therefore the bus master sees a 0. The bus master reads another bit. Since the Search ROM data mand is being executed, all of the devices on the 1Wire bus respond to this second read by placing the plement of the first bit of their respective ROM data onto the 1Wire bus. ROM1 and ROM4 will place a 1 onto the 1Wire, allowing the line to stay high. ROM2 and ROM3 will place a 0 onto the 1Wire, thus it will be pulled low. The bus master again observes a 0 for the plement of the first ROM data bit. The bus master has determined that there are some devices on the 1Wire bus that have a 0 in the first position and others that have a 1. The data obtained from the two reads of the threestep routine have the following interpretations: 00 There are still devices attached which have conflicting bits in this position. 01 All devices still coupled have a 0bit in this bit position. 10 All devices still coupled have a 1bit in this bit position. 无 锡 职 业 技 术 学 院 毕业设计说明书(英文翻译) 10 11 There are no devices attached to the 1Wire bus. 4. The bus master writes a 0. This deselects ROM2 and ROM3 for the remainder of this search pass, leaving only ROM1 and ROM4 connected to the 1Wire bus. 5. The bus master performs two more reads and receives a 0bit followed by a 1bit. This indicates that all devices still coupled to the bus have 0s as their second ROM data bit. 6. The bus master then writes a 0 to keep both ROM1 and ROM4 coupled. 7. The bus master executes two reads and receives two 0bits. This indicates that both 1bits and 0bits exist as the third bit of the ROM data of the attached devices. DS18B20 13 of 26 8. The bus master writes a 0bit. This deselects ROM1, leaving ROM4 as the only device still connected. 9. The bus master reads the remainder of the ROM bits for ROM4 and continues to access the part if desired. This pletes the first pass and uniquely identifies one part on the 1Wire bus. 10. The bus master starts a new ROM search sequence by repeating steps 1 through 7. 11. The bus master writes a 1bit. This decouples ROM4, leaving only ROM1 still coupled. 12. The bus master r。
阅读剩余 0%
本站所有文章资讯、展示的图片素材等内容均为注册用户上传(部分报媒/平媒内容转载自网络合作媒体),仅供学习参考。 用户通过本站上传、发布的任何内容的知识产权归属用户或原始著作权人所有。如有侵犯您的版权,请联系我们反馈本站将在三个工作日内改正。