摘 要 :温度操控在工业生产中运用的非常广泛。采用了89C2051,A/D转换电路等系统。
很显然,一定程度上降低了采样频率。在程序的编写过程中特别注意了人机的交互性及各种功能的实现,且操控范围控大到其它的领域中去,一方面系统更紧凑但同时系统的可扩展性大大降低;采用了经典的89C2051单片机的操控理论。
基于89C2051单片机温度操控系统,从而减小了单片机口线的使用,从某个角度上说这种算法优于传统的操控算法,也使使用口线小的单片机成为可能,且简单易行。在选择89C2051单片机的操控器时用了速度相对较慢的单片机,使系统的操作界面更容易让人理解,但同时也使系统的温度更容易设定;加了E2PROM,但也经济实惠,从而达到操控温度的目的。
当然,系统同时也存在几点缺点。
目 录
第一章 绪论………………………………………………………………………………………1
1.1 设计指标 …………………………………………………………………………………1
1.2 本文的工作 ………………………………………………………………………………1
第二章 设计思想 …………………………………………………………………………………3
2.1 设计思想 …………………………………………………………………………………3
2.1 论证分析 …………………………………………………………………………………3
第三章 系统设计 …………………………………………………………………………………5
3.1硬件设计…………………………………………………………………………………………5
3.1.1 电源电路 …………………………………………………………………………………5
3.1.2 温度检测与变送环节 ………………………………………………………………5
(优秀毕业设计:)
3.1.3 模数转换接口电路 …………………………………………………………………8
3.1.4 单片机最小系统………………………………………………………… …………9
3.1.5 片外数据辅助存储器………………………………………………………………10
3.1.6人机交互接口……………………………………… ………………………………11
3.1.7 执行机构 …………………………………………………………………………14
3.2软件设计…………………………………………………………………………………15
3.2.1主程序…………………………………………………………………………… …15
3.2.2 串行A/D转换芯片的驱动和其输出值的量化……………………………………17
3.2.3片外I2C E2PROM 驱动和空间分布…………………………………………………20
3.2.4温度及设定职的显示子程序………………………………………………………20
3.2.5键盘管理子程序……………………………………………………………………23
3.2.6定时中断应答子程序………………………………………………………………27
3.2.7 模糊运算子程序 …………………………………………………………………30
3.3 抗干扰设计与软件调试…………………………………………………………………35
3.3.1 硬件抗干扰…………………………………………………………………………35
3.3.2 软件抗干扰设计……………………………………………………………………36
3.3.3 软件调试……………………………………………………………………………36
第四章 程序清单……………………………………………………………………………… 40
第五章 总 结……………………………………………………………………………………68
致 谢…………………………………………………………………………………… ……69
参考文献 …………………………………………………………………………………………70
程序清单
;**************************\
;程序名:模糊温度操控系统
;功能:实现了模糊操控的温度操控,温度的显示和设定
;**************************\
ORG 00H
LJMP START ;程序开始
ORG 03H
RETI ;软件抗干扰
ORG 0BH
LJMP INTT0 ;定时器0的中断服务程序
ORG 13H
RETI ;软件抗干扰
ORG 1BH
LJMP INTT1 ;定时器1的中断服务程序
ORG 23H
RETI ;软件抗干扰
SDA BIT P3.0 ;I2C协议定义的两跟线
SCL BIT P3.1 ;SDA(数据),SCL(时钟)
CS BIT P3.4 ;A/D转换器的选通线
LOCK BIT P3.5 ;E2PROM的写允许线
OPE BIT P3.7 ;执行器的输入(操控)
LINE1 BIT P1.3
LINE2 BIT P1.2 ;键盘的两跟行线
...
关键词:温度操控;单片机;测量变送
The Temperature control systemic design based on AT89C2051 MCU
Abstract: Temperature control is used widely in industry production, with large lag and big disturb. Tradition control method for example PID control method can’t meet the request. AT89C2051 MCU can easily meet these requests.
Using the AT89C2051 single chip computer as the Fuzzy controller, with temperature measure and adjust-convection instrument, A/D transformer, LED displayer, solid switch and so on, form a Temperature control systemic based on AT89C2051 MCU.
In such system, temperature measure and adjust-convection instrument measures the temperature and changed into normative 1~5 voltage signals, the A/D transformer transform the analog signals into digital signals, and introduce into the single chip computer. And the single chip computer educes the control value which based on the difference between the initialization and the measure value. Solid switch with high frequencies used as a executor and use a analog PWM converter, to change the close time in a decided periods, which aimed at control the temperature.
Keywords: Temperature control, Single chip microcomputer, measure and adjust-convection
设计一个温度操控系统具体化技术指标如下。
以AT89C2051单片机为基础,达到操控的目的。而基于AT89C2051单片机的温度操控策略可以很容易的解决这些问题。键盘电路,采用模拟的PWM操控方法,都不能很好地满足要求