Application of Proteus simulation software in single chip microcomputer design

Publisher:数字之舞Latest update time:2012-01-16 Keywords:Proteus Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

1. Introduction

Single-chip microcomputers are widely used in many products, whether it is the 51 series, AVR, or PIC series, they all have their own characteristics, and the number of learners is increasing year by year. However, in the process of learning and development, we often spend a lot of money on experiments after determining the plan, especially for some students or beginners, which may become an obstacle to their learning. Since we used Proteus software, we have greatly saved time and development costs. In particular, using this software in single-chip microcomputer development is a good choice. Here we mainly talk about the combination and application of Proteus software and Keil software.

2. Introduction and application of Protues software

2.1 Introduction to Protues software

Proteus is currently the best tool for simulating single-chip microcomputer peripheral devices. It can simulate 51 series, AVR, PIC and other commonly used MCUs and their peripheral circuits (such as LCD, RAM, ROM, keyboard, motor, LED, AD/DA, some SPI devices, some IIC devices...). This article is based on ProteusPRO6.7SP3 and KEIL uVision3 software. Of course, the software simulation accuracy is limited, and it is impossible to find the corresponding simulation model for all devices. Using a development board and simulator is of course the best choice, but for microcontroller enthusiasts or simple development, it should be a better choice. Proteus is different from other microcontroller simulation software in that it can not only simulate the working conditions of the microcontroller CPU, but also simulate the working conditions of the microcontroller peripheral circuits or other circuits without the participation of the microcontroller. Therefore, when simulating and debugging the program, the concern is no longer the changes in the contents of the microcontroller registers and memory when certain statements are executed, but directly looking at the process and results of program operation and circuit operation from an engineering perspective. For such simulation experiments, in a sense, it makes up for the contradictions and phenomena of disconnection between experiments and engineering applications.

2.2 Combination of Proteus software and Keil uVision

For those who use Proteus software for the first time, they may not know how to set it up. Now the setting steps are briefly described as follows for reference only (this article only discusses the combination on a single machine. Due to space limitations, the use of two networked machines is not discussed here): The setting steps are as follows:

(1) Copy the VDM51.dll (C:ProgramFilesLabcenterElectronicsProteus6ProfessionalMODELS) file in the proteus installation directory to the C51BIN directory in the Keil installation directory; (2) Edit the tools.ini file in C51 and add: TDRV1=BINVDM51.DLL ("PROTEUS VSM MONITOR-51 DRIVER"); (3) Set in Keil uVision: project-->options forproject-->debug tab; (4) Select use proteus VSM monitor 51 (if you want to use two computers for simulation, double-click setting and enter the IP address or DNS name); (5) Load proteus file; (6) Select DEBUG-->use remote debug monitor in proteus; Enter KEIL's project menu option for target 'project name'. In the drop-down menu on the upper right column of the DEBUG option, select Proteus VSMMonitor-51 Driver. When entering setting, if the IP name of the same machine is 127.0.0.1, if it is not the same machine, fill in the IP address of the other machine. The port number must be 8000. Note: You can run keil on one machine and run proteus on another machine for remote simulation. (7) Open KEIL uVision and press F5 to start simulation.

2.3 Proteus working process

After running the ISIS program of proteus, enter the main interface of the simulation software. Before working, set the snap alignment under the view menu and the color, graphical interface size and other items under the system. Through the p (select component from library command) command in the toolbar, select the components required for the circuit in the pick devices window, place the components and adjust their relative positions, set component parameters, connect components, and write programs; under the Define code generation tools menu command in the source menu, select the tools, paths, extensions, and other items for program compilation; under the Add/remove source files command in the source menu, add the corresponding program of the microcontroller hardware circuit; and simulate the operation of the program and circuit through the corresponding commands in the debug menu. Proteus software provides more than 30 component libraries and thousands of components. The components involve digital and analog, AC and DC, etc.

2.4 Debugging methods provided by Proteus software

Proteus provides a relatively rich test signal for circuit testing. These test signals include analog signals and digital signals. For the debugging of microcontroller hardware circuits and software, Proteus provides two methods: one is the overall execution effect of the system, and the other is the step-by-step debugging of the software to see the specific execution status. For the debugging method of the overall execution effect, you only need to execute the execute menu item under the debug menu or the F12 shortcut key to start the execution, use the pause animation menu item under the debug menu or the pause key to pause the system operation; or use the stop animation menu item under the debug menu or the shift-break key combination to stop the system operation. The operation mode can also be selected by selecting the corresponding tool in the toolbar. For the step-by-step debugging of the software, you should first execute the start/restart debugging menu item command under the debug menu. At this time, you can select the stepover, step into and step out commands to execute the program (you can use the shortcut keys F10, F11 and ctrl+F11). The execution effect is single sentence execution, entering subroutine execution and jumping out of subroutine execution. After executing the start/restart debugging command, the software list involved in the simulation and the system resources of the microcontroller will appear below the debug menu, which can be analyzed and viewed during debugging.

2.5 Example of combining Proteus and KEIL uVision3 software

(1) Draw the schematic diagram through Proteus: (Figure 1)






(2)

Write a program in Keil uVision software:

#i nclude

#i nclude

void delayms(unsigned char ms) // Delay subroutine

{unsigned char i;

while(ms--)

{for(i = 0; i < 120; i++);}

}

main()

{unsigned char LED;

LED = 0xfe;

P0 = LED;

while(1)

{delayms(250);

LED = _crol_(LED,1);//Circularly shift right by 1 bit, light up the next LED

P0 = LED;

} }

(3) Setting of Proteus and Keil uVision software: (refer to 2.2 Combination of Protues software and Keil uVision) (4) Run the program, the running result is as follows (Figure 2): Realize the function of running lights


3. Summary

Proteus can not only be used as a simulation of school microcontroller (electronics, etc.) experiments, but also as a simulation experiment in personal studios. As students and engineering technicians majoring in electronic technology or control, after learning this software, you can make full use of the resources it provides to help yourself improve your engineering application ability. In teaching, using this software, in addition to teaching the specific course content of microcontrollers, you can also teach students the ability to apply this tool, laying a foundation for future work. Welcome to give your comments on this article. If you have any questions, please consult us.

Keywords:Proteus Reference address:Application of Proteus simulation software in single chip microcomputer design

Previous article:PROTEUS Design and Simulation of Single-Chip Microcomputer Application Products
Next article:Application and Design of SPCE061A Single Chip Microcomputer in Civil Engineering Thermometer

Recommended ReadingLatest update time:2024-11-16 17:38

Proteus simulation program for single chip voice-controlled music colored lights
Contains C language code, AD schematics and PCB board diagrams, proteus simulation diagrams, and music colored lights controlled by sound. The simulation schematic diagram is as follows   . The schematic diagram and PCB diagram drawn by Altium Designer are as follows:   The microcontroller source program is as follo
[Microcontroller]
Proteus simulation program for single chip voice-controlled music colored lights
How to set up MDK (Keil For ARM) and Proteus joint debugging
      I wanted to use ADS to compile ARM before, but ADS cannot be debugged with Proteus like KEIL, so it can only generate HEX files first and then load them into Proteus. This will obviously reduce the efficiency and is not convenient. So here I will introduce the method of debugging MDK and Proteus, hoping it will b
[Microcontroller]
PC based Proteus simulation of stepper motor motion control
1 Introduction        Stepper motors can achieve fairly high positioning accuracy in a simple open-loop operation mode, and can output large torque when running at low speed. Therefore, they have been widely used in motion control . PC stepper motor control systems are used in many fields such as CNC machine tools, rob
[Microcontroller]
PC based Proteus simulation of stepper motor motion control
Joint debugging method of Proteus and ICCAVR
Today I would like to introduce to you a software called Proteus, which can perform code-level debugging like AVR Studio and can also view the MCU status in real time. Everyone knows that ICC-AVR cannot debug code, and many people choose AVRStudio, but AVR Studio is not intuitive, especially when debugging LCD displ
[Microcontroller]
Joint debugging method of Proteus and ICCAVR
51 single chip microcomputer frequency meter Proteus simulation design (with program circuit)
The Proteus simulation circuit diagram is as follows: (There will be a clear picture after downloading the simulation file) There are circuit diagrams and programs. The circuit is from isis and the program is from uv3. Download the simulation project file: http://www.51hei.com/f/dgnplj.rar    Below is the progra
[Microcontroller]
51 single chip microcomputer frequency meter Proteus simulation design (with program circuit)
Latest Microcontroller Articles
  • Download from the Internet--ARM Getting Started Notes
    A brief introduction: From today on, the ARM notebook of the rookie is open, and it can be regarded as a place to store these notes. Why publish it? Maybe you are interested in it. In fact, the reason for these notes is ...
  • Learn ARM development(22)
    Turning off and on interrupts Interrupts are an efficient dialogue mechanism, but sometimes you don't want to interrupt the program while it is running. For example, when you are printing something, the program suddenly interrupts and another ...
  • Learn ARM development(21)
    First, declare the task pointer, because it will be used later. Task pointer volatile TASK_TCB* volatile g_pCurrentTask = NULL;volatile TASK_TCB* vol ...
  • Learn ARM development(20)
    With the previous Tick interrupt, the basic task switching conditions are ready. However, this "easterly" is also difficult to understand. Only through continuous practice can we understand it. ...
  • Learn ARM development(19)
    After many days of hard work, I finally got the interrupt working. But in order to allow RTOS to use timer interrupts, what kind of interrupts can be implemented in S3C44B0? There are two methods in S3C44B0. ...
  • Learn ARM development(14)
  • Learn ARM development(15)
  • Learn ARM development(16)
  • Learn ARM development(17)
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号