基于Proteus的LED时钟电路设计和仿真毕业论文外文翻译.docx
Design and Simulation of LED Clock Circuit Based on ProteusAbstract:Based on the Proteus simulation software, the circuits of MCV controlling LED clock have been designed. The circuits include four parts: Hardware design, software programming, software simulation and physical display. Eventually, through the Proteus software simulation and physical display prove that the method of the circuit design is correct. This paper systematically introduces the design method of MCV controlling circuits and provides a complete design idea for the design of display circuit.Keywords:Proteus; LED; clock circuitI. INTRODUCTIONProteus is EDA software developed by the UK Labcenter Company, which can not only realize fundamental circuit simulation, but also simulate, debug MCU and peripheral circuits. With the Proteus powerful simulation capabilities and extensive resource libraries,the design process of hardware circuit can be effectively simplified. The Proteus simulation software can be firstly used in the design, simulation and debugging of the hardware circuit. When the results reach the demand, the physical circuits would been finally set up and debugged.This makes sure not only a high effective, low invested circuit design but also reduces the loss caused by burning of debugging in practice . In addition, it has also provided an effective design approach for hardware circuit design under scarce resource conditions in laboratory.II. HARDWARE DESIGN80C52 is the control center of the whole hardware circuit. PO pins connect with six LED nixie tubes through two latches 74HC573 respectively. P2.6 and P2.7 in P2 pins of 80C52 respectively control the nixie tube segments elected and bit-selected signals. The "Key" connects with the P3.7 pin, which can clear the display . Six nixie tubes are divided into three groups from left to right,which presents respectively: hour (Hour_H, Hour_L),minute(Min_H, Min_L), second (Sec_H, Sec_L) ; PO pins connect with 74HC373 through external pull-up resistors;Using two latches is mainly to save 80C52 port resources, in order to facilitate follow-up development of circuit design. Peripheral circuits include input power circuit, power supply filter circuit, reset circuit and the LED indicating circuit and so on. The whole hardware circuits have been displayed in figure .Figure 1. LED clock circuitsIII. SOFTWARE DESIGNThrough using C language to control each pin of the 80C52 MCU, the designed circuits are required to achieve the electronic clock function. The display contents of LED nixie tubes "0-9" are coded according to "a-h" display segments, which could control segment selection and bit selection through the pins P2.6 and p 2.7. When P2.6 = I,the segment selection is selected, then the output data through PO connect to "a-h" of nixie tubes in order to achieve the corresponding display, finally commanding P2.6 = 0 to close the latch; when P2.7 = 1, the bit selection is selected, then the output data through PO connect to six nixie tubes in order to control which one to display, finally commanding P2.7 = 0 to close the latch.That means, segment selection P2.6 achieves the control for the display; while, bit selection P2.7 controls the bit of nixie tubes.The designed electronic clock program includes two key points: (1) timer settings. The display time of nixie tube is controlled according to the delay time of second hand; (2) counter settings. When the second hand, minute hand counts to 60, respectively, it starts to carry and clear;it starts to clear when the hour hand counts to 24.The clock control programming can be designed trough two ways: (1) Using delay function controls second hand to count. In the Keil 11 Vision2 software virtual environment, it debugs the delay function and sets the delay parameter just for a second, and then setting the count methods of second hand, minute hand and hour hand. Advantages of this method are simple and easy to understand, easy to implement, a little knowledge points involved; drawback is that some delay error exits during counting time. (2) The internal microcontroller timer counter tImmg. Advantages of this method are time accurate, error small; drawback is difficult to achieve,hard to understand, much knowledge involved. By contrast, the two methods of time-setting having been used demonstrate their advantages and disadvantages in order to provide a theoretical reference for the software design in future. Keil llVision2 software compiler interface is compiled successfully and displayed in Figure 2 ("0 errors" and "0 warnings"). It generates .HEX hexadecimal file for the next step of the simulation.IV. SIMULATION AND PHYSICAL DISPLAYUnder the control of C language to each pin of MCU 80C52, after the success of Keil 11 Vision2 software compile, .HEX hexadecimal file generates. In Proteus7.5 simulation software, according to circuit principle and structure displayed in Figure 1, it draws a complete circuit.Then downloading .HEX file to the MCU obtains the simulation results as displayed in Figure 341. In this figure,"7SEG-MPX6-CC-BLUE" module has been selected as the six LED nixie tubes, the former two bits display "hour", the middle two bits display "minute", and the last two bits display "second". When pressing the button key,the nixie tubes display will be cleared, then re-timing.Changing the value of timer or delay in programs, it can change the clock speed and realize the function of stopwatch. In order to further verify the accuracy of programming and hardware circuit design, it obtains the display effectiveness shown in Figure 4 through downloading .HEX file to MCU. Finally, it verifies the correctness of whole circuit design by Proteus simulation and physical display.Figure 3. Proteus software simulationV. CONCLUSIONThis paper has systematically studied MCU controlling electronic clock circuit from the perspectives:hardware circuit, software programming, software simulation and physical display. The whole circuit is simple, function expandable and display flexible. In this paper, it verifies the correction of programming design and circuit design through software simulation and physical display. Putting the Proteus simulation software into simulation ofMCU avoids a series of processes in the traditional directly applying hardware-kind design, building, debugging, simulation, plate-making, welding,etc, which could not only shorten the development cycle of circuit design, reduce the dissipation of component burnout in debugging process, but also cast off the restrictions due to incomplete laboratory hardware resource. Putting Proteus virtual simulation technology into the Meu control circuit design has some theoretical and practical significance.基于Proteus的LED时钟电路设计和仿真摘要:基于Proteus仿真软件,主控制电路的时钟电路设计。包括四个部分:硬件设计、软件编程、软件仿真和物理显示。最后,通过软件仿真和物理显示电路设计的证明方法是正确的。本文系统地介绍了主控制电路的设计方法,为显示电路的设计提供了一个完整的设计理念。关键词:LED;Proteus;时钟电路一、介绍Proteus是英国Labcenter公司开发的EDA软件,不仅可以实现基本的电路仿真,也可以模拟调试,单片机及外围电路。用Proteus强大的仿真能力和丰富的资源库,硬件电路的设计过程可以有效地简化。Proteus仿真软件可以先使用在设计,仿真和硬件电路的调试。当结果达到要求,物理电路将被建立和调试。这可以确保不仅是一个高效,低投入的电路设计也降低了实践中的 II调试燃烧造成的损失。此外,它还提供了一种稀缺资源,在实验室条件下的硬件电路设计,有效的设计方法。二、 硬件设计80C52是整个硬件电路的控制中心。陂脚连接六个LED数码管分别通过两个锁存器74HC573。P2.6、P2.7 P2的80C52引脚分别控制数码管的位选信号段选。“关键连接3.7引脚,可清晰显示。六位数码管分为从左到右三组,并分别介绍:小时(hour_h,hour_l),分钟(min_h,min_l),第二(sec_h,sec_l);坡引脚通过外部上拉电阻器74HC373连接;使用两个锁存器主要是为了节省80C52的港口资源,为方便电路设计后续发展。外围电路包括输入电源电路,电源滤波电路,复位电路和LED显示电路等。整个硬件电路如图1显示。三、 软件设计通过使用C语言控制80C52单片机的每个引脚,设计电路需要实现电子时钟的功能。对LED数码管的“0-9”是根据“a-h”显示段码显示内容,可以通过引脚P2.6和P 2.7控制段选择及钻头选型。当P2.6 =1,这段被选择,然后输出数据通过P0连接“a-h”数码管为了达到相应的显示,最后P2.6 = 0关闭锁;当P2.7 = 1,钻头的选择是选择,然后输出数据通过P0连接六个数码管来控制显示哪一个,最后指挥P2.7 = 0关闭锁。这意味着,段选择P2.6为显示达到控制;同时,选择P2.7控制数码管点。所设计的电子时钟程序包括两个关键点:(1)定时器设置。数码管显示的时间是根据第二方面的延迟时间控制;(2)计数器设置。当秒针,分针数为60,分别,它开始进行清晰;它开始清晰时,时针数到24。时钟控制程序的设计可以通过两种方式:(1)采用延时功能控制秒数。在Keil Vision2软件11虚拟环境,它可以进行延时功能,集只是一秒钟的延迟参数,然后设置的秒的计数方法,分针和时针。这种方法的优点是简单,易于理解,易于实现,涉及的知识点少;缺点是一些延迟误差的退出在计数时间。(2)单片机内部定时器计时器。这种方法的优点是时间精确,误差小;缺点是难以实现的,很难理解更相关的知识。相比之下,时间设置已被用于展示自己的优点和缺点,为今后的软件设计提供理论参考的两种方法。keil软件编译接口llvision2编译成功后,在图2中显示(“错误0”和“0警告”)。它产生的十六进制文件。为下一步的仿真。四、 物理显示和仿真在C语言的控制到每个引脚单片机80C52,Keil uVision2软件后,11个成功编译,十六进制文件生成。在proteus7.5仿真软件中,根据电路的结构和原理如图1显示,得出一个完整的电路。然后下载HEX文件到单片机。得到的仿真结果如图3显示。在这张图中,“7seg-mpx6-cc-blue”模块已被选为六个LED数码管,前两位显示“小时”,中间两位显示“分”,而最后两位显示“秒”。当按下按键,数码管显示将被清除,然后再定时。改变定时器或延迟项目的价值,它可以改变时钟速度和实现秒表功能。为了进一步验证软件编程和硬件电路设计的准确性,得到如图4所示。通过下载HEX文件到单片机的显示效果。最后,通过Proteus仿真和物理显示验证了整体电路设计的正确性。五、 结论本文从各个方面系统地研究了单片机控制的电子时钟电路:硬件电路,软件编程,软件仿真和物理显示。整个电路简单,功能可扩展,显示灵活。在本文中,通过软件仿真和实物展示验证了修正的程序设计和电路设计。把Proteus仿真软件应用在单片机的仿真中,避免了传统的直接应用硬件设计,建造,调试等一系列过程,仿真,制板,焊接,等等,不仅可以缩短电路设计开发周期,减少了元器件的调试过程,也摆脱了限制不完全的实验室硬件资源。将虚拟仿真技术在单片机控制电路的设计具有一定的理论和实践意义。