- 1、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。。
- 2、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 3、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
- 4、该文档为VIP文档,如果想要下载,成为VIP会员后,下载免费。
- 5、成为VIP后,下载本文档将扣除1次下载权益。下载后,不支持退款、换文档。如有疑问请联系我们。
- 6、成为VIP后,您将拥有八大权益,权益包括:VIP文档下载权益、阅读免打扰、文档格式转换、高级专利检索、专属身份标志、高级客服、多端互通、版权登记。
- 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
您可能关注的文档
- 许嵩的一些歌(Some of Xu Song's songs).doc
- 访《思考中医》作者刘力红教授(Interview with Professor Liu Lihong, author of thinking about Chinese medicine).doc
- 讲解Oracle数据库ORA-00257故障的解决过程ssf(Explain the Oracle database ORA-00257 fault resolution process SSF).doc
- 讲述电信禁止路由上网的最佳破解方法(The best way to break the Internet for telecommunications is prohibited).doc
- 许多人未必知道的冷知识(Cold knowledge that many people do not necessarily know).doc
- 讲课内容附件(Lecture contents).doc
- 证劵市场 - 副本(The securities market - copy).doc
- 证据法学-在线作业_A(Evidence law - online homework, _A).doc
- 证明由一棵二叉树的先序序列和中序序列可唯一确定这棵二叉树(It is proved that the two binary tree can be uniquely determined by the first order sequence and the middle sequence of a two tree).doc
- 证据法学-在线作业_B(Evidence law - online homework, _B).doc
- 小儿屏气发作(Breath holding episodes in children).doc
- 小动作出卖的秘密(The secret of a small sale).doc
- 小动作表现人的个性(A small gesture shows a person's personality).doc
- 小升初(语文)试题1(Small rise initial (Chinese) examination questions 1).doc
- 小升初数学考试知识点整理(Small rise early mathematics exam knowledge points finishing).doc
- 小学三年级数学知识点归纳(Induction of mathematics knowledge in grade three of primary school).doc
- 小升初数学试题(Small rise initial mathematics examination question).doc
- 小学专题3(Primary school topics 3).doc
- 小学二年级上册品德与生活教学计划(On morality and life in the second grade primary school teaching plan).doc
- 小学二年级数学奥赛题(Grade two Mathematics Olympiad in primary school).doc
最近下载
- 《科学探究:欧姆定律》名师课件.ppt VIP
- 网络服务业网络安全保障与应急响应机制建设方案.doc VIP
- 2025年高中《通用技术》考试卷(含答案) .pdf VIP
- 堰水力计算水利工程.xls VIP
- 人教版(2024新版)七年级上册生物期末复习知识点背诵提纲.docx VIP
- 2025 全国青少年信息素养大赛 Python 编程挑战赛(个人赛)初中组决赛模拟试卷(一).docx VIP
- 一种推送滚轮.pdf VIP
- EPC项目:基于风险管控的质量体系构建与实施.docx VIP
- 4洗涤剂总活性物的测定.pdf VIP
- 沙库巴曲缬沙坦联合松龄血脉康胶囊治疗老年高血压病合并慢性心力衰竭的.pptx VIP
文档评论(0)