淮 北 师 范 大 学 2025届学士学位论文 基 于 单 片 机 的 模 拟 空 调 控 制 系统学 院 、 专 业 物 理 与 电 子 信 息 学 院 电 子 信 息 工 程 研 究 方 向 单 板 微 型 计 算 机 学 生 姓 名 纪 宏 源 学 号 指 导 老 师 姓 名 指 导 老 师 职 称 副 教 授 2025 年 4 月 25 日基于单片机的空调模拟控制系统纪宏源淮北师范大学物理与电子信息学院 235000 摘要 本文设计了一种以 STC89C52 为核心的空调控制系统,并详细分析了其在硬件和软件上的实现过程。本系统硬件电路大致上可以分成控制模块、电机模块、键盘模块、电源模块、温度模块和显示模块。控制模块选用 STC89C52 芯片并采纳 24MHz 晶振获得稳定的频率,可以用来准确地控制整体电路以及存储和计算数据。按键模块完成空调的工作方式、风速、温度等状态信息的设定。电源模块采纳 12V 锂电池经过 7805 转换成 5V 电压向单片机及电机供电,并且用 L298N驱动电机使电机速度达到可控。温度模块则是用 DS18B20 实时采集温度并传输到液晶上显示。显示模块采纳无字库 LCD12864 液晶,实时显示温度数据及空调状态信息。系统软件程序采纳 C 语言编写,占用资源少、程序执行效率高,有利于实现较复杂的算法和程序结构化设计。经测试,本系统满足设计要求,可以实现控制系统的基本功能。关键词 空调;单片机;温度;控制系统Base On Single-Chip Computer Air Conditioner SimulationControl SystemJi Hong YuanSchool of Physics and Electronic Information, Huaibei Normal University, 235000Abstract: A design of a control system of air-condition which used STC89C52 as the core is described in this paper. A detailed analysis of the design process in both hardware and software is also mentioned. The hardware circuit of this system can be roughly separate into control module, motor module, keyboard module, power module, temperature module and display module. In the control module, which can control the whole electric circuit accurate, a STC89C52 chip used 24MHz crystal oscillator to get the stable frequency is used. It also...