【毕业论文设计】基于单片机的农田诱虫灭虫灯控制电路设计.doc摘要 近年来随着电子在社会领域的渗透,应用电子正在不断地走向新时代,同时伴 随着经济的发展与社会的进步。电子产品的设计、制作、调试与检修等知识,将硬 件与软件更好的结合在一起。 随着社会的发展和生活水平的提高,人们对生活质量有了更多的关注。绿色无 公害食品便成为当今社会关注的对象。要做到绿色无公害一个重要方面的就是无污 染和安全性,所以在生产过程中不使用化学合成的农药是一关键条件,但是农业害 虫的消除也是必要的,在这样的环境下自控诱虫灯应运而生。为了实现灭虫功能, 设计以STC89C52单片机作为核心元件,并给出了系统的硬件组成和软件的设计方 法。设计应用光敏电阻对光的反应,及温湿度传感器因温湿度超过设定值时的反应, 通过单片机写入程序,从而达到智能控制诱虫灯的工作时间。 关键词:应用电子;STC89C52;绿色无公害。 Abstract In recent years, with the penetration of electrons in the social field, the application of electronic are constantly toward a new era, accompanied by economic development and social progress. Knowledge of design, production, commissioning and maintenance of electronic products, hardware and software together. With the social development and improvement of living standards, people have more attention to the quality of life. Green pollution・free food will become the object of social concern. To do the green pollution is an important aspect of non-polluting and safety in the production process does not use synthetic pesticides is a key condition for the elimination of agricultural pests is also necessary, self-control in such an environment, attracting insects The light came into being. In order to achieve pest control function, the designed to STC89C52 microcontroller as the core components, and system hardware components and software design. Photoresistor light response of the design application, and temperature and humidity sensors, temperature and humidity exceed the set value, the reaction, the MCU by writing programs, so as to achieve intelligent control trap lamp working hours. Key words: The application of electronic; STC89C52; pollution-free green 目录 摘要 I ABSTRACT II 1绪论 1 1设计的意义 1 2 2系统概述 3 1系统实现的功能 3 2单片机控制诱虫灭虫灯系统构成 3 3主要芯片及元件的介绍 4 2. 3. 1 STC89C52 的简介 4 2. 3. 2 STC89C52的时钟介绍 7 2. 3. 3单片机中断的介绍 8 2. 3. 4 LED 9 2. 9 2. 3. 6数字温湿度传感器am2302的简介 12 3硬件电路的设计 15 1电源电路的设计 15 15 16 16 4软件设计 18 18