小冰箱的温控器(Temperature controller for small refrigerator).docVIP

小冰箱的温控器(Temperature controller for small refrigerator).doc

  1. 1、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。。
  2. 2、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载
  3. 3、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
  4. 4、该文档为VIP文档,如果想要下载,成为VIP会员后,下载免费。
  5. 5、成为VIP后,下载本文档将扣除1次下载权益。下载后,不支持退款、换文档。如有疑问请联系我们
  6. 6、成为VIP后,您将拥有八大权益,权益包括:VIP文档下载权益、阅读免打扰、文档格式转换、高级专利检索、专属身份标志、高级客服、多端互通、版权登记。
  7. 7、VIP文档为合作方或网友上传,每下载1次, 网站将根据用户上传文档的质量评分、类型等,对文档贡献者给予高额补贴、流量扶持。如果你也想贡献VIP文档。上传文档
查看更多
小冰箱的温控器(Temperature controller for small refrigerator)

小冰箱的温控器(Temperature controller for small refrigerator) This is my procedure, at that time is to do a small refrigerator temperature controller to do, and use 51 SCM, a total of Yin digital tube, P0 mouth do section selection, P1.4-1.7 do election. #includereg52.h #includeabsacc.h #includeintrins.h #includemath.h #define uint unsigned int #define uchar unsigned char Compared to the previous function to solve the display 100, can not directly display the sign etc. Uchar code table[]={ 0x3f, 0x06,0x5b, 0x4f, / / 0123 0x66,0x6d, 0x7d, 0x07, / / 4567 0x7F, 0x6f, 0x40 //8 9 - }; Void, display (uchar, uchar, uchar, uchar); Void delay_led (uint Z); Void, init_led (); Uchar, wei_3, V, wei_4, wei_5, wei_6, FWD, flag; Int Shuju, a; / / get the temperature value Uchar temp[2]={0,0}; / / DS18B20 value temperature register Uint value = 0; Sbit DQ=P1^0; / / data line Sbit key=P1^1; / / controlled switch Sbit key1=P3^4; / / add temperature Sbit key2=P3^5; / / temperature reduction Sbit d1=P1^2; / / set the indicator Sbit we1=P1^4; Sbit we2=P1^5; Sbit we3=P1^6; Sbit we4=P1^7; Void ow_reset (void); Void tmstart (void); Void Read_Temperature (void); Void write_byte (char); Uint read_byte (void); Void delay_18B20 (uint); The main function of **********/ /******* Void, main () { (init_led); / / initialization subroutine Tmstart (); //18b20 initialization Delay_18B20 (50); / * * / wait for the end of conversion While (1) { Read_Temperature (); Delay_18B20 (50); Tmstart (); Delay_18B20 (50); / * * / wait for the end of conversion If (FWD==0) / / when the temperature is positive { If (shujua+5) and determine whether the temperature exceeds the set value, if exceeded, began to start refrigeration refrigeration, k=0 Key=0; If (shujua-5) Key=1; //shuju below the set temperature, stop cooling, k=1 stop cooling } If (FWD==1) / / when the temperature is negative { If (ABS (a) a) { If (shujuabs (a) +5) / / data is greater than the set temperature, the current temperature is low, stop k=1 stop ref

您可能关注的文档

文档评论(0)

jgx3536 + 关注
实名认证
文档贡献者

该用户很懒,什么也没介绍

版权声明书
用户编号:6111134150000003

1亿VIP精品文档

相关文档