【機(jī)械類畢業(yè)論文中英文對(duì)照文獻(xiàn)翻譯】DS18B20單總線數(shù)字溫度計(jì)【word英文1045字4頁(yè)word中文翻譯1432字3頁(yè)】
【機(jī)械類畢業(yè)論文中英文對(duì)照文獻(xiàn)翻譯】DS18B20單總線數(shù)字溫度計(jì)【word英文1045字4頁(yè)word中文翻譯1432字3頁(yè)】,機(jī)械類畢業(yè)論文中英文對(duì)照文獻(xiàn)翻譯,word英文1045字4頁(yè),word中文翻譯1432字3頁(yè),機(jī)械類,畢業(yè)論文,中英文,對(duì)照,對(duì)比,比照,文獻(xiàn),翻譯,ds18b20,總線,數(shù)字,溫度計(jì),word,英文
第2頁(yè)
DS18B20單總線數(shù)字溫度計(jì)
1、DS18B20的特性
(1) 獨(dú)特的單總線接口只占用一個(gè)I/O端口,而無需外圍元件;
(2) 可以由總線提供電源,電壓適用范圍為3.0V~5.5V;
(3) 測(cè)量溫度范圍為-55℃~+125℃,在-10℃~+85℃范圍內(nèi)精度為±0.5℃;
(4) 每個(gè)DS18B20含有一個(gè)唯一的64位ROM編碼;
(5) 用戶可以通過編程實(shí)現(xiàn)9~12位的溫度分辨率;
(6) 分辨率為12時(shí)最大轉(zhuǎn)換時(shí)間為750ms;
(7) 報(bào)警搜索命令可識(shí)別哪片DS18B20溫度超限;
(8) 采用3腳T0-92或8腳SOIC封裝。
2、DS18B20的內(nèi)部結(jié)構(gòu)
DS18B20的內(nèi)部結(jié)構(gòu)如圖1所示。主要包括:寄生電源、溫度傳感器、64位激光ROM和單總線接口、存放中間數(shù)據(jù)的高速暫存器RAM、用于存儲(chǔ)用戶設(shè)定溫度上下限值的TM和TL觸發(fā)器、存儲(chǔ)和控制邏輯、8位循環(huán)冗余校驗(yàn)碼發(fā)生器等。溫度轉(zhuǎn)換為數(shù)的改變時(shí)通過改變寄存器的值來實(shí)現(xiàn)的,用戶可以根據(jù)需要將DS18B20的溫度轉(zhuǎn)化位數(shù)設(shè)置為9,10,11,12位。溫度報(bào)警觸發(fā)器的設(shè)置寄存器都由非易失性電可擦寫存儲(chǔ)器(EEROM)組成,設(shè)置值可以通過相應(yīng)命令寫入,一旦寫入后不會(huì)因?yàn)榈綦姸鴣G失。
圖1 DS18B20 的結(jié)構(gòu)框圖
3、DS18B20的各個(gè)ROM命令
(1)Search ROM [0F0H]
當(dāng)一個(gè)系統(tǒng)初次啟動(dòng)時(shí),總線控制器可能并不知道單線總線上有多少器件或它們的64位ROM編碼。搜索ROM命令允許總線控制器用排除法識(shí)別總線上的所有從機(jī)的64位編碼。
(2)Read ROM [33H]
這個(gè)命令允許總線控制器讀到DS18B20的8位系列編碼、唯一的序列號(hào)和8位CRC碼。只有在總線上存在單只DS18B20的時(shí)候才能使用這個(gè)命令。如果總線上有不止一個(gè)從機(jī),當(dāng)所有從機(jī)試圖同時(shí)傳送信號(hào)時(shí)就會(huì)發(fā)生數(shù)據(jù)沖突。
(3) Match ROM [55H]
這個(gè)是匹配ROM命令,后跟64位ROM序列,讓總線控制器在多點(diǎn)總線上定位一只特定的DS18B20。只有和64位ROM序列完全匹配的DS18B20才能響應(yīng)隨后的存儲(chǔ)器操作。所有和64位ROM序列不匹配的從機(jī)都將等待復(fù)位脈沖。這條命令在總線上有單個(gè)或多個(gè)器件時(shí)都可以使用。
(4)Skip ROM [0CCH]
這條命令允許總線控制器不用提供64位ROM編碼就使用存儲(chǔ)器操作命令,在單點(diǎn)總線情況下,可以節(jié)約時(shí)間。如果總線上不止一個(gè)從機(jī),在Skip ROM命令之后跟著發(fā)一條讀命令,由于多個(gè)從機(jī)同時(shí)發(fā)送信號(hào)??偩€上就會(huì)發(fā)生數(shù)據(jù)沖突。
(5)Alarm Search [0ECH]
這條命令的流程和Search ROM相同。然而,只有在最近一次測(cè)溫后遇到符合報(bào)警條件的情況,DS18B20才會(huì)響應(yīng)這條命令。報(bào)警條件定義為溫度高于TH或溫度低于TL。只要DS18B20不掉電,報(bào)警狀態(tài)將一直保持,直到再一次測(cè)得的溫度值達(dá)不到報(bào)警條件。
(6)Convert T [44H]
這條命令啟動(dòng)一次溫度轉(zhuǎn)換無需其它數(shù)據(jù)。溫度轉(zhuǎn)換命令被執(zhí)行,而后DS18B20保持等待狀態(tài)。如果總線控制器在這條命令之后跟著發(fā)出時(shí)間隙,而DS18B20又忙于做時(shí)間轉(zhuǎn)換的話,DS18B20將在總線上輸出0,若溫度轉(zhuǎn)換完成,則輸出1。如果使用寄生電源,總線控制器必須在發(fā)出這條命令后立即啟動(dòng)強(qiáng)上拉,并保持500ms以上的時(shí)間。
(7)Write Scratchpad [4EH]
這條命令向DS18B20的暫存器TH和TL中寫入數(shù)據(jù)。可以在任何時(shí)候發(fā)出復(fù)位命令來中止寫入。
(8)Read Scratchpad [0BEH]
這個(gè)命令讀暫存器的內(nèi)容。讀取從第1個(gè)字節(jié)開始,一直進(jìn)行下去,直到9(CRC)字節(jié)讀完。如果不想讀完所有字節(jié),控制器可以在任何時(shí)候發(fā)出復(fù)位命令來中止讀取。
(9)Copy Scratchpad [48H]
這個(gè)命令把暫存器的內(nèi)容拷貝到DS18B20的EEPROM存儲(chǔ)器里,即把溫度報(bào)警觸發(fā)字節(jié)存入非易失性存儲(chǔ)器里。如果總線控制器在這條命令之后跟著發(fā)出讀時(shí)間隙,而DS18B20又忙于把存儲(chǔ)器拷貝到EEROM存儲(chǔ)器,DS18B20就會(huì)輸出一個(gè)0,如果拷貝結(jié)束的話,DS18B20則輸出1。如果使用寄生電源,總線控制器必須在這條命令發(fā)出后立即啟動(dòng)強(qiáng)上拉并最少保持10ms。
(10)Recall E2 [0B8H]
這條命令把報(bào)警觸發(fā)器里的值拷貝回暫存器。這種拷貝操作在DS18B20上電時(shí)自動(dòng)執(zhí)行,這樣器件一上電暫存器里馬上就存在有效數(shù)據(jù)了。若在這條命令之后發(fā)出數(shù)據(jù)隙,器件會(huì)輸出溫度轉(zhuǎn)換忙的標(biāo)識(shí):0為忙 ,1為完成。
第 3 頁(yè)
DS18B20 Programmable Resolution 1-Wire
Digital Thermometer
1、DS18B20 FEATURES
(1)Unique 1-Wire interface requires only one Port pin for communication, requires no external components
(2)Each device has a unique 64-bit serial code stored in an onboard ROM
(3)Can be powered form data line .Power supply range is 3.0Vto 5.5V
(4)Measures temperatures form -55℃ to +125℃ , ±0.5℃ accuracy from -10℃ to +85℃
(5)Thermometer resolution is user-selected from 9 to 12 bits
(6)Converts temperature to 12-bit digital word in 750ms (max)
(7)Alarm search command identifies and addresses devices whose temperature is outside of programmed limits (temperature alarm condition)
(8) Available in 8-pin SOIC, and 3-bin TO -92 packages
2、DS18B20 BLOCK DIAFRAM
Figure 1 shows a block diagram of the DS18B20, The 64-bite ROM stores the device’s serial code. The scratchpad memory contains the 2-byte temperature egister that stores the digital output from the temperature sensor. In addition, the scratchpad provides access to the 1-byte upper and lower alarm trigger register (TH and TL), and the 1-byte configuration register. The configuration register allows the user to set the resolution of the temperature-to-digital conversion to 9, 10, 11 or 12 bits. The TH,TL and configuration registers are nonvolatile(EEPROM), so they will retain data when the device is powered down.
Figure 1 block diagram of the DS18B20
3、DS18B20 ROM COMMANDS
(1) SEARCH ROM [0F0H]
When a system is initially powered up, the master must identify the ROM codes of all slave devices on the bus, which allows the master to determine the number of slaves and their device types. The master learns the ROM codes through a process of elimination that requires the master to perform a Search ROM cycle as many times as necessary to identify all of the slave’s 64-bit ROM devices.
(2) READ ROM [55H]
This command can only be used when there is one slave on the bus. It allows the bus master to read the slave`64-bit ROM code without using the Search ROM procedure. If this command is used when there is more than one slave present on the bus, a data collision will occur when all the slaves attempt to respond at the same time.
(3)MATCH ROM [55H]
The match ROM command followed by a 64-bit ROM code sequence allows the bus master to address a specific DS18B20 on a multi drop or single-drop bus. Only the DS18B20 that exactly matches the 64-bit ROM code sequence will respond to the function command issued by the master; all other slaves on the bus will wait for a reset pulse.
(4)SKIP ROM [0CCH]
The master can use this command to address all devices on the bus simultaneously without sending out any ROM code information. Note that the Read Scratchpad command can follow the Skip ROM command only if there is a single slave device on the bus. In this case time is saved by allowing the master to read from the slave without sending the device’s 64-bit ROM code. A Skip ROM command followed by a Read Scratchpad command will cause a data collision on the bus if there is more than one slave since multiple devices will attempt to transmit data simultaneously.
(5)ALARM SEARCH [0ECH]
The operation of this command is identical to the operation of the Search ROM command except that only slaves with a set alarm flag will respond .This command allows the master device to determine if any DS18B20s experienced an alarm condition during the most recent temperature conversion .Refer to the OPERATION-ALARM SIGNAING section for an explanation of alarm flag operation.
(6)CONVERTT [44H]
This command initiates a single temperature conversion. Following the conversion, the resulting thermal data is stored in the 2-bute temperature register in the scratchpad memory and the DS18B20 returns to its low-power idle state. If the device is being used in parasite power mode, within 10us after this command is issued the master must enable a strong pullup on the 1-Wire bus for the duration of the conversion as described in the POWERING THE DS18320 section. If the DS18B20 is powered by an external supply, the master can issue read time slots after the Convert T command and the DS18B20 will respond by transmitting a 0 while the temperature conversion is in Progress and a 1 when the conversion is done. In parasite power mode this notification technique cannot be used since the bus1 is pulled high by the strong pullup during the conversion.
(7)WRITE SCRACHPAD [4EH]
This command allows the master to write 3 bytes of the data to the DS18B20’s scratchpad. The first data byte is writer into the TH register , the second byte is written into the TL register, and the third byte is written into the configuration register. Data must be transmitted least significant bit first. All three bytes must be written before the master issues a reset ,or the data may be corrupted.
(8)READ SCRACHPAD [0BEH]
This command allows the master to read the contents of the scratchpad .The data transfer starts with the least significant bit of byte 0 and continues through the scratchpad until 9 byte(byte 8-CRC) is read.The master may issue a reset to terminate reading at any time if only partof the scratchpad data is needed.
(9) COPY SCRATCHPAD [48H]
This command copies the contents of the scratchpad TH,TL and configuration registers to EEPROM. If the device is being used in parasite power mode ,within 10us(max) after this command is issued the master must enable a strong pullup on the 1-Wire bus for at least 10ms as described in the POWERING THE DS18B20 section.
(10)RECALL E2 [B8H]
This command recalls the alarm trigger values(TH and TL) and configuration data from EEPROM,respectively,in the scratchpad memory .The master device can issue read time slots following the Recall E2 command and the DS18B20 will indicate the status of the recall by transmitting 0 while the recall is in progress and 1 when the recall is done.The recall operation happens automatically at power-up, so valid data is available in the scratchpad as soon as power is applied to the device.
收藏