本文主要为广大网友提供“制氧机电子控制器系统设计”,希望对需要制氧机电子控制器系统设计网友有所帮助,学习一下!
论文编号:DQ183 论文字数:27659,页数:98
摘 要
随着计算机、电子、通讯技术的飞速发展,人们对于各种智能产品的控制器提出了更高、更新的要求。为了满足这新的要求,本毕业设计本着“系统稳定,降低成本”的原则,采用CMOS 8位PIC单片机将制氧机的电子控制器进行全新设计。以C语言作为开发语言,MPLAB为开发环境,针对制氧机电子器产品编写了应用程序,使该电子控制器实现延时开关电机,开机提示;具有显示机器运行时间,定时设置,掉电储存数据,低压报警,流量控制,氧气浓度指标显示以及利用红外遥控对该电子控制器运行和定时的控制操作等功能。在本毕业论文通过这个项目的开发过程,阐述了单片机的选择,I2C实现掉电存储数据的方法,通过外部中断实红外解码编程的技巧。探讨如何较好的利用PIC单片机的内部资源以及在实际产品中能够很好,很稳定的工作。
关键词:外部中断;解码;MPLAB;I2C;掉电储存
Abstract
Along With the computer, electronics, the rapid development of communication technology, smart people for various products has put a higher controller, the updated requirements. In order to meet these new requirements, the design of the graduation "system stability, reduce costs" principle, the use of CMOS 8-bit PIC MCU make the oxygen plant will be the new electronic controller design. C language as to the development of language, MPLAB for the development of the environment, oxygen plant for the preparation of the electronic product applications, so that the electronic controller delay and switch the motor, the start-up tips; have machines running time, regular set, brown-out storage Data, low-voltage alarm, traffic control, oxygen concentration indicators and the use of infrared remote controller to the electronic timing of the operation and control of operating functions. In this thesis through the project development process, described the choice of SCM, I2C achieve power-down method of data storage, is interrupted by an external infrared decoder programming skills. Discussion on how to better use PIC MCU''''s internal resources and the actual products can be very good, very stable work.
Keywords:External interrupt; decoding; MPLAB; I2C; brown-out storage
目 录
摘要
Abstract………………………………………………………………………….…........……..…Ⅱ
1 绪 论……………………………………………………………………….…………..…..1
1.1 背 景…………………………………………………………….....……...…..…....…1
1.2 任务和目标……………………………………………………….…....……...….....…2
2 总体设计方案……………………………………………...……………………....…........3
2.1 系统总体结构…………………………………………..…………….……………......3
2.2 系统硬件结构…………………………………………………………..…..…….....…4
2.3 系统总体软件流程……………………………………………………..….….….....…5
3 软件、硬件系统结构设计…………………………..……………………….....….....…7
3.1 软件、硬件设计环境…………………………………………….……..……....…..…7
3.1.1 PIC16F877A 的性能特点…………………………………….……….…......…7
3.1.2 C语言介绍………………………………………………..……….…….…..….…7
3.1.3 MPLAB IDE编程环境介绍……………………………………….…….….….…9
3.1.4 HI-TECH PICC编译器介绍………………………………………..……...…….10
3.1.5 Protel 99 SE电路设计环境介绍………………………………….…….……..…12
3.2 硬件电路及PCB设计……………………………………………………….……..…12
3.2.1主要功能设计要点………………………………..…………………….……..…13
3.2.2红外遥控控制要求……………………………………..…………………...……14
3.2.3控制面板电路组成及工作原理……………………………………..….…..……16
3.2.4电源板系统电压产生电路…………………………………………..….……..…18
3.2.5氧浓度传感器及工作电压产生电路………………………..………….……..…20
3.2.6断电报警电路设计………………………………………………..…….……..…22
3.3 程序设计……………………………………………………….…………………...…22
3.3.1 主程序的功能和流程图………………………………....……………….......….23
3.3.2 键盘扫描函数…………………………………………………………….....…...23
3.3.3 I2C读写AT24C02功能函数……………………..…………………………..…24
3.3.4 定时器模块功能函数………………………………………..………………..…24
3.3.5 AD转换功能函数………………………………………...……….…………..…24
3.3.6 外部中断红外解码功能函数………………………..…………………….….…25
4 系统调试…………………………………….……………………………………….....…26
4.1 系统功能调试……………………………………………………………….…….26
4.2 系统的改进方向…………………………………...……………………….……..26
5 总结…………………………………………….…………………………………....….….28
致 谢……………………………………………..…...…………………….………29
参考文献………………………………………………………………………………..……..30
附录1 英文资料…………………………….…………………………………….…….…31
附录2 英文资料翻译…………………………….………………………………….……41
附录3 系统总原理图及PCB图…………………………….………….………...……47
附录4 软件部分子程序………………………………………………………………….50
附录5 总程序………………………………………..………………….………………….65