DS1820单总线数字温度计 单片机与电子技术专业毕业设计外文翻译-中英文对照

合集下载

温度传感器DS18B20_外文翻译

温度传感器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封装。

DS1820 单总线数字温度计外文翻译

DS1820 单总线数字温度计外文翻译

外文资料DS18B20 Programmable Resolution 1-Wire DigitalThermometerThe 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.The block diagram of Figure 1 shows the major components of the DS18B20. The DS18B20 has four main data components: 1) 64-bit laser ROM, 2) temperature sensor, 3) nonvolatile temperature alarm triggers TH and TL, and 4) a configuration register. 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 3V - 5.5V supply.Communication 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 laser ROM portion of each device 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.The block diagram (Figure 1) shows the parasite-powered circuitry. This circuitry “steals” power whenever the DQ or VDD pins are high. DQ will provide sufficient power as long as the specified timing and voltage requirements are met (see the section titl ed “1-Wire Bus System”). The advantages of parasite power are twofold: 1) by parasiting off this pin, no local power source is needed for remote sensing of temperature, and 2) the ROM may be read in absence of normal power.In order for the DS18B20 to be able to perform accurate temperature conversions, sufficient power must be provided over the DQ line when a temperature conversion is taking place. Since the operating current of the DS18B20 is up to 1.5 mA, the DQ line will not have sufficient drive due to the 5k pull up resistor. This problem is particularly acute if several DS18B20s are on the same DQ and attempting to convert simultaneously.There are two ways to assure that the DS18B20 has sufficient supply current during its active conversion cycle. The first is to provide a strong pull up on the DQ line whenever temperature conversions or copies to the E2 memory are taking place. This may be accomplished by using a MOSFET to pull the DQ line directly to the power supply as shown in Figure 2. The DQ line must be switched over to the strong pull up within 10 us maximum after issuing any protocol that involves copying to the E2 memory or initiates temperature conversions. When using the parasite power mode, the VDD pin must be tied to ground.Another method of supplying current to the DS18B20 is through the use of an external power supply tied to the VDD pin, as shown in Figure 3. The advantage to this is that the strong pull up is not required on the DQ line, and the bus master need not be tied up holding that line high during temperature conversions. This allows other data traffic on the 1-Wire bus during the conversion time. In addition, any number of DS18B20s may be placed on the 1-Wire bus, and if they all use external power, they may all simultaneously perform temperature conversions by issuing the Skip ROM command and then issuing the Convert T command. Note that as long as the external power supply is active, the GND pin may not be floating.The use of parasite power is not recommended above 100 C, since it may not be able to sustain communications given the higher leakage currents the DS18B20 exhibits at these temperatures. For applications in which such temperatures are likely, it is strongly recommended that VDD be applied to the DS18B20.For situations where the bus master does not know whether the DS18B20s on the bus are parasite powered or supplied with external VDD, a provision is made in the DS18B20 to signal the power supply scheme used. The bus master can determine if any DS18B20 are on the bus which require the strong pull up by sending a Skip ROM protocol, then issuing the read power supply command. After this command is issued, the master then issues read time slots. The DS18B20 wi ll send back “0” on the 1-Wire bus if it is parasite powered; it will send back a “1” if it is powered from the VDD pin. If the master receives a “0,” it knows that it must supply the strong pull up on the DQ line during temperature conversions. See “Memory Command Functions”section for more detail on this command protocol.The DS18B20 has an 8-bit CRC stored in the most significant byte of the 64-bit ROM. The bus master can compute a CRC value from the first 56-bits of the 64-bit ROM and compare it to the value stored within the DS18B20 to determine if the ROM data has been received error-free by the bus master. The equivalent polynomial function of this CRC is:1458+++=X X X CRCThe DS18B20 also generates an 8-bit CRC value using the same polynomial function shown above and provides this value to the bus master to validate the transfer of data bytes. In each case where a CRC is used for data transfer validation, the bus master must calculate a CRC value using the polynomial function given above and compare the calculated value to either the 8-bit CRC value stored in the 64-bit ROM portion of the DS18B20 (for ROM reads) or the 8-bit CRC value computed within the DS18B20(which is read as a ninth byte when the scratchpad is read). The comparison of CRC values and decision to continue with an operation are determined entirely by the bus master. There is no circuitry inside the DS18B20 that prevents a command sequence from proceeding if the CRC stored in or calculated by the DS18B20 does not match the value generated by the bus master.The 1-Wire CRC can be generated using a polynomial generator consisting of a shift register and XOR gates as shown in Figure 6. Additional information about the Dallas 1-Wire Cyclic Redundancy Check is available in Application Note 27 entitled “Understanding and Using Cyclic Redundancy Checks with Dallas Semiconductor Touch Memory Products.”The shift register bits are initialized to 0. Then starting with the least significant bit of the family code, 1 bit at a time is shifted in. After the 8th bit of the family code has been entered, then the serial number is entered. After the 48th bit of the serial number has been entered, the shift register contains the CRC value. Shifting in the 8 bits of CRC should return the shift register to all 0s.中文翻译DS1820 单总线数字温度计DSl820数字温度计提供9位(二进制)温度读数指示器件的温度。

DS18B20资料中英文翻译

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数字温度计的设计_毕业设计论文

本科学生毕业论文(设计)题目(中文): 基于DS18B20数字温度计的设计(英文): The design of digital thermometer Basedon DS18B20姓名学号院(系)物理与电子工程系专业、年级电子信息工程指导教师湖南科技学院本科毕业论文(设计)诚信声明本人郑重声明:所呈交的本科毕业论文(设计),是本人在指导老师的指导下,独立进行研究工作所取得的成果,成果不存在知识产权争议,除文中已经注明引用的内容外,本论文不含任何其他个人或集体已经发表或撰写过的作品成果。

对本文的研究做出重要贡献的个人和集体均已在文中以明确方式标明。

本人完全意识到本声明的法律结果由本人承担。

本科毕业论文(设计)作者签名:二○○八年月日湖南科技学院本科毕业论文(设计)任务书1、主题词、关键词:DS18B120 单片机温度传感器单线技术2、毕业论文(设计)内容要求:采用美国DALLAS半导体公司的DS18B20为检测元件,以A T89S52系列单片机为控制部件来设计数字温度计,并用LED数码管来显示温度结果。

本设计包括搭建硬件电路和软件设计。

3、文献查阅指引:[1] 楼然苗,李光飞.51系列单片机设计实例.北京:航天航空大学出版社.[2] 梅丽凤.单片机原理及接口技术.北京:清华大学出版社.[3] 何立民.单片机应用系统设计.北京:航空航天大学出版社.[4] 陈杰.传感器与检测技术.北京:高等教育出版社.[5] Transistors:fundamentals for the integrated-circuit engineer[M].New York :Wiley.19834、毕业论文(设计)进度安排1.2007.12月--1月收集相关资料,完成开题报告;2.2008.2月--3月确定设计方案,编写程序并进行调试;3.2008.3月--4月撰写论文;4.2008年5月定稿,准备答辩。

教研室意见:负责人签名:注:本任务书一式三份,由指导教师填写,经教研室审批后一份下达给学生,一份交指导教师,一份留系里存档。

温度传感器DS18B20中文资料

温度传感器DS18B20中文资料

以 0.5 的增量值 在 0.5 至+125 的范围内测量温度 对于应用华氏温度的场合 必须使用查
找表或变换系数
注意 在 DS1820 中 温度是以 1/2 LSB 最低有效位 形式表示时 产生以下 9 位格式
MSB 最高有效位 1
最低有效位 LSB 11001110
= -25 最高有效 符号 位被复制到存储器内两字节的温度寄存器中较高 MSB 的所有位 这种 符号扩展
4
PD om
PD om
er ww
er ww
F-XChange View !
Click to buy NOW
w.docu-track.c
TARGETECH®
DS1820
F-XChange View !
Click to buy NOW
w.docu-track.c
图 3 使用 VDD 提供温度变换所需电流
钭率累加器用于补偿振荡器温度特性的非线性 以产生高分辩率的温度测量 通过改变温度每 升高一度 计数器必须经历的计数个数来实行补偿 因此 为了获得所需的分辩率 计数器的数值
5
PD om
PD om
er ww
er ww
F-XChange View !
Click to buy NOW
w.docu-track.c
Click to buy NOW
w.docu-track.c
到这一点 当使用寄生电源方式时 VDD 引脚必须连接到地 向 DS1820 供电的另外一种方法是通过使用连接到 VDD 引脚的外部电源 如图 3 所示 这种方法
的优点是在 I/O 线上不要求强的上拉 总线上主机不需向上连接便在温度变换期间使线保持高电
3

DS18B20数字式温度传感器毕业论文中英文资料外文翻译文献

DS18B20数字式温度传感器毕业论文中英文资料外文翻译文献

中英文资料外文翻译文献1. DESCRIPTIONThe introduction to The DS18B20The DS18B20 digital thermometer provides 9-bit to 12-bit Celsius temperature measurements and has an alarm function with nonvolatile user programmable upper and lower trigger points. The DS18B20 communicates over a1-Wire bus that by definition requires only one data line for communication with a central microprocessor. It has an operating temperature range of-55°C to +125°C and isaccurate to ±0.5°C over the range of-10°C to +85°C. In addition, theDS18B20can d erive 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 onemicroprocessor to control many DS18B20s distributed over a large area. Applications that can benefit from this feature include HV AC environmental controls, temperatur e monitoring systems inside buildings, equipment, or machinery, and process monitoring and control systems.2.FEATURESUnique 1-Wire® Interface Requires Only One Port Pin for CommunicationEach Device has a Uniqu e 64-Bit Serial Code Stored in an On-Board ROMMulti-drop Capability Simplifies Distributed Temperature-Sensing ApplicationsRequires No External Components1Can Be Powered from Data Line; Power Supply Range is 3.0V to 5.5VMeasures Temperatures from -55°C to +125°C (-67°F to +257°F)±0.5°C Accuracy from -10°C to +85°CThermometer Resolution is User Selectable from 9 to 12 BitsConverts Temperature to 12-Bit Digital Word in 750ms (Max)User-Definable Nonvolatile (NV) Alarm SettingsAlarm Search Command Id entifies and Addresses Devices Whose Temperature isOutside Programmed LimitsSoftware Compatible with the DS1822Applications Include Thermostatic Controls, Industrial Systems, ConsumerProducts, Thermometers, or Any Thermally Sensitive System3.OVERVIEWFigure 1 shows a block d iagram of the DS18B20, and pin descriptions ar e givenin the Pin Description table. The 64-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-b yteconfiguration 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 th edevice is powered down.The DS18B20 uses Maxim’s exclusive 1-Wire bus protocol that implements buscommunication using one control signal. The co ntrol 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 dev ice has a unique code, the number of devices that can beaddressed on one DS18B20 bus is virtually unlimited. The 1-Wire bus protocol,2外文翻译(原文)including detailed explanations of the commands and “time slots,‖ is covered in the 1-Wire Bus System section.Another feature of the DS18B20 is the ability to operate without anexternal 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 ofderiving power from the1-Wire bus is referred to as ―parasite power.‖ As an alternative, the DS18B20 may also be powered b y an external supply on VDD.Vpu4.7K PARASITE POWER CIRCUIT LOGICDQ TEMPERATURE SENSOR GND ANDALARM LOW TRIGGER (TL)CONFIGURATIONVdd SUPPLYSENSE 8-BIT CRC GENERATORFigure 1.DS18B20 Block Diagram4.OPERATION —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°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 atemperature measurement and A-to-D conversion, the master must issue a Convert T [44h] command. Following theconversion, the resulting thermal data is stored in the 2-b yte 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‖ (seethe 1-Wire Bus System section) after the Convert T command and the DS18B20 will respond by transmitting 0 while MEMORY CONTROL 64-BIT ROM 1-WIRE PORTCppREGISTER POWER-3外文翻译(原文)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 used since the bus must be pulled high by a strong p ull up during the entire temperatureconversion.The DS18B20 output temperature data is calibrated in degrees Celsius; for Fahrenheit applications, a lookup table or conversion routine must be used.Thetemperature data is stored as a 16-bit sign-extended two’s complement nu mber 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 temperatur ereading for 12-bit resolution conversions.bit7bit6bit5bit4bit3bit2bit1bit0bit15bit14bit13bit12bit11bit10bit9bit8Figure 2.Temperatu re Register Format5.64-BIT LASERED ROM CODE4外文翻译(原文)Each DS18B20 contains a unique 64–bit code (see Figure 3) stor ed inROM.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 8bits 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.Figure 3.64-Bit Lasered ROM Code6.MEMORYThe DS18B20’s memory is organized as shown in Figure 4. The memory consists of an SRAM scratchpad with nonvolatile EEPROM storage for the high and low alarm trigger registers (TH and TL) and configuration register. Note that if theDS18B20 alarm fun ction is not used, the TH and TL registers can serve asgeneral-purpose memor y.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 provideaccess to TH and TL registers. Byte 4 contains the configuration register data. Bytes 5,6, and 7 are reserved for internal use b y the device and cannot be overwritten. Byte 8 of the scratchpad is read-only and contains the CRC code for b ytes 0 through 7 of the scratchpad. The DS18B20 generates this CRC using the method described in the CRC Gener ation section.Data is written to bytes 2, 3, and 4 of the scratchpad using the Write Scratchpad [4Eh] command; the data must be tr ansmitted 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 readingthescratchpad, data is transferred over the1-Wire bus starting with the least significant5外文翻译(原文)bit 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.Figure 4.DS18B20 Memory Map 7.CONFIGURATION REGISTERByte 4 of the scratchp ad memory contains the configurationregister, which is organized as illustrated in Figure 5. The user can set the conversion resolution of theDS18B20 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 isa 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 beoverwritten.BIT7 BIT6 BIT5 BIT4 BIT3 BIT2 BIT1 BIT0TM R1 R0 1 1 1 1 1Figure 5.Configuration Register60 0 1 111910111293.75ms187.5ms375ms750ms Table 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 th ere 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, and1-Wire signaling (signal types and timing).9.TRANSACTION SEQUENCEThe transaction sequence for accessing the DS18B20 is as follows:Step 1. InitializationStep 2. ROM Command (followed b y any required data exchange)Step 3. DS18B20 Function Command (followed by any required data exchange)It is very important to follow this sequence every time the DS18B20 is accessed, as the DS18B20 will not respond if any steps in th e sequence are missing or out of order. Exceptions to this rule ar e 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. The initialization sequence consists of a reset pulse transmitted by the bus master followed7by presence pulse(s) transmitted by the slave(s). The presence pulse lets the bu smaster know that slave d evices (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 aROMcommand. These commands operate on the unique 64-bit ROM codes of each slavedevice and allow the master to single out a specific device if many are present on the1-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 alarmcondition. There are five ROM commands, and each command is 8 bits long. Themaster device must issue an appropriate ROM command before issuing aDS18B20function command.1.SEARCH ROM [F0h]When a system is initially powered up, the master must identify th e ROM codesof all slave devices on the bus, which allows the master to determine the number ofslaves 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., SearchROM command followed by data exch ange) as many times as necessary to identifyall 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 wh en there is one slave on the bus. Itallowsthe bus master to read the slave’s 64-bit ROM code without using the Search ROMprocedure. 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 sametime.3.MATCH ROM [55h]The match ROM command followed by a 64-bit ROM code sequence allows8外文翻译(原文)the bus master to address a specific slav e device on a multi-drop or single-drop bus.Only the slave that exactly matches the 64-bit ROM code sequence will respond tothe 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 thebussimultaneously 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 savedby allowing the master to read from the slave without sending the device’s 64 -bitROM code. A Skip ROM command followed by a Read Scratchpad command willcause a data collision on the bus if there is more than one slave since multiple deviceswill attempt to transmit data simultaneously.5.ALARM SEARCH [ECh]The operation of this command is identical to the operation of the SearchROMcommand except that only slav es with a set alarm flag will respond. This commandallows the master device to determine if an y DS18B20s experienced an alarmcondition 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 DS18B20withwhich it wishes to communicate, the master can issue one of the DS18B20 functioncommands. These commands allow the master to write to and read from theDS18B20’s scratchpad memory, initiate temperature conversions and determine the power supply mode.9外文翻译(原文)1.CONVERT T [44h]This command initiates a single temperature conversion. Following theconversion, the resulting thermal data is stored in the 2-byte temperature register inthe scratchpad memory and the DS18B20 returns to its low-power idle state. If thedevice is being used in p arasite power mode, within 10µs (max) after this command isissued the master must enable a strong pull up on the1-Wire bus. If the DS18B20 ispowered by an external supply, the master can issue read time slots after the ConvertT command and the DS18B20 will respond by transmitting a 0 while the temperatureconversion is in progress and a 1 when the conversion is done. In parasite powermode this notification technique cannot be used since the bus is pulled high by thestrong pull up during the conversion.2.READ SCRATCHPAD [BEh]This command allows the master to read the contents of the scratchpad.Thedata transfer starts with the least significant bit of byte 0 and continues through thescratchpad until the 9th byte (byte 8 –CRC) is read. The master may issue a reset toterminate reading at an y 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 theDS18B20’sscratchpad. The first data byte is written into the TH register (byte 2 of thescratchpad), the second byte is written into the TL register (byte 3), and the third byteis written into the configuration register (byte 4). Data must be transmitted leastsignificant bit first. All three bytes MUST be written before the master issues a reset,or the data may b e corrupted.4.COPY SCRATCHPAD [48h]This command copies the contents of the scratchpad TH, TL and configurationregisters (bytes 2, 3 and 4) to EEPROM. If the device is being used in parasite powermode, within 10µs (max) after this command is issued the master must enable a10外文翻译(原文)strong pull-up on the1-Wire bus. 5.RECALL E [B8h]This command recalls the alarm trigger values (TH and TL) and configurationdata from EEPROM and places the data in b ytes 2, 3, and 4, respectively, in thescratchpad memory. The master device can issue read time slots following the Recall E command and the DS18B20 will indicate the status of the recall by transmitting 0 while the recall is in pr ogress and 1 when the recall is done. Therecall 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 Y [B4h]The master device issues this command followed by a read time slot todetermine 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 poweredDS18B20s 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, r ead 0, and read 1. The bus master initiates all these signals, with the exception of the p resence pulse.(1)INITIALIZATION PROCEDURE —RESET AND PRESENCE PULSESAll communication with the DS18B20 begins with an initializationsequence that consists of a reset pulse from the master followed by a presence pulse from theDS18B20. This is illustrated in Figure 6. When the DS18B20 sends thepresence 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 2 211外文翻译(原文)the bus and goes into receive mode (RX). When the bus is released, the 5kΩ pull-upresistor pulls the 1-Wire bus high. When the DS18B20 detects this rising edge, itwaits 15µs to 60µs and then transmits a presence pulse by pulling the 1-Wire bus lowfor 60µs to 240µs.Master Rx480µs minimumMaster Tx Reset Pulse DS18B20 waits DS18B20 presence pulse480µs minimum15~60µs60~240µsVpu1-Wire BusGNDDS18B20 InitializationTimingBus 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 andreadsdata from the DS18B20 during read time slots. One bit of data is transmitted over the1-Wire bus per time slot.1.WRITE TIME SLOTSThere are two types of write time slots: ―Write 1‖ time slots and ―Write 0‖ timeslots. The bus master uses a Write 1 time slot to write a logic 1 to the DS18B20 and aWrite 0 time slot to write a logic 0 to the DS18B20. All write time slots must be aminimum of 60µs in duration with a minimum of a 1µs recovery time betweenindividual write slots. Both types of write time slots are initiated by the master pullingthe 1-Wire bus low (see Figure 7).To generate a Write 1 time slot, after pulling the 1-Wire bus low, the bus mastermust release the 1-Wirebus within 15µs. When the bus is released, the 5kΩpull-upresistor will pull the bus high. To generate a Write 0 time slot, after pulling the 1-Wire12外文翻译(原文)bus low, the bus master must continue to hold the bus low for the duration of the time slot (at least 60µs).The DS18B20 samples the 1-Wire bus during a window that lasts from 15µsto 60µ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 tothe DS18B20.START OF SLOT START OF SLOTMASTER WRITE ―1‖ SLOT MASTER WRITE ―0‖ SLOT >1us >1usVcc1-wire BusGND DS18B20 Samples DS18B20 Samples15us 30us 15us 30usDS18B20Write Time SlotBus master pulling low Resistor pullupFigure 7.DS18B20 Write Time Slot2.READ TIME SLOTSThe DS18B20 can only transmit data to the master when the master issues readtime slots. Therefore, the master must generate read time slotsimmediately 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 cangenerate read time slots after issuing Convert T [44h] or Recall E[B8h] commands to find out the status of the operation.All read time slots must be a minimum of 60µs in duration with a minimum of a 1µ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µ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 60us<Tx<120u s MIN TYP MAX MIN TYPMAX 15us 15us 213transmits a 0 by pulling the bus low. When transmitting a 0, the DS18B20 will releasethe bus by the end of the time slot, and the bus will be pulled back to its high idlestate b y the pull up resister. Output data from the DS18B20 is valid for 15µs after thefalling edge that initiated the read time slot. Therefore, the master must release thebus and then sample the bus state within 15µs from the start of the slot.MASTER READ ―1‖SLOTMASTER READ ―0‖ >1usVcc SLOT1-wire bus>1usGNDMaster samples >1us Master samples15us30us15us15usDS18B20 read time slotBus master pulling low Resistor pullupDS18B20 pulling lowFigure 8.DS18B20 Read Time Slot14151.说明DS18B20介绍DS18B20数字式温度传感器提供9位到12位的摄氏温度测量,并且有用户可编程的、非易失性温度上下限告警出发点。

数字温度传感器毕业论文中英文资料外文翻译文献[管理资料]

数字温度传感器毕业论文中英文资料外文翻译文献[管理资料]

毕业论文中英文资料外文翻译文献外文资料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数字温度传感器随着科学技术的不断进步和发展,温度传感器的种类日益繁多,应用逐渐广泛,并且开始由模拟式向着数字式、单总线式、双总线式和三总线式发展。

DS18B20中文资料

DS18B20中文资料

DS18B20中文资料在现代电子技术领域,温度测量是一项非常重要的任务。

而DS18B20 作为一款常用的数字温度传感器,以其出色的性能和简单的接口,在各种温度测量应用中得到了广泛的应用。

DS18B20 是由美国达拉斯半导体公司(Dallas Semiconductor)推出的一款单线数字温度传感器。

它具有体积小、硬件开销低、抗干扰能力强、精度高等优点。

从外观上看,DS18B20 通常采用小型的TO-92 封装或者SOP 封装,这使得它能够轻松集成到各种电路中,占用极小的空间。

在性能方面,DS18B20 的测量范围非常广泛,从-55℃到+125℃,能够满足大多数实际应用场景的温度测量需求。

其测量精度在-10℃到+85℃范围内可达到 ±05℃,这对于很多对温度精度要求较高的场合来说,是非常出色的表现。

DS18B20 之所以能够在众多温度传感器中脱颖而出,很大程度上得益于其独特的单线接口。

这意味着它只需要一根数据线就可以与微控制器进行通信,大大简化了电路设计和布线工作。

在使用 DS18B20 进行温度测量时,首先需要将其正确连接到微控制器。

通常,将 DS18B20 的数据线连接到微控制器的一个通用输入输出引脚(GPIO)上。

然后,通过微控制器发送特定的指令来启动温度转换,并读取转换后的温度值。

DS18B20 的工作原理基于其内部的温度敏感元件和模数转换电路。

当接收到温度转换指令后,传感器内部的温度敏感元件会感知当前环境温度,并将其转换为对应的数字信号,然后通过单线接口传输给微控制器。

在编程方面,不同的微控制器平台可能会有一些差异,但基本的流程大致相同。

一般来说,需要先初始化单线接口,然后发送复位脉冲和搜索 ROM 指令来识别总线上的 DS18B20 设备。

接着,发送启动温度转换指令,并等待转换完成。

最后,读取转换后的温度数据,并进行相应的处理和显示。

为了确保测量的准确性和稳定性,在实际应用中还需要注意一些问题。

DS1820中文说明

DS1820中文说明
DS18B20用 Maxim 的独有的一线制总线协议,此协议用一个控制信号实现总线通讯.控制线需要 一个弱上拉电阻,因为说有器件都通过三态或开漏端口(例如 DS18B20的 DQ管脚)连接到总线上. 在此总线系统中,微处理器(主器件)用每个器件唯一的 64位编码在总线上识别并寻址器件.因为 每个器件有一个唯一编码,一条总线上可寻址的器件数目实际上是无限的.一线制总线协议,包括 命令和时隙的详细解释涵盖在一线制总线系统部分.
用写暂存器[4Eh]命令给暂存器的字节 2,3和 4写入数据.发送到 DS18B20的数据必须以字节 2 的最低有效位开始.要校验数据完整性数据写入后可以读暂存器(用读度暂存器[BEh]命令).读暂 存器时数据从字节 0的最低有效位开始在总线上发送.要把 TH 和 TL还有配置数据从暂存器发送 到 EEPROM,主器件必须发送复制暂存器[48h]命令.
DS18B20
DS18B20 的另一个特点是可以不用外部供电就工作.电源改为当总线为高时从 DQ 管脚通过一线制 上拉电阻供应.高总线信号还给一个内部电容(CPP)充电, 此电容在总线为低时给器件供电.这种从 一线制总线获取电源的方法叫做“寄生供电”.作为替换,DS18B20 也可以通过 VDD 上的外部电源供 电.
订货信息
型号
温度范围
管脚封装
DS18B20
顶端标志
+表示无铅封装.“+” 会出现在无铅封装的顶端标志上. T&R=卷带 *卷带 TO-92封装被直的或者排列的带子装着.选择 “SL” 是直带子.大体积的 TO-92只有直带子.
管脚描述
管脚
名称
功能
未连接
可选的 VDD,寄生供电模式下须接地
数据输入输出,开漏一线接口管脚.寄生供电模式下也为器件提 供电源 (见 DS18B20供电部分) 接地

dallas DS18B20中文资料

dallas DS18B20中文资料
报警搜索操作 DS1820 完成一次温度转换后,就拿温度值和存储在 TH 和 TL 中的值进行比较。因为这些寄存 器是 8 位的,所以 0.5℃位被忽略不计。TH 或 TL 的最高有效位直接对应 16 位温度寄存器的 符号位。如果测得的温度高于 TH 或低于 TL,器件内部就会置位一个报警标识。每进行一次 测温就对这个标识进行一次更新。当报警标识置位时,DS1820 会对报警搜索命令有反应。这 样就允许许多 DS1820 并联在一起同时测温,如果某个地方的温度超过了限定值,报警的器件 就会被立即识别出来并读取,而不用读未报警的器件。 64 位(激)光刻 ROM 每只 DS1820 都有一个唯一的长达 64 位的编码。最前面 8 位是单线系列编码(DS1820 的编码 是 19h)。下面 48 位是一个唯一的序列号。最后 8 位是以上 56 位的 CRC 码。(见图 5)64 位 ROM 和 ROM 操作控制区允许 DS1820 做为单线制器件并按照详述于“单线总线系统”一节的 单线协议工作。只有建立了 ROM 操作协议,才能对 DS1820 进行控制操作。这个协议用 ROM 操 作协议流程图来描述(图 6)。单线总线控制器必须得天独厚提供 5 个 ROM 操作命令其中之 一:1)Read ROM,2)Match ROM,3)Search Rom,4)Skip ROM,5)Alarm Search。成功 进行一次 ROM 操作后,就可以对 DS1820 进行特定的操作,总线控制器可以发出六个存储器和 控制操作命令中的任一个。
16 脚 SSOP PR35 符号
说明
9
1 GND 接地
8
2 DQ 数据输入/输出脚。对于单线操作:漏极开路(见“寄生电源”节)

7
3 VDD 可选的 VDD 引脚。具体接法见“寄生电源”节

基于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@ 摘要:本文介绍了一种在啤酒发酵时使用的温度检测系统。

单片机DS1820单总线数字温度计单片机课程设计

单片机DS1820单总线数字温度计单片机课程设计

单片机课程设计DS1820单总线数字温度计一统设计目的,用途,功能1,目的:.S1820温度传感器控制温度,熟悉芯片的使用,温度传感器的功能,实验电路板的焊接,数码显示管的使用,汇编语言的设计。

锻炼团队合作能力,动手设计能力以及发现问题并且解决问题的能力。

2,用途:温度是工业控制中主要的被控参数之一。

随着电子技术和微型计算机的迅速发展,微机测量和控制技术得到了迅速的发展和广泛的应用。

单片机具有处理能强、运行速度快、功耗低等优点,应用在温度测量与控制方面,控制简单方便,测量范围广,精度较高。

3,功能.:DS1820温度传感器温度的精确度高达0.1度,在许多工业控制中已经足够。

可以满足从-55摄氏度到+125摄氏度测量范围,在一秒内把温度转化成数字,测得的温度值的存储在两个八位的RAM中,单片机直接从中读出数据转换成十进制就是温度,使用方便。

从用途上讲,该单片机类似于温度计,但用途又不仅仅集限于温度计,由于蜂鸣器的使用,编写程序后,超过预设温度后,蜂鸣器发出蜂鸣声,为工业控制的安全保驾护航。

二试验原原理DS1820单总线数字温度计引脚图DS1820单总线数字温度计一般说明:DS1820数字温度计提供9位温度读数,指示器件的温度信息经过单线接口送入 D S1820或从 DS1820送出因此从中央处理器到 DS1820仅需连接一条线和地读写和完成温度变换所需的电源可以由数据线本身提供而不需要外部电源因为每一个DS1820有唯一的系列号silicon serial number因此多个DS1820可以存在于同一条单线总线上这允许在许多不同的地方放置温度灵敏器件此性的应用范围包括HVAC环境控制建筑物设备或机械内的温度检测以及过程监视控制中的温度检测特性独特的单线接口只需1个接口引脚即可通信多点multidro 能力使分布式温度检测应用得以简化不需要外部元件可用数据线供电不需备份电源图1的方框图表示DS1820的主要部件DS1820有三个主要的数据部件164位激光laseredROM;2温度灵敏元件和3非易失性温度告警触发器TH和TL64位激光ROM每一DS1820包括一个唯一的64位长的ROM编码开绐的8位是单线产品系列编码DS1820编码是10h接着的48位是唯一的系列号最后的8 位是开始56位CRC见图564位 ROM 和 ROM 操作控制部分允许 DS1820作为一个单线器件工作并循单线总线系统一节中所详述的单线协议直到ROM操作协议被满足DS1820控制分的功能是不可访问的此协议在ROM操作协议流程图图6中叙述单线总线主机必须首先操作五种ROM操作命令之一1Read ROM(读ROM),2)Match ROM(匹配ROM),3) Search ROM(搜索ROM),4)Skip ROM(跳过ROM),或5)Alarm Search告警搜索在成功地执行了 ROM 操作序列之后DS1820特定的功能便可访问然后总线上主机可提供六个存贮器和控制功能命令之一DS1820内部结构框图如图1所示。

ds18b20中英文

ds18b20中英文

Read Power Supply(工作方式切换)[B4H] 此指令发出后发出读时间隙,芯片会返回它的电源状态字,“0”为寄生电源状态,“1”为外部电 源状态。
DS18B20 复位及应答关系示意图:
图6 每一次通信之前必须进行复位,复位的时间、等待时间、回应时间应严格按时序编程。
DS18B20 读写时间隙: DS18B20 的数据读写是通过时间隙处理位和命令字来确认信息交换的。
doyoung
3/7
18B20 温度传感器应用解析
DoYoung 原创 4, 控制器发送存储器操作指令:在 ROM 指令发送给 18B20 之后,紧接着(不间断)就是发 送存储器操作指令了。操作指令同样为 8 位,共 6 条,存储器操作指令分别是写 RAM 数据、读 RAM 数据、将 RAM 数据复制到 EEPROM、温度转换、将 EEPROM 中的报警值复制到 RAM、工作 方式切换。存储器操作指令的功能是命令 18B20 作什么样的工作,是芯片控制的关键。 5, 执行或数据读写:一个存储器操作指令结束后则将进行指令执行或数据的读写,这个操作 要视存储器操作指令而定。如执行温度转换指令则控制器(单片机)必须等待 18B20 执行其指令, 一般转换时间为 500uS。如执行数据读写指令则需要严格遵循 18B20 的读写时序来操作。数据的 读写方法将有下文有详细介绍。 若要读出当前的温度数据我们需要执行两次工作周期,第一个周期为复位、跳过 ROM 指令、执行 温度转换存储器操作指令、等待 500uS 温度转换时间。紧接着执行第二个周期为复位、跳过 ROM 指令、执行读 RAM 的存储器操作指令、读数据(最多为 9 个字节,中途可停止,只读简单温度值 则读前 2 个字节即可)。其它的操作流程也大同小异,在此不多介绍。 DS18B20 芯片与单片机的接口:

(完整版)单片机_温度控制系统_外文翻译_外文文献_英文文献_中英翻译

(完整版)单片机_温度控制系统_外文翻译_外文文献_英文文献_中英翻译

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 typicallyused 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 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 theRAM 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-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 to Port 3 pins they are pulled high by the internal pull ups and can be used as inputs. As inputs, Port3 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 adivide-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 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 writtendatum 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 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 anyinterface 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 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 CPUinstructions 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 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 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. 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 the simple 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 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 thetemperature 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.。

翻译DS18B20单线灵敏度可编程的温度传感器

翻译DS18B20单线灵敏度可编程的温度传感器

DS18B20单线灵敏度可编程的温度传感器单线灵敏度可编程的温度传感器特性:1. 独特的单线接口仅需一个端口引脚进行通信。

2. 简单的多点分布应用简单的多点分布应用3. 无需外部部件无需外部部件4. 可从数据线供电,供电电压是3v 到5v5. 零待机功耗。

零待机功耗。

6. 检测电压范围从-55摄氏度到+125摄氏度,华氏温度约为到7. ±0.5摄氏度的精确度从-10摄氏度到+85摄氏度摄氏度8. 可编程的温度分辨率范围是9到12位9. 将12位温度转换成数字信息是750ms (最大)(最大)10. 用户定义的非易失性温度警报设置11. 报警搜索控制识别并标志超出程程序限制(温度报警条件)温度。

12. 应用包括了温度控制,工业系统,消费产品,温度计或任何热感测系统。

管脚分配管脚描述管脚描述GND ---接地接地 DQ------数据输入输出数据输入输出VDD----供电电压供电电压NC------无连接无连接简述DS18B20数字温度计提供了9 到12(可配置的)位的可以指示器件温度的温度读数位。

DS18B20通过单线接口来发送或接收信息,因此仅需要一根线连接中心处理器和DS18B20.读写以及显示温度转换所需的电压仅有数据线自身提供无需外部电源。

由于每个DS18B20都有独特的硅序列号,多个DS18B20就可以同时存在在同一个线路里。

这就使得可以在很多不同的地方放置温度传感器。

该特点有用的例子就是包括HV AC 环境的控制,感应存在于建筑,设备和机械,以及检验和控制过程中的温度。

境的控制,感应存在于建筑,设备和机械,以及检验和控制过程中的温度。

管脚详细描述表1 管脚管脚 TSOC 封装 管脚管脚 8脚的SOIC 封装 管脚管脚 TO92封装SYMBOL(符号)描述描述 1 5 1 GND接地接地 2 4 2 DQ数据输入输出管脚:对于单线操作:打开排水(可看做寄存电压部分)打开排水(可看做寄存电压部分) 3 3 3VDD 供电电压选择端:可看作对于连接细节的寄存电压。

DS18B20中英文数据手册1233

DS18B20中英文数据手册1233
器用来存储温度传感器输出的数据。除此之外,高速暂存器提供一个直接的温度 报警值寄存器(TH和TL),和一个字节的的配置寄存器。配置寄存器允许用户 将温度的精度设定为9,10,11 或12 位。TH,TL 和配置寄存器是非易失性的 可擦除程序寄存器(EEPROM),所以存储的数据在器件掉电时不会消失。 DS18B20通过达拉斯公司独有的单总线协议依靠一个单线端口通讯。当全部器 件经由一个3态端口或者漏极开路端口(DQ引脚在DS18B20上的情况下)与总线 连接的时候,控制线需要连接一个弱上拉电阻。在这个总线系统中,微控制器(主 器件)依靠每个器件独有的64位片序列号辨认总线上的器件和记录总线上的器 件地址。由于每个装置有一个独特的片序列码,总线可以连接的器件数目事实上 是无限的。单总线协议,包括指令的详细解释和“时序”见单总线系统节。 DS18B20的另一个功能是可以在没有外部电源供电的情况下工作。当总线处于 高电平状态,DQ与上拉电阻连接通过单总线对器件供电。同时处于高电平状态 的总线信号对内部电容(Cpp)充电,在总线处于低电平状态时,该电容提供能 量给器件。这种提供能量的形式被称为“寄生电源”。作为替代选择,DS18B20 同样可以通过VDD引脚连接外部电源供电。 DS18B20方框图图1
数据也可以通过召回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. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

外文资料DS18B20 Programmable Resolution 1-Wire DigitalThermometerThe 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.The block diagram of Figure 1 shows the major components of the DS18B20. The DS18B20 has four main data components: 1) 64-bit laser ROM, 2) temperature sensor, 3) nonvolatile temperature alarm triggers TH and TL, and 4) a configuration register. 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 3V - 5.5V supply.Communication 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 laser ROM portion of each device 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.The block diagram (Figure 1) shows the parasite-powered circuitry. This circuitry “steals” power whenever the DQ or VDD pins are high. DQ will provide sufficient power as long as the specified timing and voltage requirements are met (see the section titl ed “1-Wire Bus System”). The advantages of parasite power are twofold: 1) by parasiting off this pin, no local power source is needed for remote sensing of temperature, and 2) the ROM may be read in absence of normal power.In order for the DS18B20 to be able to perform accurate temperature conversions, sufficient power must be provided over the DQ line when a temperature conversion is taking place. Since the operating current of the DS18B20 is up to 1.5 mA, the DQ line will not have sufficient drive due to the 5k pull up resistor. This problem is particularly acute if several DS18B20s are on the same DQ and attempting to convert simultaneously.There are two ways to assure that the DS18B20 has sufficient supply current during its active conversion cycle. The first is to provide a strong pull up on the DQ line whenever temperature conversions or copies to the E2 memory are taking place. This may be accomplished by using a MOSFET to pull the DQ line directly to the power supply as shown in Figure 2. The DQ line must be switched over to the strong pull up within 10 us maximum after issuing any protocol that involves copying to the E2 memory or initiates temperature conversions. When using the parasite power mode, the VDD pin must be tied to ground.Another method of supplying current to the DS18B20 is through the use of an external power supply tied to the VDD pin, as shown in Figure 3. The advantage to this is that the strong pull up is not required on the DQ line, and the bus master need not be tied up holding that line high during temperature conversions. This allows other data traffic on the 1-Wire bus during the conversion time. In addition, any number of DS18B20s may be placed on the 1-Wire bus, and if they all use external power, they may all simultaneously perform temperature conversions by issuing the Skip ROM command and then issuing the Convert T command. Note that as long as the external power supply is active, the GND pin may not be floating.The use of parasite power is not recommended above 100C, since it may not be able to sustain communications given the higher leakage currents the DS18B20 exhibits at these temperatures. For applications in which such temperatures are likely, it is strongly recommended that VDD be applied to the DS18B20.For situations where the bus master does not know whether the DS18B20s on the bus are parasite powered or supplied with external VDD, a provision is made in the DS18B20 to signal the power supply scheme used. The bus master can determine if any DS18B20 are on the bus which require the strong pull up by sending a Skip ROM protocol, then issuing the read power supply command. After this command is issued, the master then issues read time slots. The DS18B20 will send back “0” on the 1-Wire bus if it is parasite powe red; it will send back a “1” if it is powered from the VDD pin. If the master receives a “0,” it knows that it must supply the strong pull up on the DQ line during temperature conversions. See “Memory CommandFunctions” section for more detail on this comm and protocol.The DS18B20 has an 8-bit CRC stored in the most significant byte of the 64-bit ROM. The bus master can compute a CRC value from the first 56-bits of the 64-bit ROM and compare it to the value stored within the DS18B20 to determine if the ROM data has been received error-free by the bus master. The equivalent polynomial function of this CRC is:1458+++=X X X CRCThe DS18B20 also generates an 8-bit CRC value using the same polynomial function shown above and provides this value to the bus master to validate the transfer of data bytes. In each case where a CRC is used for data transfer validation, the bus master must calculate a CRC value using the polynomial function given above and compare the calculated value to either the 8-bit CRC value stored in the 64-bit ROM portion of the DS18B20 (for ROM reads) or the 8-bit CRC value computed within the DS18B20(which is read as a ninth byte when the scratchpad is read). The comparison of CRC values and decision to continue with an operation are determined entirely by the bus master. There is no circuitry inside the DS18B20 that prevents a command sequence from proceeding if the CRC stored in or calculated by the DS18B20 does not match the value generated by the bus master.The 1-Wire CRC can be generated using a polynomial generator consisting of a shift register and XOR gates as shown in Figure 6. Additional information about the Dallas 1-Wire Cyclic Redundancy Check is available in Application Note 27 entitled “Understanding and Using Cyclic Redundan cy Checks with Dallas Semiconductor Touch Memory Products.”The shift register bits are initialized to 0. Then starting with the least significant bit of the family code, 1 bit at a time is shifted in. After the 8th bit of the family code has been entered, then the serial number is entered. After the 48th bit of the serial number has been entered, the shift register contains the CRC value. Shifting in the 8 bits of CRC should return the shift register to all 0s.中文翻译DS1820 单总线数字温度计DSl820数字温度计提供9位(二进制)温度读数指示器件的温度。

相关文档
最新文档