|
EDA365欢迎您登录!
您需要 登录 才可以下载或查看,没有帐号?注册
x
单片机温度控毕业设计论文
+ x) Z" [1 {0 I+ M! Q3 f2 m, m
7 S) x4 d2 K/ {; N$ _. C6 u' n p. ~ R7 W) P, k6 z8 C: }
摘 要随着电子产品向智能化和微型化的不断发展 , 单片机已成为电子产品研制和开发中首选的控制器。为了更好地推广单片机在实际生活和生产中的应用 , 本文从硬件和软件两个方面介绍了基于 AT89C52单片机温度控制系统的设计, 以实现系统能自主调节温度的功能。
( H; J: T. L* {! P- ?: y3 N' `) ?5 q6 K6 e ^
该系统的硬件部分由温度采集模块、键盘扫描及按键处理模块、温度显示模块、继电器控制模块组成。其中温度采集模块采用温度传感器 DS18B20来采集当前温度,并对采集的温度信号进行 A/D转换以数字信号的方式传送给单片机。 键盘扫描及按键处理模块由 3×4矩阵键盘、 反相驱动器 74LS06、显示驱动芯片 8279组成,完成扫描键盘,形成键码, 并将其送至单片机处理。 温度显示模块由显示驱动芯片 8279和数码管组成,输入的温度值进行比较,并通过液晶显示器 LCD显示出来。继电器控制模块由继电器和升温电炉、 降温风扇组成。 如果采集温度低于设置温度, 系统将通过继电器模块自动控制升温; 如果采集温度高于设置温度, 系统将通过继电器模块自动控制降温。5 R4 }# {6 p* a
. w& x3 k/ B5 }2 c
该系统的软件设计部分由系统主程序流程框图、 温度处理子程序流程框图、 键盘处理子程序框图组成, 其中系统主程序由初始化程序、 扫描键盘程序及温度处理子程序组成。温度采集子程序由对温度传感器的初始化和温度处理程序组成。 键盘处理子程序由 8279芯片的初始化程序及扫描处理程序组成。
3 R8 l4 ?- m8 N. Y) }6 \0 S. q$ d* ~" d6 G+ j: q& T2 J% g4 ^* U. l
关键词 :单片机 AT89C52;温度控制;温度传感器 DS18B20;液晶显示器 LCD 。$ o9 D$ ~" K) }$ l+ e
& H) i# P" a) M
]9 w2 ]' W9 e+ }& _! t2 H$ I
( ^# S7 B3 n: S0 ]
ABSTRACT
0 g' z x# e' @2 w3 JWith the electronic products developing to intelligent and miniaturization, single chip has become the first chosen controller which is used to develop and explore the electronic product. In order to promote single chip applicating in real life and production, the paper
B0 e. o2 l4 R4 [6 Lwill introduce a temperature control system which is based on a kind of single chip AT89C52, and it can achieve the function that the system can regulate the temperature independently.
6 N7 a+ U& ], L
8 C c/ k! ?+ ?0 m4 b, y( W( yThe hardware of the system by the temperature acquisition module, keyboard scan and key processing module, temperature display module, relay control module. Wherein the temperature sensor DS18B20 temperature acquisition module to acquire the current
; @$ I1 _. m, K7 jtemperature, and the acquisition of the temperature signal to the A / D converted digital signal is transferred to the microcontroller. Keyboard scan and key processing module consists of a 3 4 matrix keyboard, inverting driver 74LS06 display driver chip 8279, to ×+ X; f* Z( t) t) p0 z
complete the scan keyboard, a key code, and sent to the microcontroller processing. The temperature display module consists of a display driver chip 8279 and digital tubes, the input temperature values are compared, and through the liquid crystal display LCD display. Relay control module relay and heating furnace, cooling fan. If the acquisition temperature is below the set temperature, the system will automatically controlled by the relay module temperature; the collecting temperature is higher than the set temperature, the system will automatically control the cooling relay module.
# G4 L4 p! k$ w7 l" |& }( m! `6 m% G
- B: {( L9 i0 e, MSoftware design of the system by the system main program flow block diagram temperature processing the subroutine flow diagram, keyboard handling subroutine block diagram form, the system main program initialization procedure, scanning keyboard program and temperature processing subroutines.The temperature acquisition subroutine by the temperature sensor the initialization and temperature handler. The keyboard handling routine by the 8279 chip initialization procedures and scanning process.
# `- S4 ]: K5 r8 a
( E2 E7 Z$ h! t# Q$ D: J( `8 ~" ~Keywords: Single Chip AT89C52; Temperature Control ;Temperature SensorDS18B20;Liquid Crystal Display.( C- J1 `+ P3 x/ _4 U. D
" z. x) l8 _. i) U: t7 p+ y/ n( z) Y+ S+ |4 Q3 l" q+ @- M! H, {) v
' g4 X: @" G7 @* A* ?
* | p7 F- ]2 W9 O! r. O
" e6 N3 v5 k% ]# U
8 c9 s+ f! n. B& K: \: E; q
( S$ M) A, K/ {! w+ V
3 R" y$ }6 R6 C2 P" c |
|