1、附 录:外文资料与中文翻译外文资料:DS1820FEATURES Unique 1WireTM interface requires only one port pin for communication Multidrop capability simplifies distributed temperature sensing applications Requires no external components Can be powered from data line Zero standby power required Measures temperatures from 55C
2、 to +125C in 0.5C increments. Fahrenheit equivalent is 67F to +257F in 0.9F increments Temperature is read as a 9bit digital value. Converts temperature to digital word in 200 ms (typ.) Userdefinable, nonvolatile temperature alarm settings Alarm search command identifies and addresses devices whose
3、temperature is outside of programmed limits (temperature alarm condition) Applications include thermostatic controls, industrial systems, consumer products, thermometers, or any thermally sensitive systemDESCRIPTIONThe DS1820 Digital Thermometer provides 9bit temperature readings which indicate the
4、temperature of the device. Information is sent to/from the DS1820 over a 1Wire interface, so that only one wire (and ground) needs to be connected from a central microprocessor to a DS1820. Power for reading, writing, and performing temperature conversions can be derived from the data line itself wi
5、th no need for an external power source. Because each DS1820 contains a unique silicon serial number, multiple DS1820s can exist on the same 1Wire bus. This allows for placing temperature sensors in many different places. Applications where this feature is useful include HVAC environmental controls,
6、 sensing temperatures inside buildings, equipment or machinery, and in process monitoring and control.DETAILED PIN DESCRIPTIONOVERVIEWThe block diagram of Figure 1 shows the major components of the DS1820. The DS1820 has three main data components: 1) 64bit lasered ROM, 2) temperature and sensor, 3)
7、 nonvolatile temperature alarm triggers TH and TL. The device derives its power from the 1Wire communication line by storing energy on an internal capacitor during periods of time when the signal line is high and continues to operate off this power source during the low times of the 1Wire line until
8、 it returns high to replenish the parasite (capacitor) supply. As an alternative, the DS1820 may also be powered from an external 5 volts supply.Communication to the DS1820 is via a 1Wire port. With the 1Wire port, the memory and control functions will not be available before the ROM function protoc
9、ol has been established. The master must first provide one of five ROM function commands: 1) Read ROM, 2) Match ROM, 3) Search ROM, 4) Skip ROM, or 5) Alarm Search. These commands operate on the 64bit lasered ROM portion of each device and can single out a specific device if many are present on the
10、1Wire line as well as indicate to the Bus Master how many and what types of devices are present. After a ROM function sequence has been successfully executed, the memory and control functions are accessible and the master may then provide any one of the six memory and control function commands. One
11、control function command instructs the DS1820 to perform a temperature measurement. The result of this measurement will be placed in the DS1820s scratchpad memory, and may be read by issuing a memory function command which reads the contents of the scratchpad memory. The temperature alarm triggers T
12、H and TL consist of one byte EEPROM each. If the alarm search command is not applied to the DS1820, these registers may be used as general purpose user memory. Writing TH and TL is done using a memory function command. Read access to these registers is through the scratchpad. All data is read and wr
13、itten least significant bit first.The block diagram (Figure 1) shows the parasite powered circuitry. This circuitry “steals” power whenever the I/O or VDD pins are high. I/O will provide sufficient power as long as the specified timing and voltage requirements are met (see the section titled “1Wire
14、Bus System”). The advantages of parasite power are twofold:1) by parasiting off this pin, no local power source is needed for remote sensing of temperature, 2) the ROM may be read in absence of normal power. In order for the DS1820 to be able to perform accurate temperature conversions, sufficient p
15、ower must be provided over the I/O line when a temperature conversion is taking place. Since the operating current of the DS1820 is up to 1 mA, the I/O line will not have sufficient drive due to the 5K pullup resistor. This problem is particularly acute if several DS1820s are on the same I/O and att
16、empting to convert simultaneously.There are two ways to assure that the DS1820 has sufficient supply current during its active conversion cycle. The first is to provide a strong pullup on the I/O line whenever temperature conversions or copies to the E2 memory are taking place. This may be accomplis
17、hed by using a MOSFET to pull the I/O line directly to the power supply as shown in Figure 2. The I/O line must be switched over to the strong pullup within 10 ms maximum after issuing any protocol that involves copying to the E2 memory or initiates temperature conversions. When using the parasite p
18、ower mode, the VDD pin must be tied to ground. Another method of supplying current to the DS1820 is through the use of an external power supply tied to the VDD pin, as shown in Figure 3. The advantage to this is that the strong pullup is not required on the I/O line, and the bus master need not be t
19、ied up holding that line high during temperature conversions. This allows other data traffic on the 1Wire bus during the conversion time. In addition, any number of DS1820s may be placed on the 1Wire bus, and if they all use external power, they may all simultaneously perform temperature conversions
20、 by issuing the Skip ROM command and then issuing the Convert T command. Note that as long as the external power supply is active, the GND pin may not be floating. The use of parasite power is not recommended above 100C, since it may not be able to sustain communications given the higher leakage cur
21、rents the DS1820 exhibits at these temperatures. For applications in which such temperatures are likely, it is strongly recommended that VDD be applied to the DS1820. For situations where the bus master does not know whether the DS1820s on the bus are parasite powered or supplied with external VDD,
22、a provision is made in the DS1820 to signal the power supply scheme used. The bus master can determine if any DS1820s are on the bus which require the strong pullup by sending a Skip.ROM protocol, then issuing the read power supply command. After this command is issued, the master then issues read t
23、ime slots.The DS1820 will send back “0” on the 1Wire bus if it is parasite powered; it will send back a “1” if it is powered from the VDD pin. If the master receives a “0”, it knows that it must supply the strong pullup on the I/O line during temperature conversions. See “Memory Command Functions” s
24、ection for more detail on this command protocol.OPERATION MEASURING TEMPERATUREThe DS1820 measures temperature through the use of an onboard proprietary temperature measurement technique. A block diagram of the temperature measurement circuitry is shown in Figure 4. The DS1820 measures temperature b
25、y counting the number of clock cycles that an oscillator with a low temperature coefficient goes through during a gate period determined by a high temperature coefficient oscillator. The counter is preset with a base count that corresponds to 55C. If the counter reaches zero before the gate period i
26、s over, the temperature register, which is also preset to the 55C value, is incremented, indicating that the temperature is higher than 55C. At the same time, the counter is then preset with a value determined by the slope accumulator circuitry. This circuitry is needed to compensate for the parabol
27、ic behavior of the oscillators over temperature. The counter is then clocked again until it reaches zero.If the gate period is still not finished, then this process repeats. The slope accumulator is used to compensate for the nonlinear behavior of the oscillators over temperature, yielding a high re
28、solution temperature measurement. This is done by changing the number of counts necessary for the counter to go through for each incremental degree in temperature. To obtain the desired resolution, therefore, both the value of the counter and the number of counts per degree C (the value of the slope
29、 accumulator) at a given temperature must be known.Internally, this calculation is done inside the DS1820 to provide 0.5C resolution. The temperature reading is provided in a 16bit, signextended twos complement reading. Table 1 describes the exact relationship of output data to measured temperature.
30、 The data is transmitted serially over the 1Wire interface. The DS1820 can measure temperature over the range of 55C to +125C in 0.5C increments. For Fahrenheit usage, a lookup table or conversion factor must be used.Note that temperature is represented in the DS1820 in terms of a 1/2C LSB, yielding
31、 the following 9bit format:The most significant (sign) bit is duplicated into all of the bits in the upper MSB of the twobyte temperature register in memory. This “signextension” yields the 16bit temperature readings as shown in Table 1. Higher resolutions may be obtained by the following procedure.
32、 First, read the temperature, and truncate the 0.5C bit (the LSB) from the read value. This value is TEMP_READ. The value left in the counter may then be read. This value is the count remaining (COUNT_REMAIN) after the gate period has ceased. The last value needed is the number of counts per degree
33、C (COUNT_PER_C) at that temperature. The actual temperature may be then be calculated by the user using the following:1WIRE BUS SYSTEMThe 1Wire bus is a system which has a single bus master and one or more slaves. The DS1820 behaves as a slave. The discussion of this bus system is broken down into t
34、hree topics: hardware configuration, transaction sequence, and 1Wire signaling (signal types and timing).HARDWARE CONFIGURATION The 1Wire bus has only a single line by definition; it is important that each device on the bus be able to drive it at the appropriate time. To facilitate this, each device
35、 attached to the 1Wire bus must have open drain or 3state outputs.The 1Wire port of the DS1820 (I/Opin) is open drain with an internal circuit equivalent to that shown in Figure 9. A multidrop bus consists of a 1Wire bus with multiple slaves attached. The 1Wire bus requires a pullup resistor of appr
36、oximately 5KW.The idle state for the 1Wire bus is high. If for any reason a transaction needs to be suspended, the bus MUST be left in the idle state if the transaction is to resume. Infinite recovery time can occur between bits so long as the 1Wire bus is in the inactive (high) state during the rec
37、overy period. If this does not occur and the bus is left low for more than 480 ms, all components on the bus will be reset. TRANSACTION SEQUENCEThe protocol for accessing the DS1820 via the 1Wire port is as follows: Initialization ROM Function Command Memory Function Command Transaction/DataINITIALI
38、ZATIONAll transactions on the 1Wire bus begin with an initialization sequence. The initialization sequence consists of a reset pulse transmitted by the bus master followed by presence pulse(s) transmitted by the slave(s).The presence pulse lets the bus master know that the DS1820 is on the bus and i
39、s ready to operate. For more details, see the “1Wire Signaling” section.ROM FUNCTION COMMANDSOnce the bus master has detected a presence, it can issue one of the five ROM function commands. All ROM function commands are 8bits long. A list of these commands follows (refer to flowchart in Figure 6):Re
40、ad ROM 33hThis command allows the bus master to read the DS1820s 8bit family code, unique 48bit serial number,and 8bit CRC. This command can only be used if there is a single DS1820 on the bus. If more than one slave is present on the bus, a data collision will occur when all slaves try to transmit
41、at the same time (open drain will produce a wired AND result).Match ROM 55hThe match ROM command, followed by a 64bit ROM sequence, allows the bus master to address a specific DS1820 on a multidrop bus. Only the DS1820 that exactly matches the 64bit ROM sequence will respond to the following memory
42、function command. All slavesthat do not match the 64bit ROM sequence will wait for a reset pulse. This command can be used with a single or multiple devices on the bus.Skip ROM CChThis command can save time in a single drop bus system by allowing the bus master to access the memory functions without
43、 providing the 64bit ROM code. If more than one slave is present on the bus and a read command is issued following the Skip ROM command, data collision will occur on the bus as multiple slaves transmit simultaneously (open drain pulldowns will produce a wired AND result).Search ROM F0hWhen a system
44、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 command allows the bus master to use a process of elimination to identify the 64bit ROM codes of all slave devices on the bus.中文翻译:DS1820特性:独特旳单线接口,只需1 个接口引脚即可通信;多点(
45、multidrop)能力使分布式温度检测应用得以简化;不需要外部元件;可用数据线供电;不需备份电源;测量范围从-55至+125,增量值为0.5。等效旳华氏温度范围是-67 F 至257 F,增量值为0.9 F;以9位数字值方式读出温度;在1秒(经典值)内把温度变换为数字;顾客可定义旳,非易失性旳温度告警设置;告警搜索命令识别和寻址温度在编定旳极限之外旳器件(温度告警状况);应用范围包括恒温控制,工业系统,消费类产品,温度计或任何热敏系统。详细阐明DS1820有三个重要旳数据部件:1)64位激光lasered ROM;2)温度敏捷元件,和3)非易失性温度告警触发器TH和TL。器件从单线旳通信线获
46、得其电源,在信号线为高电平旳时间周期内,把能量贮存在内部旳电容器中,在单信号线为低电平旳时间期内断开此电源,直到信号线变为高电平重新接上寄生(电容)电源为止。作为另一种可供选择旳措施,DS1820也可以用外部5V电源供电。与DS1820 旳通信通过一种单线接口。在单线接口状况下,在ROM 操作未定建立之前不能使用存贮器和控制操作。主机必须首先提供五种ROM操作命令之一;1)Read ROM(读ROM); 2)Match ROM(符合ROM);3)Search ROM(搜索ROM);4)Skip ROM(跳过ROM);5)Alarm Search(告警搜索);这些命令对每一器件旳64位激光ROM
47、 部分进行操作,假如在单线上有许多器件,那么可以挑选出一种特定旳器件,并给总线上旳主机指示存在多少器件和其类型。在成功地执行了ROM 操作序列之后,可使用存贮器和控制操作,然后主机可以提供六种存贮器和控制操作命令之一。一种控制操作命令指示DS1820 完毕温度测量。该测量旳成果将放入DS1820 旳高速暂存(便笺式)存贮器(Scratchpad memory),通过发出读暂存存储器内容旳存储器操作命令可以读出此成果。每一温度告警触发器TH和TL构成一种字节旳EEPROM。假如不对DS1820 施加告警搜索命令,这些寄存器可用作通用顾客存储器使用存储器,操作命令可以写TH 和TL 对这些寄存器旳
48、读访问。所有数据均以最低有效位在前旳方式被读写。寄生电源方框图(图1)示出寄生电源电路。当I/O或VDD 引脚为高电平时,这个电路便“取”得电源。只要符合指定旳定期和电压规定,I/O将提供足够旳功率(标题为“单总线系统”一节)。寄生电源旳长处是双重旳:1)运用此引脚,远程温度检测无需当地电源;2)缺乏正常电源条件下也可以读ROM;为了使DS1820能完毕精确旳温度变换,当温度变换发生时,I/O 线上必须提供足够旳功率。由于DS1820 旳工作电流高达1mA ,5K 旳上拉电阻将使I/O 线没有足够旳驱动能力。假如几种SD1820 在同一条I/O 线上并且同步变换,那么这一问题将变得尤其锋利。有两种措施保证DS1820 在其有效变换期内得到足够旳电源电流。第一种措施是发生温度变换时,在I/O 线上提供一强旳上拉。如图2所示,通过使用一种MOSFET 把I/O 线直接拉到电源可到达这一点。当使用寄生电源方式时VDD 引脚必须连接到地。向DS1820 供电旳此外一种措施是通过使用连接到VDD 引脚旳外部电源,如图3 所示这种措施旳长处是在I/O 线上不规定强旳上拉。总线上主机不需向上连接便在温度变换期间使线保持高电平。这就容许在变换时间内其他数据在单线上传送。此外,在单线总线上可以放置任何数目旳DS1820 ,并且假如它们都使用外部电源,那么通过发出跳过(Skip)