1、 I 摘要摘要 本设计主要设计一种通过摇动可正常显示的图案/数字的电子摇摇棒。 本设计应用 AT89C51 芯片作为核心,要以 C51 单片机来控制,利用它把自己 想要的图案都可以把程序编写进单片机里,即实现孩子们的玩的乐趣,优点是电 路简单,性能可靠,实时性好,容易编程,又可以起到动手动脑的节奏,联想丰 富,益智益脑,深受孩子们的喜爱,单片机,有按键系统,发光二极管、水银开 关、干电池(3 节)、晶振,电阻、电容等。这个摇摇棒的成本价格低廉,功能实 用,方便老人 孩子,单片机是智能品牌不可分割的一部分,它起着系统中相当重 要的地位, 关键词:摇摇棒;功能单一;AT89C51;PCB 面板;晶
2、振;水银开关 II Abstract The design of the main design of a pattern can be displayed by shaking the normal / digital electronic stick Design and application of the AT89C51 chip as the core, to control the MCU C51, use it to want to design their own can put the program into the MCU, which realize the child
3、rens fun, has the advantages of simple circuit, reliable performance, good real-time performance, easy programming, and can play a DIY rhythm. Lenovo rich, brain puzzle, popular childrens favorite, microcontroller, key system, light emitting diode, a mercury switch, 5 batteries (Section 3), crystal,
4、 resistors, capacitors and so on. The shake great low cost, practical function, convenient for the elderly children, SCM is the smart brand can not be separated Part of the cutting, which plays a very important role in the system, Key words: rocking rod; single function; AT89C51; PCB panel; crystal
5、oscillator; mercury switch 摘要 . I ABSTRACT . II 绪论 .1 1 系统设计原理 3 1.1 基于摇摇棒设计原理 3 1.2 AT89C51 单片机简介 3 1.3.单片机具有如下特点: .3 1.4 AT89C51 管脚说明 4 1.5 设计目的 5 1.6 设计要求 5 1.6.1 设计思路 5 1.6.2 摇摇棒的基本原理 5 第 2 章 基于单片机的摇摇棒方案设计 6 2.1 摇摇棒结构图 6 2.2 摇摇棒电路图的总设计 7 2.2.1 单片机最小系统 8 2.2 LED 发光二极管灯的选择 .9 2.2.1 外部中断信号产生方式 9 2.
6、2.2:LED 显示电路的设计 .9 2.2.3 LED 显示模块 10 2.3 抗重影方案的选择 11 2.4 主程序流程图 12 2.5 单片机工作过程 12 2.5.1 单片机的应用 13 2.6 串口电路设计 14 2.7 串口接收程序 14 第 3 章 关于一些元器件的介绍. 16 3.1 LED 发光二极管的原理 16 3.2 滚珠开关与水银开关的原理及特点 16 3.2.1 水银开关的原理 18 3.2.2 区别 19 3.3 晶振的封装及应用 19 3.3.1 工作原理 20 3.3.2 作用 22 3.3.3 晶振电路 23 3.4 瓷片电容 23 第 4 章 PCB 板电路设计. 24 4.1 PCB 板制作及分类 24 4.2 印制电路板的设计的一般步骤 24 第 5 章硬件电路的设计. 27 5.1 单片机最小系统设计 27 5.2 单元电路设计 28 5.2.1 按键模块 28 5.2.2 驱动模块 . 28 5.3 硬件电路设计基本结构 . 28 5.4 传感器系统 29 5.5 电源电路设计 29 5.6 开关电路 30 5.7 复位电路 30 5.8