DS18B20 数字温度计中英文对照外文翻译文献
外文翻译
英文参考资料The DS18B20 Digital Thermometer provides 9 to 12–bit centigrade temperature measurements and has an alarm function with nonvolatile user-programmable upper and lower trigger points. The DS18B20 communicates over a 1-Wire bus that by definition requires only one data line (and ground) for communication with a central microprocessor. It has an operating temperature range of –55°C to +125°C and is accurate to 0.5 C over the range of –10°C to +85°C. In addition, the DS18B20 can derive power directly f rom the data line (“parasite power”), eliminating the need for an external power supply.Each DS18B20 has a unique 64-bit serial code, which allows multiple DS18B20s to function on the same 1–wire bus; thus, it is simple to use one microprocessor to control many DS18B20s distributed over a large area. Applications that can benefit from this feature include HV AC environmental controls, temperature monitoring systems inside buildings, equipment or machinery, and process monitoring and control systems.OVERVIEWThe 64-bit ROM stores the device’s unique serial code. The scratchpad memory contains the 2-byte temperature register that stores the digital output from the temperature sensor. In addition, the scratchpad provides access to the 1-byte upper and lower alarm trigger registers (T and T ), and the 1-byte configuration H L 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 T, T and configuration registers are nonvolatile (EEPROM), so H L they will retain data when the device is powered down. The DS18B20 uses Dallas’ exclusive 1-Wire bus protocol that implements bus communication using one control signal. The control line requires a weak pull up resistor since all devices are linked to the bus via a 3-state or open-drain port (the DQ pin in the case of the DS18B20). In this bus system, the microprocessor (the master device) identifies and addresses devices on the bus using each device’s unique 64-bit code. Because each device has a unique code, the number of devices that can be addressed on one bus is virtually unlimitedAnother feature of the DS18B20 is the ability to operate without an external power supply. Power is instead supplied through the 1-Wire pull up resistor via the DQ pin when the bus is high. The high bus signal also charges an internal capacitor (C ), which then supplies power to the device when the bus is PP low. This method of deriving power from the 1-Wire bus is referred to as “parasite power.” As an alternative, the DS18B20 may also be powered by an external supply on VDD OPERATION — MEASURING TEMPERATUREThe core functionality of the DS18B20 is its direct-to-digital temperature sensor. The resolution of the temperature sensor is user-configurable to 9, 10, 11, or 12 bits, corresponding to increments of 0.5 C, 0.25 C, 0.125 C, and 0.0625 C, respectively. The default resolution at power-up is 12-bit. The DS18B20 powers-up in a low-power idle state; to initiate a temperature measurement and A-to-D conversion, the master must issue a Convert T [44h] command. Following the conversion, the resulting thermal data is stored in the 2-byte temperature register in the scratchpad memory and the DS18B20 returns to its idle state. If the DS18B20 is powered by an external supply, the master can issue “read time slots” (see the 1-WIRE BUS SYSTEM section) after the Convert T command and the DS18B20 will respond by transmitting 0 while the temperature conversion is in progress and 1 when the conversion is done. If the DS18B20 is powered with parasite power, this notification technique cannot be used since the bus must be pulled high by a strong pull up during the entire temperature conversion. The DS18B20 output temperature data is calibrated in degrees centigrade; for Fahrenheit applications, a lookup table or conversion routine must be used. The temperature data is stored as a 16-bit sign-extended two’s complement number in the temperature register (see Figure 2). The sign bits (S) indicate if the temperature is positive or negative: for positive numbers S = 0 and for negative numbers S = 1. If the DS18B20 is configured for 12-bit resolution, all bits in the temperature register will contain valid data. For 11-bit resolution, bit 0 is undefined. For 10-bit resolution, bits 1 and 0 are undefined, and for 9-bit resolution bits 2, 1 and 0 are undefined. POWERING THE DS18B20The DS18B20 can be powered by an external supply on the VDD pin, or it can operate in “parasite power” mode, which allows the DS18B20 to function witho ut alocal external supply. Parasite power is very useful for applications that require remote temperature sensing or that are very space constrained. DS18B20’s parasite-power control circuitry, which “steals” power from the 1-Wire bus via the DQ pin when the bus is high. The stolen charge powers the DS18B20 while the bus is high, and some of the charge is stored on the parasite power capacitor (C ) to provide power when the bus is low. When the DS18B20 is used in parasite power mode, the VDD pin must be connected to ground. In parasite power mode, the 1-Wire bus and CPP can provide sufficient current to the DS18B20 for most operations as long as the specified timing and voltage requirements are met. However, when the DS18B20 is performing temperature conversions or copying data from the scratchpad memory to EEPROM, the operating current can be as high as 1.5mA. This current can cause an unacceptable voltage drop across the weak 1-Wire pull up resistor and is more current than can be supplied by CPP. To assure that the DS18B20 has sufficient supply current, it is necessary to provide a strong pull up on the 1-Wire bus whenever temperature conversions are taking place or data is being copied from the scratchpad to EEPROM.DS18B20数字温度传感器提供9-12位的分辨率而且还有一种报警功能,它内部有非易失的用户可编程的单元用来设置温度的上限和下限。
温度传感器DS18B20_外文翻译
DS18B20Programmable Resolution1-WireDigital Thermometer1、DS18B20FEATURES(1)Unique1-Wire interface requires only one Port pin for communication,requires no external components(2)Each device has a unique64-bit serial code stored in an onboard ROM(3)Can be powered form data line.Power supply range is3.0Vto5.5V(4)Measures temperatures form-55℃to+125℃,±0.5℃accuracy from-10℃to +85℃(5)Thermometer resolution is user-selected from9to12bits(6)Converts temperature to12-bit digital word in750ms(max)(7)Alarm search command identifies and addresses devices whose temperature is outside of programmed limits(temperature alarm condition)(8)Available in8-pin SOIC,and3-bin TO-92packages2、DS18B20BLOCK DIAFRAMFigure1shows a block diagram of the DS18B20,The64-bite ROM stores the device’s serial code.The scratchpad memory contains the2-byte temperature egister that stores the digital output from the temperature sensor.In addition,the scratchpad provides access to the1-byte upper and lower alarm trigger register(TH and TL),and the1-byte configuratuion register.The configuration register allows the user to set the resolution of the temperature-to-digital conversion to9,10,11or12bits.The TH,TL and configuration registers are nonvolatile(EEPROM),so they will retain data when the device is powered down.Figure1block diagram of the DS18B203、DS18B20ROM 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’s64-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 a64-bit ROM code sequence allows the bus master to address a specific DS18B20on a multidrop or single-drop bus.Only the DS18B20that exactly matches the64-bitROM code sequence will respond to thefunction 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’s64-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 the2-bute temperature register in the scratchpad memory and the DS18B20returns to its low-power idle state.If the device is being used in parasite power mode,within10us after this command is issued the master must enable a strong pullup on the1-Wire bus for the duration of the conversion as described in the POWERING THE DS18320section.If the DS18B20 is powered by an external supply,the master can issue read time slots after the Convert T command and the DS18B20will respond by transmitting a0while the temperature conversion is in Progress and a1when the conversion is done.In parasite power mode this notification technique cannot be used since the bus1is pulled high by the strong pullup during the conversion.(7)WRITE SCRACHPAD[4EH]This command allows the master to write3bytes 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 byte0and continues through the scratchpad until9byte(byte8-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 least10ms as described in the POWERING THE DS18B20section.(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 E2command and the DS18B20will indicate the status of the recall by transmitting0while the recall is in progress and1 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.DS18B20单总线数字温度计1、DS18B20的特性(1)独特的单总线接口只占用一个I/O端口,而无需外围元件;(2)可以由总线提供电源,电压适用范围为3.0V~5.5V;(3)测量温度范围为-55℃~+125℃,在-10℃~+85℃范围内精度为±0.5℃;(4)每个DS18B20含有一个唯一的64位ROM编码;(5)用户可以通过编程实现9~12位的温度分辨率;(6)分辨率为12时最大转换时间为750ms;(7)报警搜索命令可识别哪片DS18B20温度超限;(8)采用3脚T0-92或8脚SOIC封装。
DS18B20中英文资料外文翻译文献
外文翻译(原文)外文翻译(原文)1中英文资料中英文资料The introduction to The DS18B20 1. DESCRIPTIONThe DS18B20 digital thermometer provides 9-bit to 12-bit Celsius temperature measurements and has an alarm function with nonvolatile user programmable upperand lower trigger points. The DS18B20 communicates over a 1-Wire bus that bydefinition requires only one data line for communication with a centralmicroprocessor. It has an operating temperature range of -55°-55°C C to +125°+125°C C and is accurate to ±0.5°0.5°C over the range of C over the range of -10°-10°C to +85°C to +85°C to +85°C. In addition, the DS18B20 C. In addition, the DS18B20can derive power directly from the data line (―parasite powerǁ), eliminating the needfor an external power supply.Each DS18B20 has a unique 64-bit serial code, which allows multiple DS18B20s to function on the same 1-Wire bus. Thus, it is simple to use onemicroprocessor to control many DS18B20s distributed over a large area. Applicationsthat can benefit from this feature include HV that can benefit from this feature include HVAC environmental controls, temperature AC environmental controls, temperaturemonitoring systems inside buildings, equipment, or machinery, and processmonitoring and control systems.2.FEA TURESl Unique 1-Wire® Interface Requires Only One Port Pin for Communicationl Each Device has a Unique 64-Bit Serial Code Stored in an On-Board ROMl Multi-drop Capability Simplifies Distributed Temperature-Sensing Applicationsl Requires No External Components外文翻译(原文)外文翻译(原文)2 l Can Be Powered from Data Line; Power Supply Range is 3.0V to 5.5Vl Measures Temperatures from -55°C to +125°C to +125°C (-67°C (-67°C (-67°F to +257°F to +257°F to +257°F) F) l ±0.5°0.5°C Accuracy from -10°C Accuracy from -10°C Accuracy from -10°C to +85°C to +85°C to +85°C C l Thermometer Resolution is User Selectable from 9 to 12 Bitsl Converts Temperature to 12-Bit Digital Word in 750ms (Max)l User-Definable Nonvolatile (NV) Alarm Settingsl Alarm Search Command Identifies and Addresses Devices Whose Temperature isOutside Programmed Limitsl Software Compatible with the DS1822l Applications Include Thermostatic Controls, Industrial Systems, ConsumerProducts, Thermometers, or Any Thermally Sensitive System3.OVERVIEWFigure 1 shows a block diagram of the DS18B20, and pin descriptions are givenin the Pin Description table. The 64-in the Pin Description table. The 64-bit ROM stores the device’s unique serial code. bit ROM stores the device’s unique serial code.The scratchpad memory contains the 2-byte temperature register that stores the digitaloutput from the temperature sensor. In addition, the scratchpad provides access to the1-byte upper and lower alarm trigger registers (TH and TL) and the 1-byteconfiguration register. The configuration register allows the user to set the resolutionof the temperature to-digital conversion to 9, 10, 11, or 12 bits. The TH, TL, andconfiguration registers are nonvolatile (EEPROM), so they will retain data when thedevice is powered down.The DS18B20 uses Maxim’s exclusive 1-Wire bus protocol that implements buscommunication using one control signal. The control line requires a weak pull upresistor since all devices are linked to the bus via a 3-state or open-drain port (the DQpin in the case of the DS18B20). In this bus system, the microprocessor (the masterdevice) identifies and addresses devices on the bus using each device’s unique 64-bitcode. Because each device has a unique code, the number of devices that can beaddressed on one DS18B20 bus is virtually unlimited. The 1-Wire bus protocol,外文翻译(原文)外文翻译(原文)3 including detailed explanations of the commands and “time slots,ǁ is covered in the1-Wire Bus System section.Another feature of the DS18B20 is the ability to operate without an external power supply. Power is instead supplied through the 1-Wire pull up resistor via theDQ pin when the bus is high. The high bus signal also charges an internal capacitor(CPP), which then supplies power to the device when the bus is low. This method ofderiving power from the 1-1-Wire Wire bus is referred to as ―parasite p ower.ǁ power.ǁ As an alternative, the DS18B20 may also be powered by an external supply on VDD.64-BIT ROM AND 1-WIRE PORTMEMORY CONTROL LOGICSCRATCHPAD TEMPERATURE SENSOR ALARM HIGH TRIGGER (TH) ALARM LOW TRIGGER (TL)CONFIGURATION REGISTER 8-BIT CRC GENERATORPOWER-SUPPLYSENSE INTERNAL Vdd PARASITE POWER CIRCUIT Cpp Vpu4.7K DQGNDVddFigure 1.DS18B20 Block Diagram 4.OPERA TION —MEASURING TEMPERATURThe core functionality of the DS18B20 is its direct-to-digital temperature sensor.The resolution of the temperature sensor is user-configurable to 9, 10, 11, or 12 bits,corresponding to increments of 0.5°corresponding to increments of 0.5°C, 0.25°C, 0.25°C, 0.25°C, 0.125°C, 0.125°C, 0.125°C, and 0.0625°C, and 0.0625°C, and 0.0625°C, respectively. C, respectively.The default resolution at power-up is 12-bit. The DS18B20 powers up in a low-poweridle state. To initiate a temperature measurement and A-to-D conversion, the mastermust issue a Convert T [44h] command. Following the conversion, the resultingthermal data is stored in the 2-byte temperature register in the scratchpad memory andthe DS18B20 returns to its idle state. If the DS18B20 is powered by an externalsupply, the master can issue ―read time slotsǁ (see the 1-Wire Bus System section)after the Convert T command and the DS18B20 will respond by transmitting 0 while外文翻译(原文)外文翻译(原文)4 the temperature conversion is in progress and 1 when the conversion is done. If theDS18B20 is powered with parasite power, this notification technique cannot be usedsince the bus must be pulled high by a strong pull up during the entire temperature conversion.The DS18B20 output temperature data is calibrated in degrees Celsius; forFahrenheit applications, a lookup table or conversion routine must be used. Thetemperature data is stored as a 16-bit sign-temperature data is stored as a 16-bit sign-extended two’s complement number in the extended two’s complement number in the temperature register (see Figure 2). The sign bits (S) indicate if the temperature ispositive or negative: for positive numbers S = 0 and for negative numbers S = 1. Ifthe DS18B20 is configured for 12-bit resolution, all bits in the temperature registerwill contain valid data. For 11-bit resolution, bit 0 is undefined. For 10-bit resolution, bits 1 and 0 are undefined, and for 9-bit resolution bits 2, 1, and 0 are undefined.Table 1 gives examples of digital output data and the corresponding temperaturereading for 12-bit resolution conversions.bit7 bit6 bit5 bit4 bit3 bit2 bit1bit0 LS Byte 2322 21 20 2-1 2-2 2-3 2-4 bit15 bit14 bit13 bit12 bit11 bit10 bit9 bit8 MS ByteS S S S S 26 25 24 Figure 2.Temperature Register FormatTEMPERATURE DIGITAL OUTPUT (BINARY) DIGITAL OUTPUT(HEX)+125℃ 0000 0111 1101 0000 07D0H+25.0625+25.0625℃℃0000 0001 1001 0001 0191H 0℃0000 0000 0000 0000 0000H -25.0625-25.0625℃℃1111 1110 0110 1111 FE6FH -55-55℃℃ 1111 1100 1001 0000 FC90HTable 1.Temperature/Data Relationship5.64-BIT LASERED ROM CODE外文翻译(原文)外文翻译(原文)5 Each DS18B20 contains a unique 6464––bit code (see Figure 3) stored in ROM.The least significant 8 bits of the ROM code contain the DS18B20’s 1-Wire familycode: 28h. The next 48 bits contain a unique serial number. The most significant 8 bits contain a cyclic redundancy check (CRC) byte that is calculated from the first56 bits of the ROM code. The 64-bit ROM code and associated ROM functioncontrol logic allow the DS18B20 to operate as a 1-Wire device using the protocoldetailed in the 1-Wire Bus System section.8-BIT CRC 48-BIT SERIAL NUMBER 8-BIT FAMILY CODEMSB LSB MSB LSB MSBFigure 3.64-Bit Lasered ROM Code6.MEMORYThe DS18B20’s memory is organized as shown in Figure 4. The memoryconsists of an SRAM scratchpad with nonvolatile EEPROM storage for the high andlow alarm trigger registers (TH and TL) and configuration register. Note that if theDS18B20 alarm function is not used, the TH and TL registers can serve asgeneral-purpose memory.Byte 0 and byte 1 of the scratchpad contain the LSB and the MSB of thetemperature register, respectively. These bytes are read-only. Bytes 2 and 3 provide access to TH and TL registers. Byte 4 contains the configuration register data. Bytes 5,6, and 7 are reserved for internal use by the device and cannot be overwritten. Byte 8of the scratchpad is read-only and contains the CRC code for bytes 0 through 7 of thescratchpad. The DS18B20 generates this CRC using the method described in the CRC Generation section.Data is written to bytes 2, 3, and 4 of the scratchpad using the Write Scratchpad[4Eh] command; the data must be transmitted to the DS18B20 starting with the leastsignificant bit of byte 2. To verify data integrity, the scratchpad can be read (using theRead Scratchpad [BEh] command) after the data is written. When reading thescratchpad, data is transferred over the 1-Wire bus starting with the least significant外文翻译(原文)外文翻译(原文)6bit of byte 0. To transfer the TH, TL and configuration data from the scratchpad to EEPROM, the master must issue the Copy Scratchpad [48h] command.Byte0Temperature LSB Byte1Byte1Temperature MSB Byte2Byte2TH Register for high temperature Byte3Byte3TL Register for low temperature Byte4Byte4Configuration Register Byte5Byte5Reserved (FFH ) Byte6Byte6Reserved (OCH ) Byte7Byte7 Reserved (IOH )Byte8Byte8Cyclic Redundancy Checks (CRC )Figure 4.DS18B20 Memory Map7.CONFIGURATION REGISTERByte 4 of the scratchpad memory contains the configuration register, which is organized as illustrated in Figure 5. The user can set the conversion resolution of the DS18B20 using the R0 and R1 bits in this register as shown in Table 2. The power-up default of these bits is R0 = 1 and R1 = 1 (12-bit resolution). Note that there is a direct tradeoff between resolution and conversion time. Bit 7 and bits 0 to 4 in the configuration register are reserved for internal use by the device and cannot be overwritten.BIT7 BIT6 BIT5 BIT4 BIT3 BIT2 BIT1BIT0 TM R1 R0 1 1 1 1 1Figure 5.Configuration RegisterR0 R1 RESOLUTION(BIT S) MAX CONVERSIONTIME外文翻译(原文)外文翻译(原文)7Table 2.Thermometer Resolution Configuration8.1-WIRE BUS SYSTEMThe 1-Wire bus system uses a single bus master to control one or more slave devices. The DS18B20 is always a slave. When there is only one slave on the bus, the system is referred to as a ―single -dropǁ system; the system is ―multi -dropǁ if there are multiple slaves on the bus. All data and commands are transmitted least significant bit first over the 1-Wire bus. The following discussion of the 1-Wire bus system is broken down into three topics: hardware configuration, transaction sequence, and 1-Wire signaling (signal types and timing).9.TRANSACTION SEQUENCEThe transaction sequence for accessing the DS18B20 is as follows:Step 1. Initialization Step 2. ROM Command (followed by any required data exchange)Step 3. DS18B20 Function Command (followed by any required dataexchange)It is very important to follow this sequence every time the DS18B20 is accessed, as the DS18B20 will not respond if any steps in the sequence are missing or out of order. Exceptions to this rule are the Search ROM [F0h] and Alarm Search [ECh] commands. After issuing either of these ROM commands, the master must return to Step 1 in the sequence.(1)INITIALIZATIONAll transactions on the 1-Wire bus begin with an initialization sequence. Theinitialization sequence consists of a reset pulse transmitted by the bus master followed 011 0 1 0 1 9 10 11 12 93.75ms 187.5ms 375ms 750ms外文翻译(原文)外文翻译(原文)8 by presence pulse(s) transmitted by the slave(s). The presence pulse lets the busmaster know that slave devices (such as the DS18B20) are on the bus and are ready to operate. (2)ROM COMMANDSAfter the bus master has detected a presence pulse, it can issue a ROM command. These commands operate on the unique 64-bit ROM codes of each slave device and allow the master to single out a specific device if many are present on the 1-Wire bus. These commands also allow the master to determine how many and what types of devices are present on the bus or if any device has experienced an alarm condition. There are five ROM commands, and each command is 8 bits long. The master device must issue an appropriate ROM command before issuing a DS18B20 function command.1.SEARCH ROM [F0h]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 (i.e., Search ROM command followed by data exchange) as many times as necessary to identify all of the slave devices. If there is only one slave on the bus, the simpler Read ROM command can be used in place of the Search ROM process.2.READ ROM [33h]This command can only be used when there is one slave on the bus. It allows the bus master to read the slave’s 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外文翻译(原文)外文翻译(原文)9 the bus master to address a specific slave device on a multi-drop or single-drop bus. Only the slave 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 [CCh]The master can use this command to address all devices on the bus simultaneously without sending out any ROM code information. For example, the master can make all DS18B20s on the bus perform simultaneous temperature conversions by issuing a Skip ROM command followed by a Convert T [44h] command. Note that the Read Scratchpad [BEh] 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 6464-bit -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 [ECh]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. After every Alarm Search cycle (i.e., Alarm Search command followed by data exchange), the bus master must return to Step 1 (Initialization) in the transaction sequence.(3)DS18B20 FUNCTION COMMANDSAfter the bus master has used a ROM command to address the DS18B20 with which it wishes to communicate, the master can issue one of the DS18B20 function commands. These commands allow the master to write to and read from the DS18B20’s scratchpad memory, initiate temperature conversions and determine the power supply mode.外文翻译(原文)外文翻译(原文)10 1.CONVERT T [44h]This command initiates a single temperature conversion. Following the conversion, the resulting thermal data is stored in the 2-byte 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 10µdevice is being used in parasite power mode, within 10µs (max) after this command is s (max) after this command is issued the master must enable a strong pull up on the 1-Wire bus. 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 bus is pulled high by the strong pull up during the conversion.2.READ SCRATCHPAD [BEh]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 the 9th byte (byte 8 – CRC) is read. The master may issue a reset to terminate reading at any time if only part of the scratchpad data is needed.3.WRITE SCRATCHPAD [4Eh]This command allows the master to write 3 bytes of data to the DS18B20’s scratchpad. The first data byte is written into the TH register (byte 2 of the scratchpad), the second byte is written into the TL register (byte 3), and the third byte is written into the configuration register (byte 4). 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.4.COPY SCRA TCHPAD [48h]This command copies the contents of the scratchpad TH, TL and configuration registers (bytes 2, 3 and 4) to EEPROM. If the device is being used in parasite power mode, within 10µ10µs s (max) after this command is issued the master must enable a外文翻译(原文)外文翻译(原文)11 strong pull-up on the 1-Wire bus.5.RECALL E 2 [B8h]This command recalls the alarm trigger values (TH and TL) and configuration data from EEPROM and places the data in bytes 2, 3, and 4, respectively, in the scratchpad memory. The master device can issue read time slots following the Recall E 2command 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.6.READ POWER SUPPL READ POWER SUPPLY [B4h] Y [B4h]The master device issues this command followed by a read time slot to determine if any DS18B20s on the bus are using parasite power. During the read time slot, parasite powered DS18B20s will pull the bus low, and externally powered DS18B20s will let the bus remain high.10.WIRE SIGNALINGThe DS18B20 uses a strict 1-Wire communication protocol to ensure data integrity. Several signal types are defined by this protocol: reset pulse, presence pulse, write 0, write 1, read 0, and read 1. The bus master initiates all these signals, with the exception of the presence pulse.(1)INITIALIZATION PROCEDURE —RESET AND PRESENCE PULSES All communication with the DS18B20 begins with an initialization sequence that consists of a reset pulse from the master followed by a presence pulse from the DS18B20. This is illustrated in Figure 6. When the DS18B20 sends the presence pulse in response to the reset, it is indicating to the master that it is on the bus and ready to operate.During the initialization sequence the bus master transmits (TX) the reset pulse by pulling the 1-Wire bus low for a minimum of 480µs. The bus master then releases外文翻译(原文)外文翻译(原文)12 the bus and goes into receive mode (RX). When the bus is released, the 5kΩ pull -up resistor pulls the 1-Wire bus high. When the DS18B20 detects this rising edge, it waits 15µwaits 15µs to 60µs to 60µs to 60µs and then transmits a presence pulse by pulling the 1-Wire bus low s and then transmits a presence pulse by pulling the 1-Wire bus low for 60µfor 60µs to 240µs to 240µs to 240µs. s.Master Tx Reset Pulse480µ480µs minimum s minimum DS18B20 waits15~60µ15~60µs s DS18B20 presence pulse 60~240µ60~240µs sMaster Rx480µ480µs minimum s minimumDS18B20 InitializationTimingVpuGND 1-Wire BusBus master pulling lowDS18B20 pulling lowResistor pullupFigure 6.Initialization Timing (2)READ/WRITE TIME SLOTSThe bus master writes data to the DS18B20 during write time slots and reads data from the DS18B20 during read time slots. One bit of data is transmitted over the 1-Wire bus per time slot.1.WRITE TIME SLOTSThere 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 60µ60µs s in duration with a minimum of a 1µ1µs s recovery time between individual write slots. Both types of write time slots are initiated by the master pulling the 1-Wire bus low (see Figure 7).To generate a Write 1 time slot, after pulling the 1-Wire bus low, the bus master must release the 1-must release the 1-Wirebus within 15µs. When the bus is released, the 5kΩ pull Wirebus within 15µs. When the bus is released, the 5kΩ pull -up resistor will pull the bus high. To generate a Write 0 time slot, after pulling the 1-Wire外文翻译(原文)外文翻译(原文)13 bus low, the bus master must continue to hold the bus low for the duration of the time slot (at least 60µslot (at least 60µs). s).The DS18B20 samples the 1-Wire bus during a window that lasts from 15µs to 60µ60µs s after the master initiates the write time slot. If the bus is high during the sampling window, a 1 is written to the DS18B20. If the line is low, a 0 is written to the DS18B20.MASTER WRITE ―0ǁ SLOT 60us<Tx<120us >1us >1us15us DS18B20 Samples 15us 30us DS18B20 Samples 15us 15us 30usDS18B20Write Time SlotSTART OF SLOTVccGND1-wire BusMASTER WRITE ―1ǁ SLOT MIN TYP MAXMIN TYP MAXBus master pulling low Resistor pullup START OF SLOTFigure 7.DS18B20 Write Time Slot2.READ TIME SLOTSThe DS18B20 can only transmit data to the master when the master issues read time slots. Therefore, the master must generate read time slots immediately after issuing a Read Scratchpad [BEh] or Read Power Supply [B4h] command, so that the DS18B20 can provide the requested data. In addition, the master can generate read time slots after issuing Convert T [44h] or Recall E 2 [B8h] commands to find out the status of the operation.All read time slots must be a minimum of 60µAll read time slots must be a minimum of 60µs in duration with a minimum of a s in duration with a minimum of a 1µ1µs s recovery time between slots. A read time slot is initiated by the master device pulling the 1-Wire bus low for a minimum of 1µ1µs s and then releasing the bus (see Figure 8). 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外文翻译(原文)外文翻译(原文)14 transmits a 0 by pulling the bus low. When transmitting a 0, the DS18B20 will release the bus by the end of the time slot, and the bus will be pulled back to its high idle state by the pull up resister. Output data from the DS18B20 is valid for 15µs after the falling edge that initiated the read time slot. Therefore, the master must release the bus and then sample the bus state within 15µbus and then sample the bus state within 15µs from the start of the slot. s from the start of the slot.MASTER READ ―0ǁSLOT 15us 15us 30us 15usDS18B20 read time slotVccGND1-wire busMASTER READ ―1ǁ SLOT Bus master pulling lowDS18B20 pulling low Resistor pullup Master samplesMaster samples>1us >1us >1usFigure 8.DS18B20 Read Time Slot外文翻译(原文)外文翻译(原文)15外文翻译(译文)外文翻译(译文)16 DS18B20介绍1.说明说明DS18B20数字式温度传感器提供9位到12位的摄氏温度测量,并且有用户可编程的、非易失性温度上下限告警出发点。
DS18B20资料中英文翻译
The DS-18B20 number temperature spreads a feeling machine The DS-18B20 number temperature spreads a feeling machine, the product adoption's United States' DALLAS company produces of DS18 B20 can set net number the temperature spread the feeling machine chip to pack but become and have to bear to whet to bear to touch, the physical volume is small, use convenience, seal to pack a form diverse, be applicable to various narrow and small space equipments number to measure moderate control realm.1、the technique function describe:1.1 special single lines connect a people's method, DS18 B20 while linking with microprocessor only need a line can immediately carry out the double of microprocessor and DS18 B20 toward the communication.1.2 measure scope-55 ℃ ~ +125 ℃ , proper measure resolution's0.5 ℃ .1.3 support several set nets function, several DS18 B20s can merge at unique three on-line, the most can merge 8, if amount was excessive, it would make power supply the power electric voltage over low, result in thus the signal delivers of unsteady, the realizations order to measure more1.4 work the power:3~5V|DC1.5 don't need any outer circle component in the use1.6 measure the result measure a way string with 9~12 numbers line transmission1.7 stai nless steels protect to take care of diameter Φ 61.8 be applicable to DN15~25, DN 40~ DN250 various equipments that lie industrial piping of quality and narrow and small space measure1.9 standards install the thread M10 X1, M12 X1.5, the G 1|2 term chooses1.10 PVC electric cable direct the line or virtuous type ball type connect line box line, the easy to and other electric appliances equipments links.2、Application2.1 products are applicable to cold storage, food Cang, keep a bottle, tele-communications engine room, electric power engine room, cable slot etc. measures moderate control realm2.2 stalk tiles, urn body, the Fang machine, the air condition, waits industrial equipments of narrow and small space to measure a moderate control.2.3 car air condition, refrigerator, cold cabinet, and medium low temperature dry box of etc.s.2.4 provide hot|make cold piping calories to calculate, the central air condition divides a thermal energy to calculate to measure a moderate control with industrial realm3、Product model number and specificationThe model number measures scope to install thread electric cable length to apply pipingThe B20 -55~125s TS-18s have no 1.5 msTS-18B20A -55~125 M10X1 1.5m DN15~25The B20 TS-181|s Bs-55~125ses 2 Gs connects line box DN40~ 60 4、Connect line elucidationThe characteristics special front line connects, needs a line to correspond by letter to order more ability and simplified a distribute type the temperature spread the feeling application didn't need an external component to use data total line power supply, the electric voltage scope has never needed to provide for use the power diagraph temperature scope for the 3.0-5.5 Vs BE-55 ℃ to+125 ℃ .The Fahrenheit is equal hence-67-257 Fahrenheit degree-10 ℃ go to+85 ℃accuracy inside the scope is ±0.5 ℃The temperature spreads a feeling machine's programmable resolution to convert into 12 number formats for 9~12 temperatures biggest be worth to 750 a milli- of second the customer can define of not and easily lose sex temperature to report to the police to establish an application to include a constant temperature control, industrial system, consume electronics product thermometer, or any hot sensitive systemThe number thermometer that describes the DS18 B20 provides9-12(the programmable equipments temperature read a number.The information is disheveled hair to send to|connect through a line from the DS18 B20, so central microprocessor and DS18 B20 only have a per line conjunction.For read and write and the temperature conversion can acquire energy from the data line, don't need to circumscribe the power.Because each DS18 B20 includes a special ordinal number, several ds 18 bs 20 seses can be existed to a total line at the same time.This makes the temperature spread a feeling machine to place in many different places.Its use is a lot of, include an air condition environment control, detect equipments inside the building or machine, and carry on process monitor and control.The DS18 B20 internal structure mainly constitutes to°from thefour-part cent:64 temperatures that only engrave ROM and temperature to spread a feeling machine and don't vaporize report to the police to trigger a machine TH and TL and allocation to deposit a machine.While equiping signal line Gao, the internal capacitor stores an energy from a line and corresponds by letter circuit to the film power supply, and at low electricity even period for film power supply until next Gao Dian Ping's arrival re- refreshes.The power of the DS18 B20 can also.5V electric voltages get from 3 Vs-5s in the exterior.The DS18 B20 adopts front line correspondence to connect.Because the front line correspondence connects, have to previously complete ROM enactment, otherwise memory and control function will can not use.Mainly provide following function to orderany first of a:1、read ROM2、ROM match3、search ROM4、jump ROM5、report to the police a check.These instruction operation the function has no 64 sequences that only engrave ROM of a spare part, can be hanging several spare parts on the front line to make selection a certain spare part, at the same time, the total line can also knowalways on-line hang how much, what kind of equipments.If the instruction successfully makes the DS18 B20 completion temperature measure, the data saves in the saving machine of DS18 B20.The performance of a control function conductor designation DS18 B20 measures.Measure result will be placed in the DS18 B20 memorieses, and can let reading to send out the conductor of remembering the function, reading contents of slice ascend saving machine.The temperature reports to the police to trigger machine TH and TLs to all have one word stanza EEPROM data.If DS18 B20 not the use report to the police to check instruction, these deposit a machine to be a general customer to remember use.Still carry to there is allocation word's the stanza converting by ideal solution temperature number on the slice.Write TH, TL instruction and allocation word stanza makes use of instruction completion that remembers function.Pass to slowly save a machine to read to deposit a machine.All datas read writing all a beginning from the lowest.The DS18 B20 has 4 main data partses:(1)only engrave 64 sequences in ROM are what factory front be only engraved likes, it can see make the address sequence that is the DS18 B20 code.64 alignments that only engrave ROM are:Starting 8(28 Hs) is the product type mark number, immediately after of 48 sequences that is the DS18 B20 oneselfses, last 8 is 56 front circulating redundancy schools to check code.(CRC=X 8+ Xs 5+ Xs 4+s 1)The function that only engraves ROM is to make each DS18 B20 all each not same, so can carry out a purpose that is always on-line to hang to connect several DS18 B20s.(2) the temperature in the DS18 B20 spread a feeling machine to complete the diagraph to the temperature and take 12 conversions as an example:The binary system expanding with 16 signs repairs code to read to count a form to provide, with 0.0625 ℃ |the LSB form express, among them, the S is a sign.The saving machine of DS18 B20 includes high speed to temporary save machine RAM and can give or get an electric shock to wipe in addition to RAM, can give or get an electric shock to wipe in additionto RAM includes temperature to trigger machine TH and TL again, and an allocation deposits a machine.Saving machine ability the integrity really settle the communication of front-line port, the number starts using to write the order of depositing the machine to write into deposit a machine, immediately after can also use order of reading to deposit the machine to confirm these numbers.After confirming can use the order that the replication deposits a machine can give or get an electric shock to wipe to transfering these numbers to in addition to RAM in.While once modifying to deposit the number in the machine, this process can ensure the integrity of number.The high speed temporary saves machine RAM to constitute to°from the saving machine of 8 word stanzas;The first and the second word stanza are temperatures to show.The fourth Sha-ho word stanza is to make duplicate TH and TL, at the same time the fourth Sha-ho number of word stanza can renew;The fifth word stanza is to make duplicate allocation to deposit a machine, the fifth number of word stanza can renew at the same time;6, 7, 8, three word stanzas are calculator oneselfs ing reads that the order that deposit a machine can read the ninth word stanza, this word stanza is eight word stanzas to the front to carry on schools to check.648 ex- oneself codes that is a DS18 B20 that only engrave ROM, next 48 are a continuous number code, 8 of end is to 56 ex- of the CRC schools check.64-the light of engrave ROM and include the function order of 5 ROMs:Read ROM, match ROM, jump up ROM, check to seek ROM and report to the police to check to seek.The DS18 B20 can use external power VDD as well as use the power in the living on of inner part.When the VDD port connects the electric voltage with 3.0 Vs ~Vs-5.5ses is use external power;When the VDD port connects ground used the power in the living on of inner part.No matter is an inner part to live on the power or an external power supply, I|the O line want to connect a 5 K Ω to or soly and up pull electric resistance.Allocation's depositing a machine is the conversion that installs different number to make sure temperature and number.R1, the R0 is the decision of temperature, from the R1, the different combination of R0 can install for 9, 10, 11, 12 temperatures show.So can know a different temperature conversion to should of conversion time, four kinds of resolutions of allocations distinguish to 0.5 ℃ , 0.25 ℃ , 0.125 ℃ and 0.0625 ℃ , factory take installing as 12. DS18 B20 at factory with install for 12, read temperature totally read 16, so the empress is 112 enter make to convert into 10 enter make after at multiply 0.0625 is then measure of temperature, also need to be judged plus or minus.Front 5 piece words are signs, current 5 is 1:00, read of temperature is minus quantity;5 is 0:00, read at present of temperature is plus quantity.16 numbers put from low to Gao Wei.The instruction agrees on code operating instructions:The temperature converts the 44 H start DS18 B20 to carry on a temperature conversionRead to temporary save machine BEH to read to temporary save machine 9 word stanza contentsesWrite temporary and save the machine 4 EHs to write in a data temporary TH of saving the machine and TL word stanzaThe replication temporary saves the machine 48 Hs temporary save the TH of machine and TL word stanza to write E2 RAMRe- adjust the E2 RAM B8's Hs write the E2 TH within RAMs and TL word stanza to arrive to temporary save machine TH and TL word stanza and read that the signal that the B4 H start DS18 B20 of the power supply method sends out the power supply method gives lord CPUThe beginning of DS18 B20 starts to turn.(1) place data line first Gao Dian Ping"1".(2) postpone(what the time request isn't very strict, but possibly a little bit shorter)(3) the data line pull a low electricity even"0".(4) postpone 750.(the horary time scope can from 480-960)(5) the data line pull Gao Dian Ping"1".(6) wait for while postponing(if is early to start to become anachievement then in 15-60 time inside produce a low electricity that is returned by the DS18 B20 even"0".Can make sure its existence according to the status, but should notice can not be infinitely carry on waiting for, otherwise will make procedure get into to die circulating, so control while wanting to carry on to be super).(7) if CPU read the data is on-line low to give or get an electric shock even"0" after, while also needing to do to postpone time for it to postpones from send out of Gao Dian Ping start to calculate to at least want 480.(8) pull data line again Gao Dao Gao to end after giving or getting an electric shock is even"1".DS-18B20 数字温度传感器DS-18B20数字温度传感器,该产品采用美国DALLAS公司生产的DS18B20可组网数字温度传感器芯片封装而成,具有耐磨耐碰,体积小,使用方便,封装形式多样,适用于各种狭小空间设备数字测温和控制领域。
DS18B20中英文手册
DS18B20 Programmable Resolution1-Wire Digital ThermometerDESCRIPTIONThe DS18B20 Digital Thermometer provides 9 to 12–bit centigrade temperature measurements and has an alarm function with nonvolatile user-programmable upper and lower trigger points. The DS18B20 communicates over a 1-wire bus that by definition requires only one data line (and ground) for communication with a central microprocessor. It has an operating temperature range of –55°C to +125°C and is accurate to 0.5°C over the range of –10°C to +85°C. In addition, the DS18B20 can derive power directly from the data line (“parasite power”), eliminating the need for an external power supply.Each DS18B20 has a unique 64-bit serial code, which allows multiple DS18B20s to function on the same 1–wire bus; thus, it is simple to use one microprocessor to control many DS18B20s distributed over a large area. Applications that can benefit from this feature include HV AC environmental controls, temperature monitoring systems inside buildings, equipment or machinery, and process monitoring and control systems.The 64-bit ROM stores the device’s uniq ue serial code. The scratchpad memory contains the 2-byte temperature register that stores the digital output from the temperature sensor. In addition, the scratchpad provides access to the 1-byte upper and lower alarm trigger registers (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.The DS18B20 uses Dallas’ exclusive 1-wire bus protocol that implements bus communication using one control signal. The control line requires a weak pull up resistor since all devices are linked to the bus via a 3-state or open-drain port (the DQ pin in the case of the DS18B20).In this bus system, the microprocessor (the master device) identifies and addresses devices on the bus usi ng each device’s unique 64-bit code. Because each device has a unique code, the number of devices that can be addressed on one bus is virtually unlimited. The 1-wire bus protocol, including detailed explanations of the commands and “time slots,” is covered in the 1-WIRE BUS SYSTEM section of this datasheet.Another feature of the DS18B20 is the ability to operate without an external power supply. Power is instead supplied through the 1-wire pull up resistor via the DQ pin when the bus is high. The high bus signal also charges an internal capacitor (CPP), which then supplies power to the device when the bus is low. This method of deriving power from the 1-wire bus is referred to as “parasite power.”As an alternative, the DS18B20 may also be powered by an external supply on VDD.DS18B20可编程分辨率的单总线数字温度计说明DS18B20 数字温度计提供9-12位摄氏温度测量而且有一个由高低电平触发的可编程的不因电源消失而改变的报警功能。
可燃气体报警器中英文对照外文翻译文献
可燃气体报警器中英文对照外文翻译文献(文档含英文原文和中文翻译)原文:Design of Combustible Gas Detection system using WirelessKeywords:TGS813, AT89S52, DS18B20, nRF905, TC35iAbstract.The detection device of combustible gas are designed in the presented work,using wireless transceiver and GSM network.The system realize the wireless transmission of the gas concentration,and also can send alarm information to user’s mobile when an exception occurs.The system consists of two parts: a master and slave. The function of the slave is to collect data, process data and transffer the data to the master.The taskof the master is to receive data and display it by LED.The signal acquisition is completed by sensor TGS813 and A/D converter TLC2543. Thewireless transmission is achieved through wireless transceiver nRF905. Since the accuracy of thesensor is affected by the environment,using DS18B20 to achieve temperature compensation.And with wireless communication module TC35i and GSM network platform, we can send thealarm information to use r’s mobile promptly.IntroductionGas detection is widely used in petroleum, chemical, metallurgy, family, shopping malls,gas stations and other places. Currently, how to monitor the hazardous gas fast and accuratelyare the important issues. Although the gas detection technology is relatively mature, but mostproducts has many shortcomings, such as single function, operating complex, bulky, expensiveand low sensitivity. Wireless communication technology applied to the gas monitoring field, canresolve the problem of remote monitoring in special environment, such as high temperature, low temperature, toxic gas.and unable to wiring .In the presented work, the combustible gas detectoris fully functional (with wireless transceiver), simple, small size, low cost, and has high sensitivity. The equipment can greatlyimprove the system's detection capability and accuracy with temperature compensation algorithm, and also can send alarm information to the user's mobile phone promptly through theGSM network.System designThe system consists of two parts as shown in Figure 1.Fig. 1 Overall system block diagramThe slave part mainly complete data collection and wireless transmission. The master part mainly complete receiving data, displaying and sending alarm message.The signal of gas concentration is collected by combustible gas sensor which generates a weak electrical signal. The signal can be amplified and stabilized by conditioning circuit. And then A/D circuit converts the analog signal to digital signal which microcontroller can process. In order to improve the measurement accuracy, and reduce the impact of temperature, design a temperature compensation circuit to collect tempreture data. AT89S52 process the collected data and send data to the master by wireless transceiver.The master receives the data and displays it by LED. And if the gas concentration being abnormal,the system will drive speaker for an alarm signal and use TC35i module to send alarm information to user’s mobile.Hardware designSignal acquisition and conditioning circuit. Figure 2 shows data acquisition circuit. TGS813 is a Gas sensing resistive sensor. The conductivity of TGS813 is influenced by the concentration of combustible gases in air, the greater the concentration, the higher conductivity. In system R0, R9, R10 and RS (inTGS813) form a bridge circuit to convert resistance to voltage signal. Operational amplifier A connected as a voltage follower with resistors R7 and regulator D1 make up the voltage regulator circuit to supply power for the bridge. In order to the voltage adapt to the A/D converter, the voltage is amplified by opamp B, and the magnification can be adjusted through resistor R11.Fig. 2 Gas concentration signal acquisition circuitFig. 3 Temperature compensation circuitTemperature compensation circuit. The resistance of Rs is greatly affected by temperature. In order to improve system accuracy, the results must be temperature compensated or temperature correction.In system, using temperature sensor DS1820 to collect temperature signal, and using software method for temperature correction.Wireless transmission module. Wireless transceiver is achieved by a single-chip RF transceiver nRF905. MCU and nRF905 realize data and commands interaction through the SPI interface.The typical application schematic is shown in Figure 4. The antenna part is 50Ω single-ended antenna.The communication frequency is 433MHz, and operating voltage is3.3V. The value of resistors,capacitors and inductor is determined by the datasheet of nRF905. GSM short message unit. The interface circuit of TC35i and MCU is shown in Figure 5. The communication between MCU and TC35i is via serial, and the rate is 9600bps. Communicationsmode is 8-bit asynchronous with a start bit, 8 data bits, and 1 stop bit. But the serial input of TC35i requires CMOS level, and serial output of 89C52 requires TTL level. In order to achieve the voltage conversion the system use the way of resistors sharing voltage. Fig. 4 nRF905 Application SchematicFig. 5 TC35i and MCU interface circuitSoftware DesignThe software system includes data acquisition module, temperature compensation module, and wireless transceiver moduleWireless sending program. NRF905 data sending process is as follows:1) When having data to send, the microcontroller send the receiver's address and the data to nRF905 chronologically by the SPI interface.Then placed the data to be transmitted into TxBuf register, send WTP command to write the data to TX-Payload register, and send WTA command to write TX address to the TX-Address register.2) The microcontroller set TRX_CE=1 and TX_EN=1 to stimulate nRF905 ShockBurstTM sending mode. When data transmission completed, the data ready pin is set high;3) Beacause of AUTO_RETRAN being high, the data of nRF905 is constantly re-issued untilTRX_CE=0.4) when TRX_CE pin is set low, means the data transmission completed and nRF905 enter idlemode.Wireless receiving program. NRF905 data receiving process is as follows:1)When TRX_CE = 1 and TX_EN = 0, nRF905 enters ShockBurstTM receive modechecking constantly and waiting for receiving data.2)When nRF905 detect the carrier having same frequency band, the carrier detect pin will beset high.3)When nRF905 receive a matched address, the address matches pin will be set high.4) When packet correctly received, the word head, address and CRC bits will automatically be removed, and the data ready pin will be set high.5) MCU set TRX_CE to "0", and nRF905 enter to idle mode.6) When all the data received, nRF905 set data ready pin and address matching pin to "0", and nRF905 turn to shutdown mode or ShockBurstTM transmitmode and receive mode.Fig.6 Wireless data transmission flow chartFig.7 Wireless data receiving flow chartSummaryDesigned an equipment to detect the concentration of combustible gas, which has wireless transceiver functions and can send the alarm information to user’s mobile promptly through GSM.Experimental results show that the devices have high precision, stability and reliability. It can meet most applications which need real-time monitoring of combustible gas concentration.References[1] Liu S, Chen Q, Wang H G, eat. Electrical capacitance tomography for gas solids flow measurement for circulating fluidized beds [J].Flow Measurement and Instrumentation,2005,16(2-3):135-144.[2] TGS 813-for the Detection of Combustible Gases [DB/OL].2009-08-12.[3] Liu Wei, Chen HeXin,Zhang JunWei,etc. Intelligent control and alarm system based on TC35i. IEEE.2008 International Symposium on Computer Science and Computational Technology(ISCSCT), Shanghai, 2008:80-83译文:使用无线的可燃气体检测系统的设计关键词:TGS813,AT89S52单片机,DS18B20,nRF905,TC35i摘要;可燃气体检测装置是在所提出的工作设计,使用无线收发器和GSM网络。
单片机温度控制系统外文翻译中英翻译
Design of the Temperature Control System Based on AT89C51ABSTRACTThe principle and functions of the temperature control system based on micro controller AT89C51 are studied, and the temperature measurement unit consists of the 1-Wire bus digital temperature sensor DS18B20. The system can be expected to detect the preset temperature, display time and save monitoring data. An alarm will be given by system if the temperature exceeds the upper and lower limit value of the temperature which can be set discretionarily and then automatic control is achieved, thus the temperature is achieved monitoring intelligently within a certain range. Basing on principle of the system, it is easy to make a variety of other non-linear control systems so long as the software design is reasonably changed. The system has been proved to be accurate, reliable and satisfied through field practice. KEYWORDS: AT89C51; micro controller; DS18B20; temperature1 INTRODUCTIONTemperature is a very important parameter in human life. In the modern society, temperature control (TC) is not only used in industrial production, but also widely used in other fields. With the improvement of the life quality, we can find the TC appliance in hotels, factories and home as well. And the trend that TC will better serve the whole society, so it is of great significance to measure and control the temperature. Based on the AT89C51 and temperature sensor DS18B20, this system controls the condition temperature intelligently. The temperature can be set discretionarily within a certain range. The system can show the time on LCD, and save monitoring data; and automatically control the temperature when the condition temperature exceeds the upper and lower limit value. By doing so it is to keep the temperature unchanged. The system is of high anti-jamming, high control precision and flexible design; it also fits the rugged environment. It is mainly used in people's life to improve the quality of the work and life. It is also versatile, so that it can be convenient to extend the use of the system. So the design is of profound importance. The general design, hardware design and software design of the system are covered.1.1 IntroductionThe 8-bit AT89C51 CHMOS microcontrollers are designed to handle high-speed calculations and fast input/output operations. MCS 51 microcontrollers are typically used for high-speed event control systems. Commercial applications include modems, motor-control systems, printers, photocopiers, air conditioner control systems, disk drives, and medical instruments. The automotive industry use MCS 51 microcontrollers in engine-control systems, airbags, suspension systems, and antilock braking systems (ABS). The AT89C51 is especially well suited to applications that benefit from its processing speed and enhanced on-chip peripheral functions set, such as automotive power-train control, vehicle dynamic suspension, antilock braking, and stability control applications. Because of these critical applications, the market requires a reliable cost-effective controller with a low interrupt latency response, ability to service the high number of time and event driven integrated peripherals needed in real time applications, and a CPU with above average processing power in a single package. The financial and legal risk of having devices that operate unpredictably is very high. Once in the market, particularly in mission critical applications such as an autopilot or anti-lock braking system, mistakes are financially prohibitive. Redesign costs can run as high as a $500K, much more if the fix means 2 back annotating it across a product family that share the same core and/or peripheral design flaw. In addition, field replacements of components is extremely expensive, as the devices are typically sealed in modules with a total value several times that of the component. To mitigate these problems, it is essential that comprehensive testing of the controllers be carried out at both the component level and system level under worst case environmental and voltage conditions. This complete and thorough validation necessitates not only a well-defined process but also a proper environment and tools to facilitate and execute the mission successfully. Intel Chandler Platform Engineering group provides post silicon system validation (SV) of various micro-controllers and processors. The system validation process can be broken into three major parts. The type of the device and its application requirements determine which types of testing are performed on the device.1.2 The AT89C51 provides the following standard features4Kbytes of Flash, 128 bytes of RAM, 32 I/O lines, two 16-bittimer/counters, a five vector two-level interrupt architecture, a full duple ser-ial port, on-chip oscillatorand clock circuitry. In addition, the AT89C51 is designed with static logic for operation down to zero frequency and supports two software selectable power saving modes. The Idle Mode stops the CPU while allowing the RAM, timer/counters, serial port and interrupt sys -tem to continue functioning. The Power-down Mode saves the RAM contents but freezes the oscil–lator disabling all other chip functions until the next hardware reset.1.3Pin DescriptionVCC Supply voltage.GND Ground.Port 0:Port 0 is an 8-bit open-drain bi-directional I/O port. As an output port, each pin can sink eight TTL inputs. When 1s are written to port 0 pins, the pins can be used as high impedance inputs. Port 0 may also be configured to be the multiplexed low order address/data bus during accesses to external program and data memory. In this mode P0 has internal pull ups. Port 0 also receives the code bytes during Flash programming, and outputs the code bytes during program verification. External pull ups are required during program verification.Port 1:Port 1 is an 8-bit bi-directional I/O port with internal pull ups. The Port 1 output buffers can sink/so -urce four TTL inputs. When 1s are written to Port 1 pins they are pulled high by the internal pull ups and can be used as inputs. As inputs, Port 1 pins that are externally being pulled low will source current (IIL) because of the internal pullups. Port 1 also receives the low-order address bytes during Flash programming and verification.Port 2:Port 2 is an 8-bit bi-directional I/O port with internal pull ups. The Port 2 output buffers can sink/source four TTL inputs. When 1s are written to Port 2 pins they are pulled high by the internal pull ups and can be used as inputs. As inputs, Port 2 pins that are externally being pulled low will source current (IIL) because of the internal pull ups. Port 2 emits the high-order address byte during fetches from external program memory and during accesses to Port 2 pins that are externally being pulled low will source current (IIL) because of the internal pull ups. Port 2 emits the high-order address byte during fetches from external program memory and during accesses to external data memory that use 16-bit addresses (MOVX@DPTR). In this application, it uses strong internal pull-ups when emitting 1s. During accesses to external data memory that use 8-bit addresses (MOVX @ RI), Port 2 emits the contents of the P2 Special Function Register. Port 2 also receives the high-orderaddress bits and some control signals durin Flash programming and verification.Port 3:Port 3 is an 8-bit bi-directional I/O port with internal pull ups. The Port 3 output buffers can sink/sou -rce four TTL inputs. When 1s are written to Port 3 pins they are pulled high by the internal pull ups and can be used as inputs. As inputs, Port 3 pins that are externally being pulled low will source current (IIL) because of the pull ups.Port 3 also serves the functions of various special features of the AT89C51 as listed below:RST:Reset input. A high on this pin for two machine cycles while the oscillator is running resets the device.ALE/PROG:Address Latch Enable output pulse for latching the low byte of the address during accesses to external memory. This pin is also the program pulse input (PROG) during Flash programming. In normal operation ALE is emitted at a constant rate of 1/6 the oscillator frequency, and may be used for external timing or clocking purposes. Note, however, that one ALE pulse is skipped duri-ng each access to external Data Memory. If desired, ALE operation can be disabled by setting bit 0 of SFR location 8EH. With the bit set, ALE is active only during a MOVX or MOVC instruction. Otherwise, the pin is weakly pulled high. Setting the ALE-disable bit has no effect if the microcontroller is in external execution mode.PSEN:Program Store Enable is the read strobe to external program memory. When theAT89C51 is executing code from external program memory, PSEN is activated twice each machine cycle, except that two PSEN activations are skipped during each access to external data memory.EA/VPP:External Access Enable. EA must be strapped to GND in order to enable the device to fetch code from external program memory locations starting at 0000H up to FFFFH. Note, however, that if lock bit 1 is programmed, EA will be internally latched on reset. EA should be strapped to VCC for internal program executions. This pin alsreceives the 12-volt programming enable voltage (VPP) during Flash programming, for parts that require 12-volt VPP.XTAL1:Input to the inverting oscillator amplifier and input to the internal clock operating circuit.XTAL2 :Output from the inverting oscillator amplifier. Oscillator CharacteristicsXTAL1 and XTAL2 are the input and output, respectively, of an inverting amplifier which can be configured for use as an on-chip oscillator, as shownin Figure 1. Either a quartz crystal or ceramic resonator may be used. To drive the device from an external clock source, XTAL2 should be left unconnected while XTAL1 is driven as shown in Figure 2.There are no requirements on the duty cycle of the external clock signal, since the input to the internal clocking circuitry is through a divide-by-two flip-flop, but minimum and maximum voltage high and low time specifications must be observed. Idle Mode In idle mode, the CPU puts itself to sleep while all the on chip peripherals remain active. The mode is invoked by software. The content of the on-chip RAM and all the special functions registers remain unchanged during this mode. The idle mode can be terminated by any enabled interrupt or by a hardware reset. It should be noted that when idle is terminated by a hard ware reset, the device normally resumes program execution, from where it left off, up to two machine cycles before the internal reset algorithm takes control. On-chip hardware inhibits access to internal RAM in this event, but access to the port pins is not inhibited. To eliminate the possibility of an unexpected write to a port pin when Idle is terminated by reset, the instruction following the one that invokes Idle should not be one that writes to a port pin or to external memory.Power-down ModeIn the power-down mode, the oscillator is stopped, and the instruction that invokes power-down is the last instruction executed. The on-chip RAM and Special Function Registers retain their values until the power-down mode is terminated. The only exit from power-down is a hardware reset. Reset redefines the SFRS but does not change the on-chip RAM. The reset should not be activated before VCC is restored to its normal operating level and must be held active long enough to allow the oscillator to restart and stabilize. The AT89C51 code memory array is programmed byte-by byte in either programming mode. To program any nonblank byte in the on-chip Flash Memory, the entire memory must be erased using the Chip Erase Mode.2 Programming AlgorithmBefore programming the AT89C51, the address, data and control signals should be set up according to the Flash programming mode table and Figure 3 and Figure 4. To program the AT89C51, take the following steps.1. Input the desired memory location on the address lines.2. Input the appropriate data byte on the data lines. 3. Activate the correct combination of control signals. 4. Raise EA/VPP to 12V for the high-voltage programming mode. 5. Pulse ALE/PROG once to program a byte in the Flash array or the lock bits. The byte-write cycle is self-timed and typically takes nomore than 1.5 ms. Repeat steps 1 through 5, changing the address and data for the entire array or until the end of the object file is reached. Data Polling: The AT89C51 features Data Polling to indicate the end of a write cycle. During a write cycle, an attempted read of the last byte written will result in the complement of the written datum on PO.7. Once the write cycle has been completed, true data are valid on all outputs, and the next cycle may begin. Data Polling may begin any time after a write cycle has been initiated.2.1Ready/Busy:The progress of byte programming can also be monitored by the RDY/BSY output signal. P3.4 is pulled low after ALE goes high during programming to indicate BUSY. P3.4 is pulled high again when programming is done to indicate READY.Program Verify:If lock bits LB1 and LB2 have not been programmed, the programmed code data can be read back via the address and data lines for verification. The lock bits cannot be verified directly. Verification of the lock bits is achieved by observing that their features are enabled.2.2 Chip Erase:The entire Flash array is erased electrically by using the proper combination of control signals and by holding ALE/PROG low for 10 ms. The code array is written with all “1”s. The chip erase operation must be executed before the code memory can be re-programmed.2.3 Reading the Signature Bytes:The signature bytes are read by the same procedure as a normal verification of locations 030H, 031H, and 032H, except that P3.6 and P3.7 must be pulled to a logic low. The values returned areas follows.(030H) = 1EH indicates manufactured by Atmel(031H) = 51H indicates 89C51(032H) = FFH indicates 12V programming(032H) = 05H indicates 5V programming2.4 Programming InterfaceEvery code byte in the Flash array can be written and the entire array can be erased by using the appropriate combination of control signals. The write operationcycle is self timed and once initiated, will automatically time itself to completion. A microcomputer interface converts information between two forms. Outside the microcomputer the information handled by an electronic system exists as a physical signal, but within the program, it is represented numerically. The function of any interface can be broken down into a number of operations which modify the data in some way, so that the process of conversion between the external and internal forms is carried out in a number of steps. An analog-to-digital converter(ADC) is used to convert a continuously variable signal to a corresponding digital form which can take any one of a fixed number of possible binary values. If the output of the transducer does not vary continuously, no ADC is necessary. In this case the signal conditioning section must convert the incoming signal to a form which can be connected directly to the next part of the interface, the input/output section of the microcomputer itself. Output interfaces take a similar form, the obvious difference being that here the flow of information is in the opposite direction; it is passed from the program to the outside world. In this case the program may call an output subroutine which supervises the operation of the interface and performs the scaling numbers which may be needed for digital-to-analog converter(DAC). This subroutine passes information in turn to an output device which produces a corresponding electrical signal, which could be converted into analog form using a DAC. Finally the signal is conditioned(usually amplified) to a form suitable for operating an actuator. The signals used within microcomputer circuits are almost always too small to be connected directly to the outside world”and some kind of interface must be used to translate them to a more appropriate form. The design of section of interface circuits is one of the most important tasks facing the engineer wishing to apply microcomputers. We have seen that in microcomputers information is represented as discrete patterns of bits; this digital form is most useful when the microcomputer is to be connected to equipment which can only be switched on or off, where each bit might represent the state of a switch or actuator. To solve real-world problems, a microcontroller must have more than just a CPU, a program, and a data memory. In addition, it must contain hardware allowing the CPU to access information from the outside world. Once the CPU gathers information and processes the data, it must also be able to effect change on some portion of the outside world. These hardware devices, called peripherals, are the CPU’s window to the outside.The most basic form of peripheral available on microcontrollers is the generalpurpose I70 port. Each of the I/O pins can be used as either an input or an output. The function of each pin is determined by setting or clearing corresponding bits in a corresponding data direction register during the initialization stage of a program. Each output pin may be driven to either a logic one or a logic zero by using CPU instructions to pin may be viewed (or read.) by the CPU using program instructions. Some type of serial unit is included on microcontrollers to allow the CPU to communicate bit-serially with external devices. Using a bit serial format instead of bit-parallel format requires fewer I/O pins to perform the communication function, which makes it less expensive, but slower. Serial transmissions are performed either synchronously or asynchronously.3 SYSTEM GENERAL DESIGNThe hardware block diagram of the TC is shown in Fig. 1. The system hardware includes the micro controller, temperature detection circuit, keyboard control circuit, clock circuit, Display, alarm, drive circuit and external RAM. Based on the AT89C51, the DS18B20 will transfer the temperature signal detected to digital signal. And the signal is sent to the micro controller for processing. At last the temperature value is showed on the LCD 12232F. These steps are used to achieve the temperature detection. Using the keyboard interface chip HD7279 to set the temperature value, using the micro controller to keep a certain temperature, and using the LCD to show the preset value for controlling the temperature. In addition, the clock chip DS1302 is used to show time and the external RAM 6264 is used to save the monitoring data. An alarm will be given by buzzer in time if the temperature exceeds the upper and lower limit value of the temperature.3.1 HARDWARE DESIGNA. Micro controllerThe AT89C51 is a low-power, high-performance CMOS 8-bit micro controller with 4K bytes of in-system programmable Flash memory. The device is manufactured using At mel’s high-density nonvolatile memory technology and is compatible with the industry-standard 80C51 instruction set and pin out. The on-chip Flash allows the program memory to be reprogrammed in-system or by a conventional nonvolatile memory programmer. By combining a versatile 8-bit CPU with in-system programmable Flash on a monolithic chip, the At mel AT89C51 is a powerful micro controller which provides a highly-flexible and cost-effective solution to manyembedded control applications. Minimum system of the micro controller is shown in Fig. 2. In order to save monitoring data, the 6264 is used as an external RAM. It is a static RAM chip, low-power with 8K bytes memory.B. Temperature Detection CircuitThe temperature sensor is the key part in the system. The Dallas DS18B20 is used, which supports the 1-Wire bus interface, and the ON-BOARD Patented is used internally. All the sensor parts and the converting circuit are integrated in integrated circuit like a transistor [1]. Its measure range is -55℃~125 ℃, and the precision between -10℃~85℃is ±0.5℃[2 ,3]. The temperature collected by the DS18B20 is transmitted in the 1-Wire bus way, and this highly raises the system anti-jamming and makes it fit in situ temperature measurement of the rugged environment [4]. There are two power supply ways for the DS18B20. The first is external power supply: the first pin of the DS18B20 is connected to the ground; the second pin serves as signal wire and the third is connected to the power. The second way is parasite power supply [5]. As the parasite power supply will lead to the complexity of the hardware circuit, the difficulty of the software control and the performance degradation of the chip, etc. But the DS18B20(s) can be connected to the I/O port of the micro controller in the external power supply way and it is more popular. Therefore the external power supply is used and the second pin is connected to the pin P1.3 of the AT89S51. Actually, if there are multipoint to be detected, the DS18B20(s) can be connected to the 1-Wire bus. But when the number is over 8, there is a concern to the driving and the more complex software design as well as the length of the 1-Wire bus. Normally it is no more than 50m. To achieve distant control, the system can be designed in to a wireless one to breakthe length limit of the 1-Wire bus [6].C. LCD CircuitThe LCD 12232F is used, which can be used to show characters, temperature value and time, and supply a friendly display interface. The 12232F is a LCD with 8192 128×32 pixels Chinese character database and 128 16×8 pixels ASCII character set graphics. It mainly consists of row drive/column drive and 128×32 full lattice LCD with the function of displaying graphics as well as 7.5×2 Chinese characters. It is in a parallel or serial mode to connect to external CPU [7]. In order to economize the hardware resource, the 12232F should be connected to the AT89S51 in serial mode with only 4 output ports used. The LCD grayscale can be changed by adjustingthe variable resistor connected the pin Vlcd of the LCD. CLK is used to transmit serial communication clock. SID is used to transmit serial data. CS is used to enable control the LCD. L+ is used to control the LCD backlight power.D. Clock CircuitThe Dallas DS18B20 is used, which is a high performance, low-power and real-time clock chip with RAM. The DS18B20 serves in the system with calendar clock and is used to monitor the time. The time data is read and processed by the AT89C51 and then displayed by the LCD. Also the time can be adjusted by the keyboard. The DS18B20 crystal oscillator is set at 32768Hz, and the recommended compensation capacitance is 6pF. The oscillator frequency is lower, so it might be possible not to connect the capacitor, and this would not make a big difference to the time precision. The backup power supply can be connected to a 3.6V rechargeable battery.E. Keyboard Control CircuitThe keyboard interface in the system is driven by the HD7279A which has a +5V single power supply and which is connected to the keyboard and display without using any active-device. According to the basic requirements and functions of the system, only 6 buttons are needed. The system's functions are set by the AT89C51 receiving the entered data. In order to save the external resistor, the 1×6 keyboard is used, and the keyboard codes are defined as: 07H, 0FH, 17H, 1FH, 27H, 2FH. The order can be read out by reading the code instruction. HD7279A is connected to the AT89S51 in serial mode and only 4 ports are need. As shown in Fig. 6, DIG0~DIG5 and DP are respectively the column lines and row line ports of the six keys which achieve keyboard monitoring, decoding and key codes identification.F. Alarm CircuitIn order to simplify the circuit and convenient debugging, a 5V automatic buzzer is used in the alarm circuit [8]. And this make the software programming simplified. As shown in Fig. 7, it is controlled by the PNP transistor 9012 whose base is connected to the pin P2.5 of the AT89C51. When the temperature exceeds the upper and lower limit value, the P2.5 output low level which makes the transistor be on and then an alarm is given by the buzzer.G. Drive CircuitA step motor is used as the drive device to control the temperature. The four-phase and eight-beat pulse distribution mode is used to drive motor and thesimple delay program is used to handle the time interval between the pulses to obtain different rotational speed. There are two output states for the step motor. One: when the temperature is over the upper value, the motor rotates reversely (to low the temperature), while when lower than the lower limit value, the motor rotates normally (to raise the temperature); besides not equals the preset value. Two: when the temperature is at somewhere between the two ends and equals the preset value, the motor stops. These steps are used to achieve the temperature control. In addition, the motor speed can also be adjusted by relative buttons. As shown in Fig. 8, the code data is input through ports A11~A8 (be P2.3~P2.0) of the AT89C51 and inverted output by the inverter 74LS04. Finally it is amplified by the power amplifier 2803A to power the motor.3.2 SOFTW ARE DESIGNAccording to the general design requirement and hardware circuit principle of the system, as well as the improvement of the program readability, transferability and the convenient debugging, the software design is modularized. The system flow mainly includes the following 8 steps: POST (Power-on self-test), system initiation, temperature detection, alarm handling, temperature control, clock chip DS18B20 operation, LCD and keyboard operation. The main program flow is shown in Fig. 9. Give a little analysis to the above 8 tasks, it is easy to find out that the last five tasks require the real time operation. But to the temperature detection it can be achieved with timer0 timing 1 second, that is to say temperature detection occurs per second. The system initiation includes global variable definition, RAM initiation, special function register initiation and peripheral equipment initiation. Global variable definition mainly finishes the interface definition of external interface chip connected to the AT89C51, and special definition of some memory units. RAM initiation mainly refers to RAM processing. For example when the system is electrified the time code will be stored in the internal unit address or the scintillation flag will be cleared. The special function register initiation includes loading the initial value of timer and opening the interrupt. For example, when the system is electrified the timer is initialized. The peripheral equipment initiation refers to set the initial value of peripheral equipment. For example, when the system is electrified, the LCD should be initialized, the start-up display should be called, the temperature conversion command should be issued firstly and the clock chip DS18B20 should also be initialized. The alarm handling is mainly the lowering and the raising of temperature to make thetemperature remain with the preset range. When the temperature is between the upper and the lower limit value, it goes to temperature control handling, that is to say the temperature need to be raised or lowered according to the preset value. By doing so make the condition temperature equal to the preset value and hence to reach the temperature target.4 CONCLUSIONThe temperature control system has the advantages of friendly human-computer interaction interface, simple hardware, low cost, high temperature control precision (error in the range of ±1 ℃), convenience and versatility, etc. It can be widely used in the occasions with -55℃to 125℃range, and there is a certain practical value.。
数字温度传感器毕业论文中英文资料外文翻译文献[管理资料]
毕业论文中英文资料外文翻译文献外文资料DS1722 Digital ThermometerWith scientific and technological progress and development of the types of temperature sensors increasingly wide range of application of the increasingly widespread, and the beginning analog toward digital, single-bus, dual-bus and bus-3 direction. And the number of temperature sensors because they apply to all microprocessor interface consisting of automatic temperature control system simulation can be overcome sensor and microprocessor interface need signal conditioning circuit and A / D converters advant ages of the drawbacks, has been widely used in industrial control, electronic transducers, medical equipment and other temperature control system. Among them, which are more representative of a digital temperature sensor DS18B20, MAX6575, the DS1722, MAX6636 other. This paper introduces the DS1722 digital temperature sensor characteristics, the use of the method and its timing. Internal structure and other relevant content.FEATURES:Temperature measurements require no external components;Measures temperatures from -55°C to +120°C. Fahrenheit equivalent is -67°F to +248°F;Thermometer accuracy is ±°C;Thermometer resolution is configurable from 8 to 12 bits (°C to °C resolution);Data is read from/written to via a Motorola Serial Peripheral Interface (SPI) or standard 3-wire serial interface;Wide analog power supply range ( - );Separate digital supply allows for logic;Available in an 8-pin SOIC (150 mil), 8-pin USOP, and flip chip package;PIN ASSIGNMENTFIGURE 1 PIN ASSIGNMENTPIN DESCRIPTION:SERMODE - Serial Interface Mode.CE - Chip Enable.SCLK - Serial Clock.GND – Ground.VDDA - Analog Supply Voltage.SDO - Serial Data Out.SDI - Serial Data In.VDDD - Digital Supply Voltage.DESCRIPTION:The DS1722 Digital Thermometer and Thermostat with SPI/3-Wire Interface provides temperature readings which indicate the temperature of the device. No additional components are required; the device is truly a temperature-to-digital converter. Temperature readings are communicated from the DS1722 over a Motorola SPI interface or a standard 3-wire serial interface. The choice of interface standard is selectable by the user. For applications that require greater temperature resolution, the user can adjust the readout resolution from 8 to 12 bits. This is particularly useful in applications where thermal runaway conditions must be detected quickly.For application flexibility, the DS1722 features a wide analog supply rail of - . A separate digital supply allows a range of to . The DS1722 is available in an 8-pin SOIC (150-mil), 8-pin USOP, and flip chip package.Applications for the DS1722 include personal computers/servers/workstations, cellular telephones, office equipment, or any thermally-sensitive system.OVERVIEW:A block diagram of the DS1722 is shown in Figure 2. The DS1722 consists offour major components:1. Precision temperature sensor.2. Analog-to-digital converter.3. SPI/3-wire interface electronics.4. Data registers.The factory-calibrated temperature sensor requires no external components. The DS1722 is in a power conserving shutdown state upon power-up. After power-up, the user may alter the configuration register to place the device in a continuous temperature conversion mode or in a one-shot conversion mode. In the continuous conversion mode, the DS1722 continuously converts the temperature and stores the result in the temperature register. As conversions are performed in the background, reading the temperature register does not affect the conversion in progress. In the one-shot temperature conversion mode, the DS1722 will perform one temperature conversion, store the result in the temperature register, and then eturn to the shutdown state. This conversion mode is ideal for power sensitive applications. More information on the configuration register is contained in the “OPERATION-Programming”section. The temperature conversion results will have a default resolution of 9 bits. In applications where small incremental temperature changes are critical, the user can change the conversion resolution from 9 bits to 8, 10, 11, or 12. This is accomplished by programming the configuration register. Each additional bit of resolution approximately doubles the conversion time. The DS1722 can communicate using either a Motorola Serial Peripheral Interface (SPI) or standard 3-wire interface. The user can select either communication standard through the SERMODE pin, tying it to VDDD for SPI and to ground for 3-wire. The device contains both an analog supply voltage and a digital supply voltage (VDDA and VDDD, respectively). The analog supply powers the device for operation while the digital supply provides the top rails for the digital inputs and outputs. The DS1722 was designed to be Logic-Ready.DS1722 FUNCTIONAL BLOCK DIAGRAM Figure 2OPERATION-Measuring Temperature:The core of DS1722 functionality is its direct-to-digital temperature sensor. The DS1722 measures temperature through the use of an on-chip temperature measurement technique with an operating range from -55°to +120°C. The device powers up in a power-conserving shutdown mode. After power-up, the DS1722 may be placed in a continuous conversion mode or in a one-shot conversion mode. In the continuous conversion mode, the device continuously computes the temperature and stores the most recent result in the temperature register at addresses 01h (LSB) and 02h (MSB). In the one-shot conversion mode, the DS1722 performs one temperature conversion and then returns to the shutdown mode, storing temperature in the temperature register. Details on how to change the setting after power up are contained in the “OPERATION-Programming”section. The resolution of the temperature conversion is configurable (8, 9, 10, 11, or 12 bits), with 9-bit readings the default state. This equates to a temperature resolution of °C, °C, °C, °C, or °C. Following each conversion, thermal data is stored in the thermometer register in two’s complement format; the information can be retrieved over the SPI or 3-wire interface with the address set to the temperature register, 01h (LSB) and then 02h (MSB). Table 2 describesthe exact relationship of output data to measured temperature. The table assumes the DS1722 is configured for 12-bit resolution; if the evince is configured in a lower resolution mode, those bits will contain 0s. The data is transmitted serially over the digital interface, MSB first for SPI communication and LSB first for 3-wire communication. The MSB of the temperature register contains the “sign” (S) bit, denoting whether the temperature is positive or negative. For Fahrenheit usage, a lookup table or conversion routine must be used.AddressLocation S 2625242322212002h MSB (unit = ℃) LSB2-12-22-32-40 0 0 0 01hTEMPERATURE DIGITAL OUTPUT(BINARY) DIGITAL OUTPUT(HEX)+120℃0111 1000 0000 0000 7800h+ 0001 1001 0001 0000 1910h+ 0000 1010 0010 0000 0a20h+ 0000 0000 1000 0000 0080h0 0000 0000 0000 0000 0000h1111 1111 1000 0000 Ff80h1111 0101 1110 0000 F5e0h1110 0110 1111 0000 E6f0h-55 1100 1001 0000 0000 C900h OPERATION-Programming:The area of interest in programming the DS1722 is the Configuration register. All programming is done via the SPI or 3-wire communication interface by selecting the appropriate address of the desired register location. Table 3 illustrates the addresses for the two registers (configuration and temperature) of the DS1722.Register Address Structure Table 3CONFIGURATION REGISTER PROGRAMMING:The configuration register is accessed in the DS1722 with the 00h address for reads and the 80h address for writes. Data is read from or written to the configuration register MSB first for SPI communication and LSB first for 3-wire communication. The format of the register is illustrated in Figure 2. The effect each bit has on DS1722 functionality is described below along with the power-up state of the bit. The entire register is volatile, and thus it will power-up in the default state.CONFIGURATION/STATUS REGISTER Figure 21SHOT = One-shot temperature conversion bit. If the SD bit is "1", (continuous temperature conversions are not taking place), a "1" written to the 1SHOT bit will cause the DS1722 to perform one temperature conversion and store the results in the temperature register at addresses 01h (LSB) and 02h (MSB). The bit will clear itself to "0" upon completion of the temperature conversion. The user has read/write access to the 1SHOT bit, although writes to this bit will be ignored if the SD bit is a "0", (continuous conversion mode). The power-up default of the one-shot bit is "0".R0, R1, R2 = Thermometer resolution bits. Table 4 below defines the resolution of the digital thermometer, based on the settings of these 3 bits. There is a direct tradeoff between resolution and conversion time, as depicted in the AC Electrical Characteristics. The user has read/write access to the R2, R1 and R0 bits and the power-up default state is R2="0", R1="0", and R0="1" (9-bit conversions).THERMOMETER RESOLUTION CONFIGURATION Table 4SD = Shutdown bit. If SD is "0", the DS1722 will continuously perform temperature conversions and store the last completed result in the temperature register. If SD is changed to a "1", the conversion in progress will be completed and stored and then the device will revert to a low-power shutdown mode. The communication port remains active. The user has read/write access to the SD bit and the power-up default is "1" (shutdown mode).SERIAL INTERFACE:The DS1722 offers the flexibility to choose between two serial interface modes. The DS1722 can communicate with the SPI interface or with a standard 3-wire interface. The interface method used is determined by the SERMODE pin. When this pin is connected to VDDD SPI communication is selected. When this pin is connected to ground, standard 3-wire communication is selected.SERIAL PERIPHERAL INTERFACE (SPI):The serial peripheral interface (SPI) is a synchronous bus for address and data transfer. The SPI mode of serial communication is selected by tying the SERMODE pin to VDDD. Four pins are used for the SPI. The four pins are the SDO (Serial Data Out), SDI (Serial Data In), CE (Chip Enable), and SCLK (Serial Clock). The DS1722 is the slave device in an SPI application, with the microcontroller being the master. The SDI and SDO pins are the serial data input and output pins for the DS1722, respectively. The CE input is used to initiate and terminate a data transfer. The SCLK pin is used to synchronize data movement between the master (microcontroller) and the slave (DS1722) devices. The shift clock (SCLK), which is generated by the microcontroller, is active only when CE is high and during address and data transfer to any device on the SPI bus. The inactive clock polarity is programmable in somemicrocontrollers. The DS1722 offers an important feature in that the level of the inactive clock is determined by sampling SCLK when CE becomes active. Therefore, either SCLK polarity can be accommodated. There is one clock for each bit transferred. Address and data bits are transferred in groups of eight, MSB first.3-WIRE SERIAL DATA BUS:The 3-wire communication mode operates similar to the SPI mode. However, in 3-wire mode, there is one bi-directional I/O instead of separate data in and data out signals. The 3-wire consists of the I/O (SDI and SDO pins tied together), CE, and SCLK pins. In 3-wire mode, each byte is shifted in LSB first unlike SPI mode where each byte is shifted in MSB first. As is the case with the SPI mode, an address byte is written to the device followed by a single data byte or multiple data bytes.外文资料译文DS1722数字温度传感器随着科学技术的不断进步和发展,温度传感器的种类日益繁多,应用逐渐广泛,并且开始由模拟式向着数字式、单总线式、双总线式和三总线式发展。
单片机温度控制系统外文翻译_外文文献_英文文献_中英翻译
Design of the Temperature Control System Based on AT89C51ABSTRACTThe principle and functions of the temperature control system based on micro controller AT89C51 are studied, and the temperature measurement unit consists of the 1-Wire bus digital temperature sensor DS18B20. The system can be expected to detect the preset temperature, display time and save monitoring data. An alarm will be given by system if the temperature exceeds the upper and lower limit value of the temperature which can be set discretionarily and then automatic control is achieved, thus the temperature is achieved monitoring intelligently within a certain range. Basing on principle of the system, it is easy to make a variety of other non-linear control systems so long as the software design is reasonably changed. The system has been proved to be accurate, reliable and satisfied through field practice.KEYWORDS: AT89C51; micro controller; DS18B20; temperature1 INTRODUCTIONTemperature is a very important parameter in human life. In the modern society, temperature control (TC) is not only used in industrial production, but also widely used in other fields. With the improvement of the life quality, we can find the TC appliance in hotels, factories and home as well. And the trend that TC will better serve the whole society, so it is of great significance to measure and control the temperature. Based on the AT89C51 and temperature sensor DS18B20, this system controls the condition temperature intelligently. The temperature can be set discretionarily within a certain range. The system can show the time on LCD, and save monitoring data; and automatically control the temperature when the conditiontemperature exceeds the upper and lower limit value. By doing so it is to keep the temperature unchanged. The system is of high anti-jamming, high control precision and flexible design; it also fits the rugged environment. It is mainly used in people's life to improve the quality of the work and life. It is also versatile, so that it can be convenient to extend the use of the system. So the design is of profound importance. The general design, hardware design and software design of the system are covered.1.1 IntroductionThe 8-bit AT89C51 CHMOS microcontrollers are designed to handle high-speed calculations and fast input/output operations. MCS 51 microcontrollers are typically used for high-speed event control systems. Commercial applications include modems, motor-control systems, printers, photocopiers, air conditioner control systems, disk drives, and medical instruments. The automotive industry use MCS 51 microcontrollers in engine-control systems, airbags, suspension systems, and antilock braking systems (ABS). The AT89C51 is especially well suited to applications that benefit from its processing speed and enhanced on-chip peripheral functions set, such as automotive power-train control, vehicle dynamic suspension, antilock braking, and stability control applications. Because of these critical applications, the market requires a reliable cost-effective controller with a low interrupt latency response, ability to service the high number of time and event driven integrated peripherals needed in real time applications, and a CPU with above average processing power in a single package. The financial and legal risk of having devices that operate unpredictably is very high. Once in the market, particularly in mission critical applications such as an autopilot or anti-lock braking system, mistakes are financially prohibitive. Redesign costs can run as high as a $500K, much more if the fix means 2 back annotating it across a product family that share the same core and/or peripheral design flaw. In addition, field replacements ofcomponents is extremely expensive, as the devices are typically sealed in modules with a total value several times that of the component. To mitigate these problems, it is essential that comprehensive testing of the controllers be carried out at both the component level and system level under worst case environmental and voltage conditions. This complete and thorough validation necessitates not only a well-defined process but also a proper environment and tools to facilitate and execute the mission successfully. Intel Chandler Platform Engineering group provides post silicon system validation (SV) of various micro-controllers and processors. The system validation process can be broken into three major parts. The type of the device and its application requirements determine which types of testing are performed on the device.1.2 The AT89C51 provides the following standard features4Kbytes of Flash, 128 bytes of RAM, 32 I/O lines, two 16-bittimer/counters, a five vector two-level interrupt architecture, a full duple ser-ial port, on-chip oscillator and clock circuitry. In addition, the AT89C51 is designed with static logic for operation down to zero frequency and supports two software selectable power saving modes. The Idle Mode stops the CPU while allowing the RAM, timer/counters, serial port and interrupt sys -tem to continue functioning. The Power-down Mode saves the RAM contents but freezes the oscil–lator disabling all other chip functions until the next hardware reset.1.3Pin DescriptionVCC Supply voltage.GND Ground.Port 0:Port 0 is an 8-bit open-drain bi-directional I/O port. As an output port, each pin can sink eight TTL inputs. When 1s are written to port 0 pins, thepins can be used as high impedance inputs. Port 0 may also be configured to be the multiplexed low order address/data bus during accesses to external program and data memory. In this mode P0 has internal pull ups. Port 0 also receives the code bytes during Flash programming, and outputs the code bytes during program verification. External pull ups are required during program verification.Port 1:Port 1 is an 8-bit bi-directional I/O port with internal pull ups. The Port 1 output buffers can sink/so -urce four TTL inputs. When 1s are written to Port 1 pins they are pulled high by the internal pull ups and can be used as inputs. As inputs, Port 1 pins that are externally being pulled low will source current (IIL) because of the internal pullups. Port 1 also receives the low-order address bytes during Flash programming and verification.Port 2:Port 2 is an 8-bit bi-directional I/O port with internal pull ups. The Port 2 output buffers can sink/source four TTL inputs. When 1s are written to Port 2 pins they are pulled high by the internal pull ups and can be used as inputs. As inputs, Port 2 pins that are externally being pulled low will source current (IIL) because of the internal pull ups. Port 2 emits the high-order address byte during fetches from external program memory and during accesses to Port 2 pins that are externally being pulled low will source current (IIL) because of the internal pull ups. Port 2 emits the high-order address byte during fetches from external program memory and during accesses to external data memory that use 16-bit addresses (MOVX@DPTR). In this application, it uses strong internal pull-ups when emitting 1s. During accesses to external data memory that use 8-bit addresses (MOVX @ RI), Port 2 emits the contents of the P2 Special Function Register. Port 2 also receives the high-order address bits and some control signals durin Flash programming and verification.Port 3:Port 3 is an 8-bit bi-directional I/O port with internal pull ups. The Port 3 output buffers can sink/sou -rce four TTL inputs. When 1s are written toPort 3 pins they are pulled high by the internal pull ups and can be used as inputs. As inputs, Port 3 pins that are externally being pulled low will source current (IIL) because of the pull ups.Port 3 also serves the functions of various special features of the AT89C51 as listed below:RST:Reset input. A high on this pin for two machine cycles while the oscillator is running resets the device.ALE/PROG:Address Latch Enable output pulse for latching the low byte of the address during accesses to external memory. This pin is also the program pulse input (PROG) during Flash programming. In normal operation ALE is emitted at a constant rate of 1/6 the oscillator frequency, and may be used for external timing or clocking purposes. Note, however, that one ALE pulse is skipped duri-ng each access to external Data Memory. If desired, ALE operation can be disabled by setting bit 0 of SFR location 8EH. With the bit set, ALE is active only during a MOVX or MOVC instruction. Otherwise, the pin is weakly pulled high. Setting the ALE-disable bit has no effect if the microcontroller is in external execution mode.PSEN:Program Store Enable is the read strobe to external program memory. When theAT89C51 is executing code from external program memory, PSEN is activated twice each machine cycle, except that two PSEN activations are skipped during each access to external data memory.EA/VPP:External Access Enable. EA must be strapped to GND in order to enable the device to fetch code from external program memory locations starting at 0000H up to FFFFH. Note, however, that if lock bit 1 is programmed, EA will be internally latched on reset. EA should be strapped to VCC for internal program executions. This pin alsreceives the 12-volt programming enable voltage (VPP) during Flash programming, for parts that require 12-volt VPP.XTAL1:Input to the inverting oscillator amplifier and input to the internal clock operating circuit.XTAL2 :Output from the inverting oscillator amplifier. Oscillator CharacteristicsXTAL1 and XTAL2 are the input and output, respectively, of an inverting amplifier which can be configured for use as an on-chip oscillator, as shown in Figure 1. Either a quartz crystal or ceramic resonator may be used. To drive the device from an external clock source, XTAL2 should be left unconnected while XTAL1 is driven as shown in Figure 2.There are no requirements on the duty cycle of the external clock signal, since the input to the internal clocking circuitry is through a divide-by-two flip-flop, but minimum and maximum voltage high and low time specifications must be observed. Idle Mode In idle mode, the CPU puts itself to sleep while all the on chip peripherals remain active. The mode is invoked by software. The content of the on-chip RAM and all the special functions registers remain unchanged during this mode. The idle mode can be terminated by any enabled interrupt or by a hardware reset. It should be noted that when idle is terminated by a hard ware reset, the device normally resumes program execution, from where it left off, up to two machine cycles before the internal reset algorithm takes control. On-chip hardware inhibits access to internal RAM in this event, but access to the port pins is not inhibited. To eliminate the possibility of an unexpected write to a port pin when Idle is terminated by reset, the instruction following the one that invokes Idle should not be one that writes to a port pin or to external memory.Power-down ModeIn the power-down mode, the oscillator is stopped, and the instruction that invokes power-down is the last instruction executed. The on-chip RAM and Special Function Registers retain their values until the power-down mode is terminated. The only exit from power-down is a hardware reset. Reset redefines the SFRS butdoes not change the on-chip RAM. The reset should not be activated before VCC is restored to its normal operating level and must be held active long enough to allow the oscillator to restart and stabilize. The AT89C51 code memory array is programmed byte-by byte in either programming mode. To program any nonblank byte in the on-chip Flash Memory, the entire memory must be erased using the Chip Erase Mode.2 Programming AlgorithmBefore programming the AT89C51, the address, data and control signals should be set up according to the Flash programming mode table and Figure 3 and Figure 4. To program the AT89C51, take the following steps.1. Input the desired memory location on the address lines.2. Input the appropriate data byte on the data lines.3. Activate the correct combination of control signals.4. Raise EA/VPP to 12V for the high-voltage programming mode.5. Pulse ALE/PROG once to program a byte in the Flash array or the lock bits. The byte-write cycle is self-timed and typically takes no more than 1.5 ms. Repeat steps 1 through 5, changing the address and data for the entire array or until the end of the object file is reached. Data Polling: The AT89C51 features Data Polling to indicate the end of a write cycle. During a write cycle, an attempted read of the last byte written will result in the complement of the written datum on PO.7. Once the write cycle has been completed, true data are valid on all outputs, and the next cycle may begin. Data Polling may begin any time after a write cycle has been initiated.2.1Ready/Busy:The progress of byte programming can also be monitored by the RDY/BSY output signal. P3.4 is pulled low after ALE goes high during programming to indicate BUSY. P3.4 is pulled high again when programming is done to indicate READY.Program Verify:If lock bits LB1 and LB2 have not been programmed, the programmed code data can be read back via the address and data lines for verification. The lock bits cannot be verified directly. Verification of the lock bits is achieved by observing that their features are enabled.2.2 Chip Erase:The entire Flash array is erased electrically by using the proper combination of control signals and by holding ALE/PROG low for 10 ms. The code array is written with all “1”s. The chip erase operation must be executed before the code memory can be re-programmed.2.3 Reading the Signature Bytes:The signature bytes are read by the same procedure as a normal verification of locations 030H, 031H, and 032H, except that P3.6 and P3.7 must be pulled to a logic low. The values returned areas follows.(030H) = 1EH indicates manufactured by Atmel(031H) = 51H indicates 89C51(032H) = FFH indicates 12V programming(032H) = 05H indicates 5V programming2.4 Programming InterfaceEvery code byte in the Flash array can be written and the entire array can be erased by using the appropriate combination of control signals. The write operation cycle is self timed and once initiated, will automatically time itself to completion.A microcomputer interface converts information between two forms. Outside themicrocomputer the information handled by an electronic system exists as a physical signal, but within the program, it is represented numerically. The function of any interface can be broken down into a number of operations which modify the data in some way, so that the process of conversion between the external and internal forms is carried out in a number of steps. An analog-to-digital converter(ADC) is used to convert a continuously variable signal to a corresponding digital form which can take any one of a fixed number of possible binary values. If the output of the transducer does not vary continuously, no ADC is necessary. In this case the signal conditioning section must convert the incoming signal to a form which can be connected directly to the next part of the interface, the input/output section of the microcomputer itself. Output interfaces take a similar form, the obvious difference being that here the flow of information is in the opposite direction; it is passed from the program to the outside world. In this case the program may call an output subroutine which supervises the operation of the interface and performs the scaling numbers which may be needed for digital-to-analog converter(DAC). This subroutine passes information in turn to an output device which produces a corresponding electrical signal, which could be converted into analog form using a DAC. Finally the signal is conditioned(usually amplified) to a form suitable for operating an actuator. The signals used within microcomputer circuits are almost always too small to be connected directly to the outside world”and some kind of interface must be used to translate them to a more appropriate form. The design of section of interface circuits is one of the most important tasks facing the engineer wishing to apply microcomputers. We have seen that in microcomputers information is represented as discrete patterns of bits; this digital form is most useful when the microcomputer is to be connected to equipment which can only be switched on or off, where each bit might represent the state of a switch or actuator. To solve real-world problems, a microcontroller must have more than just a CPU, a program, and a data memory. In addition, it must contain hardware allowing the CPU to access information from the outside world. Once theCPU gathers information and processes the data, it must also be able to effect change on some portion of the outside world. These hardware devices, called peripherals, are the CPU’s window to the outside.The most basic form of peripheral available on microcontrollers is the general purpose I70 port. Each of the I/O pins can be used as either an input or an output. The function of each pin is determined by setting or clearing corresponding bits in a corresponding data direction register during the initialization stage of a program. Each output pin may be driven to either a logic one or a logic zero by using CPU instructions to pin may be viewed (or read.) by the CPU using program instructions. Some type of serial unit is included on microcontrollers to allow the CPU to communicate bit-serially with external devices. Using a bit serial format instead of bit-parallel format requires fewer I/O pins to perform the communication function, which makes it less expensive, but slower. Serial transmissions are performed either synchronously or asynchronously.3 SYSTEM GENERAL DESIGNThe hardware block diagram of the TC is shown in Fig. 1. The system hardware includes the micro controller, temperature detection circuit, keyboard control circuit, clock circuit, Display, alarm, drive circuit and external RAM. Based on the AT89C51, the DS18B20 will transfer the temperature signal detected to digital signal. And the signal is sent to the micro controller for processing. At last the temperature value is showed on the LCD 12232F. These steps are used to achieve the temperature detection. Using the keyboard interface chip HD7279 to set the temperature value, using the micro controller to keep a certain temperature, and using the LCD to show the preset value for controlling the temperature. In addition, the clock chip DS1302 is used to show time and the external RAM 6264 is used to save the monitoring data. An alarm will be given by buzzer in time if the temperature exceeds the upper and lower limit value of the temperature.3.1 HARDWARE DESIGNA. Micro controllerThe AT89C51 is a low-power, high-performance CMOS 8-bit micro controller with 4K bytes of in-system programmable Flash memory. The device is manufactured using At mel’s high-density nonvolatile memory technology and is compatible with the industry-standard 80C51 instruction set and pin out. The on-chip Flash allows the program memory to be reprogrammed in-system or by a conventional nonvolatile memory programmer. By combining a versatile 8-bit CPU with in-system programmable Flash on a monolithic chip, the At mel AT89C51 is a powerful micro controller which provides a highly-flexible and cost-effective solution to many embedded control applications. Minimum system of the micro controller is shown in Fig. 2. In order to save monitoring data, the 6264 is used as an external RAM. It is a static RAM chip, low-power with 8K bytes memory.B. Temperature Detection CircuitThe temperature sensor is the key part in the system. The Dallas DS18B20 is used, which supports the 1-Wire bus interface, and the ON-BOARD Patented is used internally. All the sensor parts and the converting circuit are integrated in integrated circuit like a transistor [1]. Its measure range is -55℃~125 ℃, and the precision between -10℃~85℃is ±0.5℃[2 ,3]. The temperature collected by the DS18B20 is transmitted in the 1-Wire bus way, and this highly raises the system anti-jamming and makes it fit in situ temperature measurement of the rugged environment [4]. There are two power supply ways for the DS18B20. The first is external power supply: the first pin of the DS18B20 is connected to the ground; the second pin serves as signal wire and the third is connected to the power. The second way is parasite power supply [5]. As the parasite power supply will lead to the complexity of the hardware circuit, the difficulty of the software controland the performance degradation of the chip, etc. But the DS18B20(s) can be connected to the I/O port of the micro controller in the external power supply way and it is more popular. Therefore the external power supply is used and the second pin is connected to the pin P1.3 of the AT89S51. Actually, if there are multipoint to be detected, the DS18B20(s) can be connected to the 1-Wire bus. But when the number is over 8, there is a concern to the driving and the more complex software design as well as the length of the 1-Wire bus. Normally it is no more than 50m. To achieve distant control, the system can be designed in to a wireless one to breakthe length limit of the 1-Wire bus [6].C. LCD CircuitThe LCD 12232F is used, which can be used to show characters, temperature value and time, and supply a friendly display interface. The 12232F is a LCD with 8192 128×32 pixels Chinese character database and 128 16×8 pixels A SCII character set graphics. It mainly consists of row drive/column drive and 128×32 full lattice LCD with the function of displaying graphics as well as 7.5×2 Chinese characters. It is in a parallel or serial mode to connect to external CPU [7]. In order to economize the hardware resource, the 12232F should be connected to the AT89S51 in serial mode with only 4 output ports used. The LCD grayscale can be changed by adjusting the variable resistor connected the pin Vlcd of the LCD. CLK is used to transmit serial communication clock. SID is used to transmit serial data. CS is used to enable control the LCD. L+ is used to control the LCD backlight power.D. Clock CircuitThe Dallas DS18B20 is used, which is a high performance, low-power and real-time clock chip with RAM. The DS18B20 serves in the system with calendar clock and is used to monitor the time. The time data is read and processed by the AT89C51 and then displayed by the LCD. Also the time can be adjusted by the keyboard. TheDS18B20 crystal oscillator is set at 32768Hz, and the recommended compensation capacitance is 6pF. The oscillator frequency is lower, so it might be possible not to connect the capacitor, and this would not make a big difference to the time precision. The backup power supply can be connected to a 3.6V rechargeable battery.E. Keyboard Control CircuitThe keyboard interface in the system is driven by the HD7279A which has a +5V single power supply and which is connected to the keyboard and display without using any active-device. According to the basic requirements and functions of the system, only 6 buttons are needed. The system's functions are set by the AT89C51 receiving the entered data. In order to save the external resistor, the 1×6 keyboard is used, and the keyboard codes are defined as: 07H, 0FH, 17H, 1FH, 27H, 2FH. The order can be read out by reading the code instruction. HD7279A is connected to the AT89S51 in serial mode and only 4 ports are need. As shown in Fig. 6, DIG0~DIG5 and DP are respectively the column lines and row line ports of the six keys which achieve keyboard monitoring, decoding and key codes identification.F. Alarm CircuitIn order to simplify the circuit and convenient debugging, a 5V automatic buzzer is used in the alarm circuit [8]. And this make the software programming simplified. As shown in Fig. 7, it is controlled by the PNP transistor 9012 whose base is connected to the pin P2.5 of the AT89C51. When the temperature exceeds the upper and lower limit value, the P2.5 output low level which makes the transistor be on and then an alarm is given by the buzzer.G. Drive CircuitA step motor is used as the drive device to control the temperature. The four-phase and eight-beat pulse distribution mode is used to drive motor and thesimple delay program is used to handle the time interval between the pulses to obtain different rotational speed. There are two output states for the step motor. One: when the temperature is over the upper value, the motor rotates reversely (to low the temperature), while when lower than the lower limit value, the motor rotates normally (to raise the temperature); besides not equals the preset value. Two: when the temperature is at somewhere between the two ends and equals the preset value, the motor stops. These steps are used to achieve the temperature control. In addition, the motor speed can also be adjusted by relative buttons. As shown in Fig. 8, the code data is input through ports A11~A8 (be P2.3~P2.0) of the AT89C51 and inverted output by the inverter 74LS04. Finally it is amplified by the power amplifier 2803A to power the motor.3.2 SOFTWARE DESIGNAccording to the general design requirement and hardware circuit principle of the system, as well as the improvement of the program readability, transferability and the convenient debugging, the software design is modularized. The system flow mainly includes the following 8 steps: POST (Power-on self-test), system initiation, temperature detection, alarm handling, temperature control, clock chip DS18B20 operation, LCD and keyboard operation. The main program flow is shown in Fig. 9. Give a little analysis to the above 8 tasks, it is easy to find out that the last five tasks require the real time operation. But to the temperature detection it can be achieved with timer0 timing 1 second, that is to say temperature detection occurs per second. The system initiation includes global variable definition, RAM initiation, special function register initiation and peripheral equipment initiation. Global variable definition mainly finishes the interface definition of external interface chip connected to the AT89C51, and special definition of some memory units. RAM initiation mainly refers to RAM processing. For example when the system is electrified the time code will be stored in theinternal unit address or the scintillation flag will be cleared. The special function register initiation includes loading the initial value of timer and opening the interrupt. For example, when the system is electrified the timer is initialized. The peripheral equipment initiation refers to set the initial value of peripheral equipment. For example, when the system is electrified, the LCD should be initialized, the start-up display should be called, the temperature conversion command should be issued firstly and the clock chip DS18B20 should also be initialized. The alarm handling is mainly the lowering and the raising of temperature to make the temperature remain with the preset range. When the temperature is between the upper and the lower limit value, it goes to temperature control handling, that is to say the temperature need to be raised or lowered according to the preset value. By doing so make the condition temperature equal to the preset value and hence to reach the temperature target.4 CONCLUSIONThe temperature control system has the advantages of friendly human-computer interaction interface, simple hardware, low cost, high temperature control precision (error in the range of ±1 ℃), convenience and versatility, etc. It c an be widely used in the occasions with -55℃to 125℃range, and there is a certain practical value.温度控制系统的设计摘要研究了基于AT89C51单片机温度控制系统的原理和功能,温度测量单元由单总线数字温度传感器DS18B20构成。
温度控制系统中英文对照外文翻译文献
温度控制系统中英文对照外文翻译文献温度控制系统中英文对照外文翻译文献温度控制系统中英文对照外文翻译文献(文档含英文原文和中文翻译)译文:温度控制系统的设计摘要:研究了基于AT89S 51单片机温度控制系统的原理和功能,温度测量单元由单总线数字温度传感器DS18B 20构成。
该系统可进行温度设定,时间显示和保存监测数据。
如果温度超过任意设置的上限和下限值,系统将报警并可以和自动控制的实现,从而达到温度监测智能一定范围内。
基于系统的原理,很容易使其他各种非线性控制系统,只要软件设计合理的改变。
该系统已被证明是准确的,可靠和满意通过现场实践。
践。
关键词:单片机;温度;温度关键词:单片机;温度;温度I. 导言温度是在人类生活中非常重要的参数。
在现代社会中,温度控制(TC TC)不仅用于工业生产,还广泛应用于其它领域。
随着生活质量的提)不仅用于工业生产,还广泛应用于其它领域。
随着生活质量的提高,我们可以发现在酒店,工厂和家庭,以及比赛设备。
而比赛的趋势将更好地服务于整个社会,因此它具有十分重要的意义测量和控制温度。
度。
在AT89S51AT89S51单片机和温度传感器单片机和温度传感器DS18B20DS18B20的基础上,系统环境的基础上,系统环境温度智能控制。
温度可设定在一定范围内动任意。
该系统可以显示在液晶显示屏的时间,并保存监测数据,并自动地控制温度,当环境温度超过上限和下限的值。
这样做是为了保持温度不变。
该系统具有很高的抗干扰能力,控制精度高,灵活的设计,它也非常适合这个恶劣的环境。
它主要应用于人们的生活,改善工作和生活质量。
这也是通用的,因此它可以方便地扩大使用该系统。
因此,设计具有深刻的重要性。
一般的设计,硬件设计和软件系统的设计都包括在内。
设计,硬件设计和软件系统的设计都包括在内。
II. 系统总体设计该系统硬件包括微控制器,温度检测电路,键盘控制电路,时钟电路,显示,报警,驱动电路和外部RAM RAM。
外文翻译--基于DS18B20分组方式温度测试系统设计
毕业设计外文资料翻译外文出处:2007 Second IEEE Conference on Industrial Electronics and Applications学院:信息工程系:电子信息工程专业:电子信息工程班级:学号:学生姓名:外文原文:A Design of the Temperature Test System Basedon Grouping DS18B20LI Ping ZHOU Yucai Xiangjun ZENG YANG Ting-fangChangsha University of Science and Technology,Changsha 410077, Hunan, P. R. China.E-Mail:0702liping@Abstract- All the DS18B20 sensors, used for the multipoint test temperature, are connected with MCU on one of IO bus, and temperature data are collected by turns. If the system has a large amount of sensors, the time of MCU used in processing the temperature data is obviously prolonged, so the cycle of alternate test gets longer. In this paper, a new method that DS18B20 are rationally grouped is presented, and some measures are taken in software; as a result, the speed of alternate test advances distinctly.Key words- DS18B20 Group ,temperature test, time spent on the alternate test.I. INTRODUCTIONAs the simple structure, convenient installment, low loss and wide range of temperature test, DS18B20 temperature test sensors are applied to the fields which need the multipoint temperature test, such as the chemical industry, the grain, the environment supervision and so on. Because of the adoption of one bus in theDS18B20 multipoint temperature test system, all DS18B20 are hung on one bus, and then the temperature conversion value of each test point is read by turns. As the conversion value must be read after reading-pin state for 8 times, and position and store data must be moved, so time spend much in reading one point of the data system by every time. If the temperature test system is large-scaled, the system loss caused by it is rather much, and then the alternate test speed of the system decreases obviously, which influences the efficiency of the multipoint temperature test system seriously. In this paper, DS18B20 are hung on some I/O buses by grouping DS18B20 evenly, and the conversion temperature data is obtained by reading the state of DS18B20, then the system loss decreases and the alternate test speed increases obviously, which won’t influence the precision and the reliability of the conversion. A set of multipoint temperature test of artificial environment laboratory is achieved in this paper, which increases the test efficiency of the former system.Ⅱ. CHARACTERISTICS OF DS18B20DS18B20 is the single bus digital temperature sensor from American Dallas Company. DS18B20 is consisted of the 64 figures ROM engraved by laser, the temperature sensitivity component, non-volatile temperature alarms trigger (Device TH and TL).DS18B20 communicates with the microprocessor by the single bus portand the test range of DS18B20 is from -55 centigrade to +125 centigrade, and the incremental value is 0.5 centigrade. The temperature can be changed into figures within 720ms and each DS18B20 has the sole 64 figures serial number. The specific content is revealed as Fig 1: There are two 8 figures storages (No.0 and No.1) for storing temperature value in DS18B20. No.0 storage stores complement of the temperature value, and No.1 stores symbols of the temperature value. The user can define non-volatile temperature alarms sets and distinguish the alarms search order and seek the component temperature alarms state outside the scheduled limit. There are two alternative ways of power supply: Signal bus high-level borrow power is adopted, or the +5v power supply externally is adopted directly.Fig 1 DS18B20 64bit ROMⅢ. APPLICATION THE GROUPING TEST METHOD This paper illustrates the grouping method with the interface of DS18B20 and 89C52. Assuming the amount of the buses on P1 port is 4 and the temperature test system needs 100 DS18B20 sensors, which can be distributed equally to the 4 I/O lines. If the number of sensors cannot be divided by the number of buses even, the number disparity of sensorson buses is no more than one, which can be handled while reading numbers. The power is supplied externally. Owning to the synchronistic conversion in each DS18B20, the intense current is needed, and the signal bus cannot be used for the power supply, otherwise the system cannot work in order. The schematic circuit is shown as Fig 2 (the DS18B20 signal buses of the same group are hung on some buses of P1 port). When read and write the DS18B20, the strict schedule must be kept. First a reversion pulse is sent to all DS18B20. After the reversion, Skip ROM order is sent to each circuitsimultaneously from the I/O port, and the conversion order is sent, then all sensors begin transform. After the conversion, Match Rom order is sent to each circuit simultaneously, and 64 bits serial number is sent. DS18B20 is selected for each group, and Scratch Pad data is read. Finally the data is transformed. The data of serial-read is transformed into the actual temperature value. One alternate test is finished after the DS18B20 temperature data is read completely by the cyclical reading for 25 times. The whole flow chart is shown as Fig 3.Fig 3 the diagram of collecting temperature by grouped DS18B20Now the time-consuming in the test system of the singlebus and the grouping analyses method is illustratedrespectively. The reversion time sequence and the time sequence of writing and reading one bit for themicroprocessor are revealed in figures 4-6. The figure show:The reversion period of DS18B20 is 495us-1020us;thewriting period of one bit is 60us-120us;the reading period ofone bit is above 60us; the span of writing or reading the nextbit is 1us. As the A/D conversion time is 97.35ms (9precisions), if it is counted by the shortest way, the totaltime-consuming of alternate test is calculated respectively asfollows:(1) Single bus495us+2*(8*60+7)us+97.35ms+495us+100*(64*60+63+8*60+7+9*60+8)us=552.53 4ms(2) Grouping mode495us+2*(8*60+7)us+97.35ms+20(64*60+63+8*60+7+9*60+8)us=189.804msAs the small proportion of the numeration systemconversion and the storage time in the whole period, theunknown crystal-oscillator frequency, the numeration system conversion and storage time is not counted. Accordingly, thealternate test time which grouping mode consumes is muchshorter than single bus mode obviouslyFig 4 DS18B20 reversion time sequenceFig 4 DS18B20 reversion time sequenceIV. EXAMPLE OF THE DESIGNThe asphalt transportation vehicle is the maintransportation equipment between the material field and roadsurface. The unavoidable temperature decreasing because ofthe asphalt transportation vehicle’s long working andtransportation distance influences the paving quality of theroad surface, the specific measures must be taken accordingto the heat release of the shell. This paper designed a set ofwireless temperature using DS18B20 grouping mode testsystem for testing the temperature of the asphalttransportation vehicle shell, and the total points is 120.Temperature test system software adopts the modular design.The hypogenous machine collects data, stores data, sets upDS18B20, and sends the wireless module and so on. Theepigenous machine adopts PC machines, mainly receives thetemperature data from the hypogenous machine. Theepigenous machine displays, stores and manages data. Thesimple communication between people and machines isperformed by the epigenous machine. This paper will notillustrate the simple procedure of the epigenous machine indetail. The following is the illustration of parts of hypogenous machine. including the components of system hardware ,software functions and process.A. System hardwareConsidering the multipoint temperature number of thetemporary storage and the considerable internal RAM duringthe value conversion, the chief controlling chip adoptsATMEL 89C52 Single-Chip Microcomputer with 256 bytesRAM and 8KBE2PROM procedure storage. As thedistinguishable code of DS18S20 is read and numbered, theliquid crystal module (Ao Kela Chinese integrated module ofOCMJ Jin Peng Company) and the keyboard module areadded. The wireless digital transmission adopts the wireless module PTR2000 in the whole reception-sending form, which may has two amateur bands to choose and the regulative BaudRate ( the max is 20Kbit/s), and the Single-ChipMicrocomputer serial port data can be received directly. Thesystem hardware structure is shown as Fig 7:DS18B20, with the power supply, divided into 8 groupshung on P1 port(P1.0-P1.7). The wireless module is hung onserial port directly and the hardware watchdog adopts theMAX813 chip. When the power is added to the system, the89C52 reversion signal is transmitted from the MAX813reversion pin, and the value of the reversion pulse is 200ms.When the procedure is in order, a pulse signal must be sent toMAX813 WDI pin in no more than the interval of 1.6s toclear away thewatch-dog timer. If the interval is more than1.6s, the pin does not receive the pulse signal, and then the89C52 must be reversed. As 120 DS18B20 serial numbersmust be stored in the system, the data storage DS1225 (8K)against the power failure is developed.B. System software function and processThe software part of the temperature test system numbersDS18B20, collects and transforms data, performs the wirelesscommunication, manages keyboard and so on. For theconvenience of the procedure debugging and the reliability,the module design is adopted, mainly including the keyboardprocessing module, the wireless communication module, themodule of temperature collection and processing, the displaymodule and so on. The software flow chart is shown as Fig 8 After the reversion of add power 89C52 self-checks first, then allocates each branch procedure module. The chiefprocedure manages the keyboard, initializes the system and transfers each functional module. The haul line is kept toperform DS18B20 edit mission. 120 points serial number ofDS18B20 is read by the keyboard and display coordinationand numbered into DS1225Y. First the wireless module is set up as the reception state to receive the collection parameters and start the order (The transmission content is sent by pack ; the same content is sent for three times ; two out of three logic is performed according to the bit).The wireless module is set up as the sleep state during theconversion and the transforming state during the temperaturedata transmission. Packing sends the temperature data and theDS18B20 numbers in the system to epigenous machine. The parts of collection and conversion start the DS18B20conversion, read the temperature data by grouping methods,store data and so on. The following procedure is the main content of collecting and conversion modules:void Get_ Temperature(void){ uchar i,j , temp_ lsb, temp_ msb;for(i=0;i<8;i++){skip_rom(i);//skip over the serial numbers to checkwrite_bytes(0x44 );}//transform the temperature in each circuit at the same timefor(j=0;j<100;j++)// prolong the time for 0.1s; wait for the end of conversion{delay(1000);}For(j=0;j<15;j++){ match_ rom(j); read_ scratchpads (j); }//each temperature value is read in 8 busesfor(j=0;j<120;j++){temp_lsb = temp_pad[j][0] ;//the data conversion of the temperature valuetemp_msb = temp_pad[j][1] ;temp_lsb >>= 4 ; temp_msb <<= 4 ;temp_lsb |=temp_msb; temp_msb = (temp_lsb/10) ;temp_msb <<=4 ; temp_lsb %= 10 ;temp_lsb |=temp_msb; temperature_ vel[j] =temp_lsb;}}V. CONCLUSIONAuthors create the following new ideas1)Alternate test time difference of the multipointtemperature test system in the grouping method and the singlebus method is analyzed, then the alternate test speed can beincreased greatly by grouping method.2)A set of wireless multipoint temperature test system isdesigned by DS18B20 grouping method. This system isapplied to the technology reform of the asphalt transportationvehicle in some domestic large-scale engineering mechanicalcompany and the good result of the application is achieved.REFERENCES[1] ShenJin,SongJingLing. An All-digital Temperature Measuring SystemUsed in Grain Barns.Transaction of the chese society for Agricultural Machinery,2001,(2):89 91.[2] LiMinHui, Jung Deqiong. A Device of Temperature MeasuremenMade upofDS1820 and AT89C205. Journal of Sichan NormalUniversity1997,(5):93-96 [3] Qi ZhiCai Gai Shuang. Embedded Control System of the CentralAir conditioner Room,InstrumentTechnique and Sensor2002,(5):25-26.[4] ZhangPeiren ZhouYanping. A Large-Scale Temperature AlarmSystem Based on 1 Wire Bus and CAN bus, Control&Automation2003,(2):25-26译文:基于DS18B20分组方式温度测试系统设计摘要:当用于多点测温时,所有的DS18B20传感器都连接在单片机的某根总线上,采用轮流采集温度数据的方式。
基于DS18B20的啤酒发酵温度测控系统毕业设计外文资料翻译
中文3200字毕业设计外文资料翻译题目基于DS18B20的啤酒发酵温度测控系统学院自动化与电气工程学院专业自动化班级自动化xxxx班学生xxxxxxxxx学号20100321166指导教师xxxxx二〇一四年三月三十一日Advanced Materials Research Vols. 108-111 (2010) pp 898-902© (2010) Trans Tech Publications, Switzerlanddoi:10.4028//AMR.108-111.898Temperature Detecting System of Beer FermentationBased on DS18B20Fen-Ping Zhou, Hong-Tao Ma, Bing-Dong Sui,and Jia-Mo Sun College of Information Science & Engineering, Hebei University of Science and TechnologyHebei, Shijiazhuang 050054, Chinazhoufenping@,mahongtao@suibd@,sunjiamo@Keywords: DS18B20, Temperature Detecting, Beer Fermentation, Bus-driving, Fault Detecting Abstract.This Paper introduces a temperature detection system in beer fermentation. A temperature monitoring system with characteristics of bus topology structure is composed of industrial computer, temperature detector, bus converter, transmission bus and especially 1-wire digital temperature sensor DS18B20. Four-core cable is used to form a tree-like or star-like network, in which 54 digital temperature sensors existing on 18 fermentation tanks can be connected.The quantity of junction wires between temperature sensor and computer will be reduced greatly.Temperature detector provides power supply for bus converter and DS18B20 through Four-core cable. Because bus converter has used hardware fault detecting technology, the fault temperature sensor can automatically detach from the main bus and will not affect normal working of other sensor in network. So to solve the problem of a certain sensor or branch's damage causing the paralysis of entire bus. The length of detecting temperature bus can reach more than 500 meters. These all make system maintenance and expansion easy. The experiments show that this system is characterized by high intelligence, high-precision, capability of making temperature test on multi-points and compensating function. The method has a good applicable value to the temperature test..IntroductionThe change of fermentation temperature has a greater impact on the quality of beer in the process of beer production. Many fermentation tanks are used to ferment beer in a brewery. A few sensors are installed in each fermentation tank to measure the temperature of liquid. The temperature monitoring system is characterized by greater number of temperature measurement points, the temperature measurement points are relatively concentrated.The traditional temperature detection system is compose of sensor, transmitter, A/D converter and so on. When there exist many detected points, the moretransmitter and junction wires are needed, which not only makes the cost increase, and also brings usmany inconvenience. DALLAS Corp of United States first produced 1-wire digital temperature sensor DS1820, and then an enhanced product DS18B20 is released. The DS18B20 is a kind of digital temperature sensor of high integration, which consists of 64-bit laser ROM, temperature sensor, 1-wire interface, scratchpad RAM, temperature alarm triggers TH and TL, 8-bit CRC generator, control logic and parasitic power [1]. The measuring temperatures of DS18B20 is range from -55°C to +125°C, which precision is ±0.5°C and resolution is programmable from 9 to 12 bits. It adopts 3-pin (GND, DQ, VDD), TO-92 package. Each DS18B20 has the unique 64-bit laser ROM address code [1]. A lot of DS18B20 can be connected to the same bus to detect the temperature without any external components. This feature is very well suitable for multi-point distributed temperature detection, and is convenient to constitute bus-type temperature detection system.The Composition of the SystemThe composition of temperature monitoring system of Beer fermentation is shown in Figure 1. Industrial Computer is responsible for the work of displaying temperature data, generating the curve of temperature change, and temperature chart printing and so on. Temperature detector can be connected to industrial computers through the RS-232 interface. It controls the working condition of all the temperature sensors through transmission bus, and collects temperature data of 18 fermentation tanks in accordance with industrial computer commands. Temperature Detector is connected to 3 bus converter through the transmission bus, each bus converter can be connected to 6 fermentation tanks; there are 3 temperature sensors (DS18B20) in each fermentation tank. The temperature monitoring system contains 54 temperature measurement points in 18 fermentation tanks. Transmission bus adopts the four-core cables;Temperature detector provides power supply for bus converter and DS18B20 through transmission bus. There is a bus driver in temperature detector; it can drive more than 500 meters transmission bus. If you need increase the number of temperature measurement points, more bus converters can be connected to transmission bus in order to achieve linking of more DS18B20s. The number of the DS18B20 can be connected up to more than 300 at most.The Design of Temperature DetectorThe composition of the temperature detector is shown in Figure 2, AT89C51 microcontroller is the core of the temperature detector to control the work of the various circuits. Control program is stored in the MCU's internal program memory. Data memory saves the temperature data of each detection point. 64-bit code memory saves laser ROM code of each temperature sensor (DS18B20).MCU's serial signals are converted to RS-232C standard through RS-232 interface to realize the connection of industrial computer and the temperature detector. Bus driver extends the driving capability of MCU's I/O port to drive the transmission bus, in order to obtain further transmission distance. Watchdog and reset circuit can provide power-on reset for the microcontroller, they can also provide reset signal when program has been confused by accidentally interfering. Display is used to show the current number of fermentation tanks and temperature value of 3 sensors in fermentation tanks. The keyboard is used to control the temperature detector starting and stopping, but also enter the testing cycle and other control parameter.Temperature detector can work independently, and display the number of fermentation tank and temperature value of 3 detected points in this tank, the range of temperature shown is -19.9°C ~ 99.9°C. The number of tank shown can automatically change in cycle. Time shown can be set arbitrarilyduring 1~99 seconds. Temperature detector is also able to accept orders of industrial computer, it transmits the temperature value to the industrial computer, and then the industrial computer completes data processing.The Design of Bus Driver and Bus ConverterTheoretically, lots of DS18B20s can be connected to one bus in parallel. However, the operating time slot of DS18B20 is fixed, and the width of many control impulses is so narrow that it is only few microseconds. In fact, we can seldom meet the need of the operating time slot of DS18B20 because of the limit of driving ability and distributing parameters. Especially the increase of distributing capacitance of the over-long bus will make the distortion of waveform unavoidable, so the read/write error occurs. The recommended length of the bus by the DALLAS Corporation is only 100 meters, and 20 DS18B20s can be connected to it at same time, hence, the application is limited [2,4]. In order to solve this problem, we have designed transmission bus and its driver. The composition of bus driver and bus converter is shown in Figure 3. Transmission bus includes two signal lines TXD and RXD. Bus driver adopts 74HC367-type logical circuit to expand the driving ability of TXD port in A T89C51, thus it completes to drive TXD line of transmission bus. The length of bus can be reached 500 meters. Multiple bus converters can be connected to a transmission bus to form “tree” or “star” network. Bus converter connects the transmission bus and the temperature sensor DS18B20 and completes the signal conversion between them. DS18B20 return signal is transmitted to the terminal RXD of the bus through the driver. The driver in bus converter also uses 74HC367-type logic circuit.The driver we mention here is different with the address switch of DALLAS corporation MicroLANs network [3]. The drivers on the bus are all connected to each other. When the skipping ROM command is sent to DS18B20s, all DS18B20s existing on the bus can receive it. This feature allows us to start temperature conversion of all the DS18B20s existing on the same bus. The temperature detector can acquire the temperature of the different serial number detecting-point by sending different address. This will greatly reduce the temperature detection cycle, thereby increasing the temperature detection speed. The Technology of Hardware Fault DetectingWhen one power line or data line of any DS18B20 in the system is short to the ground, it will cause the whole bus stop working. To avoid this problem, we have designed hardware fault detecting andprocessing circuits for the system. On the one hand, it limits the short circuit current under 10mA; on the other hand disconnects the failure branch from the transmission bus. The composition of hardware fault detecting and processing circuit see Figure 3. Fault detecting circuit tests the logic level of 1-wire interface, when the logic level is high, its output signal is “1”and driver of converter is s hutdown; when the logic level is low, its output signal is “0” and driver of converter is open. If logic level is low and its duration is more than 10ms, according to these phenomena, we can judge hardware failure occurring, temporality, the output signal is “1”, and the driver of converter will be a permanent shutdown. Thus, only failure DS18B20 is disconnected from transmission bus, the other DS18B20s can work normally. Although a bus converter can be connected to 30 DS18B20s, when short-circuit fault occurs in one of DS18B20s, the other 29 DS18B20s will stop working. If each DS18B20 can work independently and it has no effect to others when there is short-circuit fault occurring in one of them, it is necessary for each DS18B20 equipped with a bus converter. One transmission bus can connect more than 300 converters. The Design of Management Software Software of the temperature monitoring system is developed under VISUAL BASIC 6.0, it is responsible for the work of acquiring real-time temperature, sensor temperature compensating,displaying multi-point temperature value, showing temperature variation curve, the temperature value statements and the temperature variation curve printing.Module of acquiring real-time temperature is realized through Serial communication between the industrial Computer and temperature detector. Serial communication adopts RS-232C standard, the baud rate of data transfer is the 9600 bit/s, the data format is 8 data bits, 1 parity bit, and 1 stop bit. Industrial computer collects temperature value of 54 test points in 18 fermentation tanks once every 1 minute, then temperature data is saved in the computer hard disk in the format of a text file, in order to generate the temperature statements and curves of temperature change.Module of sensor temperature compensating is used to calibrate error of the sensor. It is ±0.5°C accuracy from -10°C to +85°C in DS18B20 [1]. In order to improve the measurement accuracy, we have set up temperature compensation for each one temperature measurement point in the management software. The range of temperature compensation is ±5°C, the resolution is 0.01°C. Temperature compensation data requires to be inputted manually.Module of displaying multi-point temperature value is used to display the current temperature of the 54 test points in the 18 fermentation tanks; the display interface is shown in Figure 4. You can find the number of fermentation tanks and temperature value of the three test points in fermentation tanks from monitor. Three test points are ranked by the upper, middle and lower. The interface contains quick button of temperature curve, by clicking on the mouse, you can switch to the display interface of temperature change curve. It also displays the communications status and the number of the fermentation tank in which the temperature data is being sampled.ConclusionWith the use of digital temperature sensor DS18B20, a tree-like or star-like network topology is achieved, which simplifies the hardware design of the temperature monitoring system and reduces the cost of system. Hardware fault detection technology and its continuous improvement make the reliability of temperature detection system greatly improved. Bus driver and bus converters adopt 74HC series logic circuits, with very low static power consumption. The temperature monitoring system has been running for more than four years. The practice shows that the system is simple in connecting wire,convenient in maintenance, and is also low cost, high dependability and good effect. It has excellent application prospect.References[1] Dallas Semiconductor, DS18B20 Programmable Resolution 1-Wire Digital Thermometer. (2003)[2] Dallas Semiconductor, MicroLAN - In the Long Run, Application Note 108. (2001)[3] Dallas Semiconductor, Complex MicroLANs, Application Note 106. (2001)[4] Dallas Semiconductor, Guidelines for Reliable 1-Wire Networks, Application Note 148. (2002)Advanced Materials Research Vols. 108-111 (2010) pp 898-902© (2010) Trans Tech Publications, Switzerlanddoi:10.4028//AMR.108-111.898基于DS18B20的啤酒发酵温度测控系统周芬萍马鸿涛隋秉栋孙佳莫河北工业大学信息科学与工程学院中国,河北,石家庄050054zhoufenping@ mahongtao@ suibd@ sunjiamo@ 摘要:本文介绍了一种在啤酒发酵时使用的温度检测系统。
单片机和DS18B20的温度控制系统设计中英文献翻译
大学毕业论文(设计)外文文献翻译申请学位:工学学士学位院系:学院专业:电子信息工程姓名:学号:指导教师:201x年5月28日大学DS18B20 Digital ThermometerDESCRIPTIONThe DS18B20 Digital Thermometer provides 9 to 12-bit (configurable) temperature readings which indicate the temperature of the device.Information is sent to/from the DS18B20 over a 1-Wire interface, so that only one wire (and ground) needs to be connected from a central microprocessor to a DS18B20. Power for reading, writing, and performing temperature conversions can be derived from the data line itself with no need for an external power source.Because each DS18B20 contains a unique silicon serial number, multiple DS18B20s can exist on the same 1-Wire bus. This allows for placing temperature sensors in many different places. Applications where this feature is useful include HV AC environmental controls, sensing temperatures inside buildings, equipment or machinery, and process monitoring and control.FEATURESUnique 1-Wire interface requires only one port pin for communicationMultidrop capability simplifies distributed temperature sensing applicationsRequires no external componentsCan be powered from data line. Power supply range is 3.0V to 5.5VZero standby power requiredMeasures temperatures from -55°C to+125°C. Fahrenheit equivalent is -67°F to +257°FThermometer resolution is programmable from 9 to 12 bitsConverts 12-bit temperature to digital word in 750 ms (max.)User-definable, nonvolatile temperature alarm settingsAlarm search command identifies and addresses devices whose temperature is outside of programmed limits (temperature alarm condition)Applications include thermostatic controls, industrial systems, consumer products,thermometers, or any thermally sensitivesystem.PIN ASSIGNMENTPIN DESCRIPTIONGND - GroundDQ - Data In/OutVDD - Power Supply V oltageNC - No ConnectDETAILED PIN DESCRIPTIONOVERVIEWThe block diagram of Figure 1 shows the major components of the DS18B20. The DS18B20 has four main data components: 1) 64-bit lasered ROM, 2) temperature sensor, 3) nonvolatile temperature alarm triggers TH and TL. The device derives its power from the 1-Wire 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 1-Wire line until it returns high to replenish the parasite (capacitor) supply. As an alternative, the DS18B20 may also be powered from an external 3 volt - 5.5 volt supply.DS18B20 BLOCK DIAGRAM Figure 1Communication to the DS18B20 is via a 1-Wire port. With the 1-Wire port, the memory and control functions will not be available before the ROM function protocol 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 64-bit lasered ROM portion of eachdevice and can single out a specific device if many are present on the 1-Wire 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 control function command instructs the DS18B20 to perform a temperature measurement. The result of this measurement will be placed in the DS18B20’s scratch-pad memory, and may be read by issuing a memory function command which reads the contents of the scratchpad memory. The temperature alarm triggers TH and TL consist of 1 byte EEPROM each. If the alarm search command is not applied to the DS18B20, these registers may be used as general purpose user memory. The scratchpad also contains a configuration byte to set the desired resolution of the temperature to digital conversion. Writing TH, TL, and the configuration byte is done using a memory function command. Read access to these registers is through the scratchpad. All data is read and written least significant bit first.1-WIRE BUS SYSTEMThe 1-Wire bus is a system which has a single bus master and one or more slaves. The DS18B20 behaves as a slave. The discussion of this bus system is broken down into three topics: hardware configuration, transaction sequence, and 1-Wire signaling (signal types and timing).HARDWARE CONFIGURATIONThe 1-Wire 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 attached to the 1-Wire bus must have open drain or 3-state outputs. The 1-Wire port of the DS18B20 (DQ pin) is open drain with an internal circuit equivalent to that shown in Figure 9. A multidrop bus consists of a 1-Wire bus with multiple slaves attached. The 1-Wire bus requires a pullup resistor ofThe idle state for the 1-Wire 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 1-Wire bus is in the inactive (high) state during the recovery period. If this does not occur and the bus is left low for more than 480 s, all components on the bus will be reset.HARDWARE CONFIGURATIONTRANSACTION SEQUENCEThe protocol for accessing the DS18B20 via the 1-Wire port is as follows:_ Initialization_ ROM Function Command_ Memory Function Command_ Transaction/DataINITIALIZATIONAll transactions on the 1-Wire 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 DS18B20 is on the bus and is rea dy to operate. For more details, see the “1-Wire 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 8 bits long. A list of these commands follows (refer to flowchart in Figure 5)Read ROM [33h]This command allows the bus master to read the DS18B20’s 8-bit family code, unique 48-bit serial number, and 8-bit CRC. This command 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 command, followed by a 64-bit ROM sequence, allows the bus master to address a specific DS18B20 on a multidrop bus. Only the DS18B20 that exactly matches the 64-bit ROM sequence will respond to the following memory function command. All slaves that do not match the 64-bit ROM sequence will wait for a reset pulse. This command can be used with a single or multiple devices on the bus.Skip ROM [CCh]This command can save time in a single drop bus system by allowing the bus master to access the memory functions without providing the 64-bit 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 [F0h]When a system is initially brought up, the bus master might not know the number of devices on the 1-Wire bus or their 64-bit ROM codes. The search ROM command allows the bus master to use a process of elimination to identify the 64-bit ROM codes of all slave devices on the bus.Alarm Search [ECh]The flowchart of this command is identical to the Search ROM command. However, the DS18B20 will respond to this command only if an 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 non-alarming 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.Example of a ROM SearchThe ROM search process is the repetition of a simple three-step routine: read a bit, read the complement of the bit, then write the desired value of that bit. The bus master performs this simple, three-step routine on each bit of the ROM. After one complete 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 1-Wire 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 command on the 1-Wire bus.3. The bus master reads a bit from the 1-Wire bus. Each device will respond by placing the value of the first bit of their respective ROM data onto the 1-Wire bus. ROM1 and ROM4 will place a 0 onto the 1-Wire bus, i.e., pull it low. ROM2 and ROM3 will place a 1 onto the 1-Wire 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 command is being executed,all of the devices on the 1-Wire bus respond to this second read by placing the complement of the first bit of their respective ROM data onto the 1-Wire bus. ROM1 and ROM4 will place a 1 onto the 1-Wire, allowing the line to stay high. ROM2 and ROM3 will place a 0 onto the 1-Wire, thus it will be pulled low. The bus master again observes a 0 for the complement of the first ROM data bit. The bus master has determined that there are some devices on the 1-Wire bus that have a 0 in the first position and others that have a 1. The data obtained from the two reads of the three-step routine have the following interpretations: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 1-Wire bus.5. The bus master performs two more reads and receives a 0-bit followed by a 1-bit. Thisindicates 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 0-bits. This indicates that both 1-bits and 0-bits exist as the 3rd bit of the ROM data of the attached devices.8. The bus master writes a 0-bit. This deselects ROM1, leaving ROM4 as the only device stillconnected.9. The bus master reads the remainder of the ROM bits for ROM4 and continues to access the part ifdesired. This completes the first pass and uniquely identifies one part on the 1-Wire bus.10. The bus master starts a new ROM search sequence by repeating steps 1 through 7.11. The bus master writes a 1-bit. This decouples ROM4, leaving only ROM1 still coupled.12. The bus master reads the remainder of the ROM bits for ROM1 and communicates to the underlying logic if desired. This completes the second ROM search pass, in which another of the ROMs was found.13. The bus master starts a new ROM search by repeating steps 1 through 3.NOTE:The bus master learns the unique ID number (ROM data pattern) of one 1-Wire device on each ROMSearch operation. The time required to derive the part’s unique ROM code is:The bus master is therefore capable of identifying 75 different 1-Wire devices per second. Single chip brief introduction:The monolithic integrated circuit said that the monolithic micro controller, it is not completes some logical function the chip, but integrates a computer system to a chip on. Summary speaking: A chip has become a computer. Its volume is small, the quality is light, and the price cheap, for the study, the application and the development has provided the convenient condition. At the same time, the study use monolithic integrated circuit is understands the computer principle and the structure best choice.The monolithic integrated circuit interior also uses with the computer function similarmodule, for instance CPU, memory, parallel main line, but also has with the hard disk behave identically the memory component7 what is different is its these part performance is opposite our home-use computer weak many, but the price is also low, generally does not surpass 10 Yuan then Made some control electric appliance one kind with it is not the 'very complex work foot, We use now the completely automatic drum washer, the platoon petti-coat pipe: VCD and so on Inside the electrical appliances may see its form! It is mainly takes the control section the core part.It is one kind of online -like real-time control computer, online -like is the scene control, needs to have the strong antijamming ability, the low cost, this is also and the off-line type computer (for instance home use PC,) main differenceThe monolithic integrated circuit is depending on the procedure, and may revise. Realizes the different function through the different procedure, particularly special unique some functions, this is other component needs to take the very big effort to be able to achieve, some are the flowered big strength is also very difficult to achieve. One is not the very complex function, if develops in the 50s with the US 74 series, or the 60s's CD4000 series these pure hardware do decides, the electric circuit certainly arc a big PCB board ! But if, if succeeded in the 70s with the US puts in the market the series monolithic integrated circuit, the result will have the huge difference. Because only the monolithic integrated circuit compiles through you the procedure may realize the high intelligence, high efficiency, as well as redundant reliabilityThe CPU is the key component of a digital computer. Its purpose is to decode instruction received from memory and perform transfers, arithmetic, logic, and control operations with data stored in internal registers, memory, or I/O interface units. Externally, the CPU provides one or more buses for transferring instructions, data, and control information to and from components connected to it. A microcontroller is present in the keyboard and in the monitor in the generic computer; thus these components are also shaded. In such microcontrollers, the CPU may be quite different from those discussed in this chapter. The word lengths may be short, the number of registers small, and the instruction sets limited. Performance, relatively speaking, is poor, but adequate for the task. Most important, the cost of these microcontrollers is very low, making their use cost effective.Because the monolithic integrated circuit to the cost is sensitive, therefore present occupies the dominant status the software is the most preliminary assembly language7 it was except the binary machine code above the most preliminary language, since why were such preliminary must use?Why high-level did the language already achieve the visualization programming level not to use? The reason is very simple, is the monolithic integrated circuit docs not have home computersuch CPU, and also has not looked like the hard disk such mass memory equipment. Inside even if a visualization higher order language compilation script only then a button, also will achieve several dozens K the sizes! Does not speak anything regarding the home use PC hard disk, but says regarding the monolithic integrated circuit cannot accept. The monolithic integrated circuit in the hardware source aspect's use factor must very Gao Caixing, therefore assembly, although primitive actually massively is using, Same truth, if attains supercomputer's on operating system and the application software home use PC to come up the movement, home use PC could also not withstand.It can be said that the 20th century surmounted three "the electricity" the time, namely the electrical time, the Electronic Age and already entered computer time. However, this kind of computer, usually refers to the personal computer, is called PC machine. It by the main engine, the keyboard, the monitor and so on is composed. Also has a kind of computer, most people actually not how familiar. This kind of computer is entrusts with the intelligence each kind of mechanical monolithic integrated circuit (also to call micro controller). , This kind of computer's smallest system only has used as the name suggests a piece of integrated circuit, then carries on the simple operation and the control. Because its volume is small, usually hides in is accused the machinery "the belly". It in the entire installment, plays is having like the human brains role, it went wrong, the entire installment paralyzed. Now, this kind of monolithic integrated circuit's use domain already very widespread, like the intelligent measuring appliance, the solid work paid by time control, the communication equipment, the guidance system, the domestic electric appliances and so on, Once each product used the monolithic integrated circuit, could get up causes the effect which the product turned to a new generation, often before product range crown by adjective---- ‘intelligence’, like intelligence washer and so on. Now some factory's technical personnel or other extra-curricular electronic exploiter do certain products, are not the electric circuit are too complex, is the function is too simple, and is imitated extremely easily. Investigates its reason, possibly on card, in the product has not used on the monolithic integrated circuit or other programmable logical component.DS18B20 数字温度计描述DS18B20 数字温度计提供9至12位温度读数,指示器件的温度。
外文资料翻译---智能温度传感器DS18B20的原理及其应用
外文资料翻译资料来源:第七届国际测试技术研讨会文章名:The Principle of the Intelligent Temperature Sensor DS18B20and Its Application作者:LI Shuo LI Xiaomi文章译名:智能温度传感器DS18B20的原理与测量姓名:学号:指导教师(职称):专业:班级:所在学院:译文智能温度传感器DS18B20的原理及其应用摘要:功能和结构的数字本文介绍了温度测量芯片DS18B20的温度测量系统的介绍,8051单片机作为其作品CPU和DALLAS18B20其温度数据收集 - 转换。
硬件的原理,软件程图和一个短暂的时间延迟子程序也都给予列出。
关键词:DS18B20温度传感器,单片机微机,硬件设计一、导言单轨数字温度传感器DS18B20的生产由美国DALLAS公司。
它可以转换的温度信号成字信号提供的微电脑处理直接。
与传统的相比热敏电阻器,它可以直接读出的措施温度并根据实际它可以actualize 9〜12的数值读数方式通过简单的编程。
信息读取或写入DS18B20的,只需要一个单一的线。
温度变换功率来源于为主线,主线本身可以供电源DS18B20的,不需要额外的电源。
因此,如果使用DS18B20的,系统的结构会更简单,更可靠。
因为每个DS18B20包含一个独特的硅序列号,多个DS18B20s 可以存在于相同的1-Wire总线。
这允许浇筑温度传感器在许多不同的地方。
应用场合此功能是有用的,包括HVAC环境控制,检测建筑物内的温度,设备或机械,过程监测和控制。
二、 DS18B20的结构DS18B20的四个组成部分的主要数据:(1)64位光刻ROM(2)温度传感器(3)非易失性温度报警触发器TH和TL(4)配置寄存器。
设备源于其权力从1-Wire通信线通过储能在一段时间的内部电容当信号线为高,并继续操作此期间的低倍的电源关闭1-Wire线,直到它返回来补充高寄生虫(电容器)供应。
DS18B20官方英文版
1 2 3 4 8 7 6 5
VDD N.C. N.C. N.C.
1 2 3
(BOTTOM VIEW)
µSOP (DS18B20U)
18B20
TO-92 (DS18B20)
1-Wire is a registered trademark of Maxim Integrated Products, Inc.
PIN DESCRIPTION
PIN SO 1, 2, 6, 7, 8 3 4 5 µSOP 2, 3, 5, 6, 7 8 1 4 TO-92 — 3 2 1 NAME N.C. VDD DQ GND No Connection Optional VDD. VDD must be grounded for operation in parasite power mode. Data Input/Output. Open-drain 1-Wire interface pin. Also provides power to the device when used in parasite power mode (see the Powering the DS18B20 section.) Ground FUNCTION
PIN CONFIGURATIONS
MAXIM 18B20 1 2 3 VDD DQ
3 4
N.C. N.C.
1
8
N.C. N.C. N.C. GND
MAXIM 18B20
2
7 6 5
SO (150 mils) (DS18B20Z)
FEATURES
Unique 1-Wire® Interface Requires Only One Port Pin for Communication Each Device has a Unique 64-Bit Serial Code Stored in an On-Board ROM Multidrop Capability Simplifies Distributed Temperature-Sensing Applications Requires No External Components Can Be Powered from Data Line; Power Supply Range is 3.0V to 5.5V Measures Temperatures from -55°C to +125°C (-67°F to +257°F) ±0.5°C Accuracy from -10°C to +85°C Thermometer isof User Selectable Pin ConfigurationsResolution appear at end data sheet. from 9 to 12 Bitscontinued at end of data sheet. Functional Diagrams Converts Temperature 12-BitProducts, Digital Inc. Word in UCSP is a trademark of Maxim to Integrated 750ms (Max)
DS18B20中英文数据手册1233
数据也可以通过召回EEPROM命令从暂存器载入EEPROM。总线控制器在发出 这条 命令后发出读时序,DS18B20返回0表示正在召回中,返回1表示操作结束。 DS18B20 存储器图图7
*上电状态依赖于EEPROM中的值
配置寄存器
存储器的第4位为配置寄存器,其组织见图8。用户可以通过按表3所示设置R0 和R1位来设定DS18B20的精度。上电默认设置:R0=1,R1=1(12位精度)。注 意: 精度和转换时间之间有直接的关系。暂存器的位7和位0-4被器件保留,禁止写 入;在读回数据时,它们全部表现为逻辑1。 配置寄存器图8
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
中英文资料对照外文翻译DS18B20 数字温度计描述DS18B20 数字温度计提供9至12位温度读数,指示器件的温度。
信息经过单线接口送入DS18B20或送出,因此从中央处理器到DS18B20仅需连接一条(和地)。
读、写和完成温度变换所需的电源可以有数据线本身提供,而不需要外部电源。
因为每一个DS18B20有唯一的系列号,因此多个DS18B20可以存在于同一条单线总线上。
这允许在许多不同的地方放置温度灵敏器件。
此特性的应用范围包括HVAC环境控制,建筑物、设备或机械内的温度检测,以及过程监视和控制中的温度检测。
特性独特的单线接口,只需一个接口引脚即可通信。
多点能力使分布式温度检测应用得以简化。
不需要外部元件。
可用数据线供电,提供3.0V到5.5V的电源。
不需备份电源。
测量范围从-55°C 到+125°C,等效的华氏温标范围是-67°F 到+257°F以9到12位数字值方式读出温度。
在750毫秒内把12位温度变换为数字。
用户可定义的,非易失性的温度警告设置。
告警搜索命令识别和寻址温度在编定的极限之外的器件(温度告警情况)。
应用范围包括恒温控制,工业系统,消费类产品,温度计或任何热敏系统。
引脚排列引脚说明GND –地DQ –数字输入输出VDD –可选的VDDNC –不连接详细引脚说明综述图1的方框图表示DS18B20的主要部件。
DS18B20有三个主要的数据部件:1)64为激光ROM,2)温度灵敏元件,3)非易失性温度告警触发器TH和TL。
器件从单线的通信线取得其电源,在信号线为高电平的时间周期内,把能量贮存在内部的电容器中,在单信号线为低电平的时间期内断开此电源,直到信号线变为高电平重新接上寄生(电容)电源为止,作为另一种可供选择的方法,DS18B20也用外部5V电源供电。
与DS18B20的通信经过一个单线接口。
在单线接口情况下,在ROM操作未定建立之前不能使用存贮器和控制操作。
主机必须首先提供五种ROM操作命令之一:1)读ROM,2)符合ROM,3)搜索ROM,4)跳过ROM,5)告警搜索。
这些命令对每一个器件的64位激光ROM部分进行操作。
如果在单线上有许多器件,那么可以挑选出一个特定的器件,并给总线上的主机指示存在多少器件及其类型。
在成功地执行了ROM操作序列之后,可使用贮存2器和控制操作。
然后主机可以提供六种存贮器和操作命令之一。
一个操作命令指示DS18B20完成温度测量。
改测量的结果放入DS18B20的高速暂存存贮器,通过发出读暂存存储器内容的存储器操作命令可以读出此结果。
每一温度告警触发器TH和TL构成一个字节的EPROM。
如果不对DS18B20施加告警搜索命令,这些寄存器用作通用用户存储器。
使用存储器操作命令可以写TH和TL。
对这些寄存器的读访问通过便簮存储器。
所以数据均以最低有效位在前的方式被读写。
单线总线系统单线总线是一种具有一个总线主机和一个或若干个从机的系统。
DS18B20起从机的作用。
这种总线系统的讨论分为三个题目:硬件接法,处理顺序,以及单线信号(信号类型与定时)。
硬件接法根据定义,单线总线只有一根线:这一点很重要的,即线上的第一个器件能在适当的时间驱动该总线。
为了做到这一点第一个连接到总线上的器件必须具有漏极开路或三态输出。
DS18B20的单线接口。
多站总线由单线总线和多个与之相连的从属器件组成。
单线总线要求近似等于5 k .单线总线的空闲状态是高电平。
不管任何原因,如果执行需要被挂起,那么,若要重新恢复执行,总线必须保持在空闲状态。
如果不满足这一点且总线保持在低电平时间大于480微秒,那么总线上所有的器件均被复位。
硬件连接图处理顺序经过单线总线接口访问DS18B20的协议如下:初始化ROM操作命令存贮器操作命令处理/数据初始化单线总线上的所有处理均从初始化序列开始。
初始化序列包括总线主机发出一复位脉冲,接着由从属器件送出存在脉冲。
ROM操作命令一旦总线主机检测到从属器件的存在,他便可以发出器件ROM操作命令之一。
所有ROM操作命令均由8位长,这些命令列表如下:读ROM [33H]此命令允许总线主机读DS18B20的8位产品系列编码,唯一的48位序列号,以及8位的CRC。
此命令只能在总线上仅有一个DS18B20得情况下可以使用。
如果总线上存在多于一个得从属器件,那么所有从片企图同时发送时将发生数据冲突的现象。
符合ROM [55h]符合ROM命令。
后继以64位的ROM数据序列,允许总线主机对多点总线上的DS18B20寻址。
只有与64位ROM序列严格相符的DS18B20才能对后继的存贮器操作命令作出响应。
所有与64位ROM序列不符的从片将等待复位脉冲。
此命令在总线数据上有单个或多个器件的情况下均可使用。
跳过ROM[CCh]在单点总线系统中,此命令通过允许总线主机不提供64位ROM编码而访问存储器操作来节省时间。
如果在总线上存在多于一个得从属器件而且在跳过ROM命令之后发出读命令,那么由于多个从片同时发送数据,会在总线上发生数据冲突搜索ROM[F0h]当系统开始工作时,总线主机可能不知道单线总线上的器件个数或者不知道其64位ROM编码。
搜索ROM命令允许总线主机使用一种消去处理来识别总线上的所有从片的64位ROM编码。
告警搜索[ECh]此命令的流程与搜索ROM命令相同。
但是,仅在最近一次温度测量出现告警的情况下,DS18B20才对此命令作出响应。
告警的条件定义为温度高于TH或低于TL。
只要DS18B20一上电,告警条件就保持在设置状态,直到另一次温度测量告警。
ROM搜索举例ROM搜索过程是简单三步过程的重复:读一位,读核位的补码,然后写所需的那一位的值。
总线主机在ROM的每一位上完成这一简单的三步过程。
在全部过程完成之后,总线主机便知道一个器件中ROM的内容,器件中其余的数以及他们的ROM编码可以游另外一个过程来识别。
以下ROM搜索过程的例子假设四个不同的器件连接到同一条单线总线上。
四个器件的ROM数据如下所示:ROM1 00110101…RO M2 10101010…ROM3 11110101…ROM4 00010001…搜索过程如下:1.总线主机通过发出复位脉冲开始初始化序列,从属器件通过发出同时的存在脉冲作出响应。
2.然后总线主机在单线总线上发出搜索人ROM命令。
3.总线主机从单线过程中读一位。
每一器件通过把他们各自ROM数据的第一位的值放到单线总线上来作出响应。
ROM1和ROM4:将把一个0放在单线总线上,即,把它拉至低电平。
ROM2和3通过使总线停留在高电平而把1放在单线总线上。
结果是线上所有器件的逻辑与,因此总线主机接收到一个0.总线主机读另一位。
因此搜索ROM数据命令正在执行,所以单线总线上所有器件通过把各自ROM数据第一位的补码放到单线总线上来对这第二个读作出响应。
ROM1和ROM2把1放在单总线上,使之处于高电平。
ROM2和ROM3把0放在单线上,因此他将被拉至低电平。
对于第一个ROM数据位的补码总线主机观察到得仍是一个0.总线主机便可决定单线总线上有一些第一位为0的器件和一些第一位为1的器件。
4.总线主机写一个0.在这次搜索过程的其余部分,将不选择ROM2和ROM3,仅留下连接到单线总线的ROM1和ROM4。
5.总线主机再执行两次读,并在一个1位之后接收到一个0位,这表示所有还连接在总线上的器件的第二个ROM数据位为0.6.总线主机接着写一个0,使ROM1和ROM4二者保持连接。
7.总线主机执行两次连读,并接收到两次0数据位。
这表示连接着的器件ROM数据的第三位都是1数据位和0数据位。
8.总线主机写一个数据位。
这将不选择ROM1而把ROM4作为唯一仍连接着的器件加以保留。
9.总线主机读ROM4的ROM数据位的剩余部分,而且访问需要的部件。
这就完成了第一个过程并且唯一的识别单线总线上的部件。
10.总线主机通过重复步骤1至7开始一个新的ROM搜索序列。
11.总线主机写一个1,这将不与ROM4发生联系,而唯一的与ROM1仍保持着联系。
12.总线主机对于ROM1读出ROM位的剩余部分而且,如果需要的话,与内部逻辑通信。
这就完成了第二个ROM搜索过程,在其中ROM中的另一个被找到。
13.总线主机通过重复步骤1至3开始一次新的ROM搜索。
注意下述内容:在第一次ROM搜索过程中,总线主机知道一个单线器件的唯一的ID号。
取得部件唯一ROM编码的时间为:960us+(8+3×64)us=13.16ms因此总线主机每秒钟能够识别75个不同的单线器件。
附:英文原文DS18B20 Digital ThermometerDESCRIPTIONThe DS18B20 Digital Thermometer provides 9 to 12-bit (configurable) temperature readings which indicate the temperature of the device.Information is sent to/from the DS18B20 over a 1-Wire interface, so that only one wire (and ground) needs to be connected from a central microprocessor to a DS18B20. Power for reading, writing, and performing temperature conversions can be derived from the data line itself with no need for an external power source.Because each DS18B20 contains a unique silicon serial number, multiple DS18B20s can exist on the same 1-Wire bus. This allows for placing temperature sensors in many different places. Applications where this feature is useful include HV AC environmental controls, sensing temperatures inside buildings, equipment or machinery, and process monitoring and control.FEATURESUnique 1-Wire interface requires only one port pin for communicationMultidrop capability simplifies distributed temperature sensing applicationsRequires no external componentsCan be powered from data line. Power supply range is 3.0V to 5.5VZero standby power requiredMeasures temperatures from -55°C to+125°C. Fahrenheit equivalent is -67°F to +257°FThermometer resolution is programmable from 9 to 12 bitsConverts 12-bit temperature to digital word in 750 ms (max.)User-definable, nonvolatile temperature alarm settingsAlarm search command identifies and addresses devices whose temperature is outside of programmed limits (temperature alarm condition)Applications include thermostatic controls, industrial systems, consumerproducts,thermometers, or any thermally sensitivesystem.PIN ASSIGNMENTPIN DESCRIPTIONGND - GroundDQ - Data In/OutVDD - Power Supply V oltageNC - No ConnectDETAILED PIN DESCRIPTIONOVERVIEWThe block diagram of Figure 1 shows the major components of the DS18B20. The DS18B20 has four main data components: 1) 64-bit lasered ROM, 2) temperature sensor, 3) nonvolatile temperature alarm triggers TH and TL. The device derives its power from the 1-Wire 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 lowtimes of the 1-Wire line until it returns high to replenish the parasite (capacitor) supply. As an alternative, the DS18B20 may also be powered from an external 3 volt - 5.5 volt supply.DS18B20 BLOCK DIAGRAM Figure 1Communication to the DS18B20 is via a 1-Wire port. With the 1-Wire port, the memory and control functions will not be available before the ROM function protocol 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 64-bit lasered ROM portion of eachdevice and can single out a specific device if many are present on the 1-Wire 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 control function command instructs the DS18B20 to perform a temperature measurement. The result of this measurement will be placed in the DS18B20’s scratch-pad memory, and may be read by issuing a memory function command which reads the contents of the scratchpad memory. The temperature alarm triggers TH and TL consist of 1 byte EEPROM each. If the alarm search command is not applied to the DS18B20, these registers may be used as general purpose user memory. The scratchpad also contains a configuration byte to set the desired resolution of the temperature to digital conversion. Writing TH, TL, and the configuration byte is done using a memory function command. Read access to these registers is through the scratchpad. All data is read and written least significant bit first.1-WIRE BUS SYSTEMThe 1-Wire bus is a system which has a single bus master and one or more slaves. The DS18B20 behaves as a slave. The discussion of this bus system is broken down into three topics: hardware configuration, transaction sequence, and 1-Wire signaling (signal types and timing).HARDWARE CONFIGURATIONThe 1-Wire 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 attached to the 1-Wire bus must have open drain or 3-state outputs. The 1-Wire port of the DS18B20 (DQ pin) is open drain with an internal circuit equivalent to that shown in Figure 9. A multidrop bus consists of a 1-Wire bus with multiple slaves attached. The 1-Wire bus requires a pullup resistor of approximately 5 k .The idle state for the 1-Wire 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 1-Wire bus is in the inactive (high) state during the recovery period. If this does not occur and the bus is left low for more than 480 s, all components on the bus will be reset.HARDWARE CONFIGURATIONTRANSACTION SEQUENCEThe protocol for accessing the DS18B20 via the 1-Wire port is as follows:_ Initialization_ ROM Function Command_ Memory Function Command_ Transaction/DataINITIALIZATIONAll transactions on the 1-Wire 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 DS18B20 is on the bus and is ready to operate. For more details, see the “1-Wire 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 8 bits long. A list of these commands follows (refer to flowchart in Figure 5)Read ROM [33h]This command allows the bus master to read the DS18B20’s 8-bit family code, unique 48-bit serial number, and 8-bit CRC. This command 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 command, followed by a 64-bit ROM sequence, allows the bus master to address a specific DS18B20 on a multidrop bus. Only the DS18B20 that exactly matches the 64-bit ROM sequence will respond to the following memory function command. All slaves that do not match the 64-bit ROM sequence will wait for a reset pulse. This command can be used with a single or multiple devices on the bus.Skip ROM [CCh]This command can save time in a single drop bus system by allowing the bus master to access the memory functions without providing the 64-bit 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 [F0h]When a system is initially brought up, the bus master might not know the number of devices on the 1-Wire bus or their 64-bit ROM codes. The search ROM command allows the bus master to use a process of elimination to identify the 64-bit ROM codes of all slavedevices on the bus.Alarm Search [ECh]The flowchart of this command is identical to the Search ROM command. However, the DS18B20 will respond to this command only if an 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 non-alarming 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.Example of a ROM SearchThe ROM search process is the repetition of a simple three-step routine: read a bit, read the complement of the bit, then write the desired value of that bit. The bus master performs this simple, three-step routine on each bit of the ROM. After one complete 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 1-Wire 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 command on the 1-Wire bus.3. The bus master reads a bit from the 1-Wire bus. Each device will respond by placing the value of the first bit of their respective ROM data onto the 1-Wire bus. ROM1 and ROM4 will place a 0 onto the 1-Wire bus, i.e., pull it low. ROM2 and ROM3 will place a 1 onto the 1-Wire 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 command is being executed,all of the devices on the 1-Wire bus respond to this second read by placing the complement of the first bit of their respective ROM data onto the 1-Wire bus. ROM1 and ROM4 will place a 1 onto the 1-Wire, allowing the line to stay high. ROM2 and ROM3 will place a 0 onto the 1-Wire, thus it will be pulled low. The bus master again observes a 0 for the complement of the first ROM data bit. The bus master has determined that there are some devices on the 1-Wire bus that have a 0 in the first position and others that have a 1. The data obtained from the two reads of the three-step routine have the following interpretations: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 1-Wire bus.5. The bus master performs two more reads and receives a 0-bit followed by a 1-bit. 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 0-bits. This indicates that both 1-bits and 0-bits exist as the 3rd bit of the ROM data of the attached devices.8. The bus master writes a 0-bit. This deselects ROM1, leaving ROM4 as the only device stillconnected.9. The bus master reads the remainder of the ROM bits for ROM4 and continues to access the part ifdesired. This completes the first pass and uniquely identifies one part on the 1-Wire bus.10. The bus master starts a new ROM search sequence by repeating steps 1 through 7.11. The bus master writes a 1-bit. This decouples ROM4, leaving only ROM1 still coupled.12. The bus master reads the remainder of the ROM bits for ROM1 and communicates to the underlying logic if desired. This completes the second ROM search pass, in which another of the ROMs was found.13. The bus master starts a new ROM search by repeating steps 1 through 3.NOTE:The bus master learns the unique ID number (ROM data pattern) of one 1-Wire device on each ROMSearch operation. The time required to derive the par t’s unique ROM code is:960 s + (8 + 3 x 64) 61 s = 13.16 msThe bus master is therefore capable of identifying 75 different 1-Wire devices per second.。