文档介绍:本科生毕业论文(设计)
题目:基于89C52单片机的定时
开关设计
专业代码: 071201
作者姓名: 李超
学号:2007200993
单位:物理科学与信息工程学院
指导教师:任世杰
2011年 5月25日
目录
前言 1
1
主板与显示电路设计 2
. 时钟芯片接口电路 4
8
10
系统主程序流程图 10
各部分子程序流程图 11
15
元器件选择及其清单 15
电路的制作与调试 16
参考文献 17
致谢 18
附录 19
摘要
本文提出了一种智能开关的设计方法,该时控开关主要是以单片机STC89C52RC作为主控单元,利用其I/O接口、定时器、中断系统等资源,以时钟芯片DS12C887作为时钟单元,通过以继电器为核心的外围电路控制受控线路,达到定时通断线路的目的。此外,可通过无线遥控自行设定当前时间及通断时间,并实时显示在LCD1602液晶显示器上。软件部分以C语言进行单片机编程,主要包括对DS12C887的时间读写,LCD1602的实时显示以及对无线模块和控制驱动电路等几部分。最后,通过DXP2004绘制印刷电路板,制作出实物并调试通过。
关键词:定时开关;无线遥控;STC89C52;12C887;LCD160
Abstract
This paper presents a design method of intelligent switching, the control switch using the MCU STC89C52RC mainly as a master unit, using its I / O interfaces, timers, terminal systems and other resources, using clock chip DS12C887 as a clock unit, through External circuit as the core of the relay control circuit controlled to achieve the purpose of time off line. In addition, it can through its own wireless remote control to set the current time and off time, and real-time display in the LCD1602 LCD display. Software is part of the SCM to C language programming, including the time to read and write on the DS12C887, LCD1602, real-time display and the wireless module and the control drive circuit and other parts. Finally, we draw and printed circuit boards using DXP2004, and made the physical.
Key words: Timer switch, Wireless remote control, 89C52, 12C887, LCD1602
基于DS12C887的时控开关硬件设计
前言
随着信息技术的飞速发展,定时开关在各种场合都有着极为广泛的用途,定时开关在实际应用中可实现设备的计算机智能监控,对提高工作效率和管理水平具有重大意义。本文设计的多功能时控开关可通过无线遥控控制,表现为高稳定性和实用性,可应用于生活中的各个方面,如网线、高频信号线、电源等,既节省资源,又能提高工作效率且成本低廉,满足了现在家庭的安全、快捷、可靠的使用特点。
系统的硬件由89C52最小系统,继电器组,无线收发模块,DS12C887时钟芯片,LCD1602显示器组成,系统框图如图1所示:
STC89C52
TX-1C实验开发板
LCD1602
DS12C887
继电器
无线模块
图1 系统框图
主板与显示电路设计
近几年,以单片机为核心的控制芯片,以其较高的稳定性及相对低廉的价格迅速占领市场,而51系列单片机更是风靡一时,在本电路中,核心器件采用STC89C52单片机。
STC89C52的40个引脚大致可分为4类:电源、时钟、控制和I/O引脚