文档介绍:摘要
本文介绍了基于STC89C52单片机为主控单元的电源管理系统,详细阐述了该系统的工作原理、控制策略及其硬件、软件实现。该系统由三部分组成:程序控制、单片机硬件电路和仿真部分。电源部分采用定电压模块220V交流转12V在由7805转5V直流电压分别为各部分电路提供电源。程序控制部分由时钟检测函数、LCD1602显示函数、继电器控制函数和主函数组成。硬件部分由四个模块组成:单片机最小系统、时钟芯片DS12C887、显示模块LCD1602、继电器模块。实时时钟随时与CPU进行数据通信,将DS12C887内部时钟信息显示在LCD1602显示模块上,DS12C887内部有闹钟寄存器,当初始化时间信息时,设置内部闹钟寄存器后,到达相应时间后DS12C887时钟芯片IRQ口发出中断信号给单片机外部中断INT0,当单片机发生中断之后,由继电器电路作出对LED灯的控制,从而达到对公寓电灯的点亮或关闭的控制。
关键词:单片机、时钟芯片、LCD1602、闹钟信号
Abstract
This article describes the main control unit MCU based STC89C52 power management system, described in detail the working principle of the system, control strategy and its hardware, software. The system consists of ponents: process control, microcontroller hardware and simulation part. Constant voltage power supply modules with 220V AC to 12V DC 5V by the 7805 transfer were all part of the circuit voltage to provide power. Process control in part by the clock detection function, LCD1602 display functions, relay control function position of the main function. Hardware consists of four modules: SCM minimum system, the clock chip DS12C887, display module LCD1602, relay module. Real-time clock and CPU time for munication, the DS12C887 internal clock information is displayed on the display module in the LCD1602, DS12C887 internal clock registers, when the initialization time information, set the internal clock register, the corresponding arrival time clock chip DS12C887 IRQ port issue interrupt signal to the MCU external interrupt INT0, occurs when the MCU after the break made by the relay circuit control of LED lights to achieve the lamp lit the apartment on or off the control.
Key word: microcontrollers, clock chip, LCD1602, alarm signal
目录
第1章绪论 1
引言 1
选题背景 1
国内外研究情况 2
本设计方法及应用 3
第2章需求分析 4
功能性分析 4
可行性分析 4
4
5
5
第3章总体方案设计 6
芯片比较 6
6
6
7
总体设计与系统原理 7
第4章系统硬件设计 9
单片机部分 9
STC89C52 9
液晶显示模块 14
时钟芯片部分 1