1、 毕业毕业论文论文 题题 目目 跑马灯设计与制作 院院 系系 自动控制系 专专 业业 自动化 目目 录录 1 系统的概述1 1.1 设计背景 1 1.2 设计任务 1 2 系统的总体设计 .2 2.1 系统组成 2 2.2 系统简介 3 2.3 输入部分 3 2.4 输出部分 3 3 系统的硬件3 3.1 总体电路介绍 .3 3.2 硬件功能介绍 .4 4 系统的软件设计 9 4.1 总体设计思路 .9 4.2 程序流程图.9 4.3 原理图 10 4.4 原理图生成的封装图. 11 4.5 程序编写 12 5 结束语 15 参考文献 16 致谢 17 跑马灯设计与制作 胡倩 南京信息工程大学
2、滨江学院自动控制系,江苏 南京 210044 摘要:摘要:近年来随着科学技术的不断进步,计算机在社会领域得到了广泛应用。其中单片机以 其功能强、体积小、可靠性高、造价低和开发周期短等优点,称为在实时检测和自动控制领 域中广泛应用的器件,在工业生产中称为必不可少的器件,而且往往是作为一个核心部件来 使用。同时其在日常生活中发挥的作用也越来越大。在日常的生活中,通过单片机设计出的 LED灯,可以说充分的方便美化了我们的生活。 本设计使用 A T89S52 芯片,利用 P0 的 8 个端口连接 8 个发光二极管,通过 P0.0 到 P0.7 的值控制“跑马灯”的亮灭以达到显示效果。设计的中断程序要对
3、多个按键动作进行响应, 灯光变换的花样有 4 种,用 4 个按键 SW1、SW2、SW3、SW4 进行切换。按下 SW1 键,蓝 色灯亮,并闪烁;按下 SW2 按键, 红色灯亮,并闪烁;按下 SW3 按键, 绿色灯亮,并闪烁; 按下 SW4 按键, 黄色灯亮,并闪烁。在每个灯亮的同时,伴随着声音的出现。再次按下按键, 相应的灯会灭掉。按下外部按键,接收头接收到相应信号,8 个灯依次闪亮。通过本设计的制 作,不仅巩固了单片机方面的知识而且能强化我们的实践能力。 关键词:关键词:A T89S52 单片机 LED 发光二极管 接收头 Design and fabrication of the Mar
4、quee Hu Qian Department of automatic control, NUIST, Nanjing 210044,China Abstract:In recent years, with the continuous progress of science and technology, computer has been widely applied in the social sector. The advantages of the microcontroller with its strong functions, small size, high reliabi
5、lity, low cost and short development cycle, called in real-time detection and automatic control device is extensively used in industrial production, known as the essential component, and is often used as a core component. At the same time in daily life also play an increasingly important role. In da
6、ily life, through the LED light of a microcontroller design, can be said to make convenient beautify our life. This design uses AT89S52 chip, using 8 port P0 connecting the 8 light-emitting diodes, through the P0.0 to the P0.7 value control “marquee“ light out to show the effect of. Design of the interrupt program to respond to multiple keystrokes, light transformation Figure 4 switch, with 4 buttons SW1, SW2, SW3, SW4. Press the SW1 key, blue light, and the flashing;