MCU virtual development environment based on

Publisher:MysticGardenLatest update time:2011-12-15 Keywords:Proteus Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

Single-chip microcomputer is one of the compulsory courses for electronic technology majors in domestic colleges and universities. Many students are engaged in single-chip microcomputer hardware and software design after graduation. The development of single-chip microcomputer requires designers to have a certain hardware design foundation and assembly or C language programming ability. At present, most domestic colleges and universities adopt the teaching steps of teaching first and then experimenting. Students lack a perceptual understanding in the learning process, and cannot connect with the knowledge in the textbook during the experiment, which results in a double waste of time and teaching resources.


l Introduction of Proteus
With the rapid development of computer software and hardware technology, various simulation systems have emerged in various fields, providing accurate and reliable guarantees for the development of various practical systems, while saving a lot of manpower and material resources. The emergence and development of simulation technology is the inevitable result of the development of science and technology, one of the key technologies of modern science and technology, and has gradually become a necessary technology for scientific and technological personnel. Proteus is a simulation system that came into being and developed rapidly under this situation. Proteus is a design and simulation platform for analog circuits, digital circuits, and analog/digital mixed circuits; it is also an advanced design and simulation platform for single-chip microcomputer systems. It truly realizes the complete design and simulation process from schematic diagram and circuit design, circuit analysis and simulation, single-chip microcomputer code-level debugging and simulation, system testing and functional verification to the formation of PCB on the computer. It has been favored by teachers, engineering and technical personnel engaged in single-chip microcomputer business, as well as many college students and single-chip microcomputer technology enthusiasts.
The single-chip microcomputer virtual development environment based on Proteus effectively links theory with experiment. In this development environment, demonstration, hardware circuit design and software design can be well combined. Applying this development environment in teaching and specific engineering projects not only helps to improve efficiency, but also reduces development costs and risks. At present, the fields of electronic technology, mechanical design and manufacturing, and software development tend to adopt virtual simulation development environment. On the one hand, the adoption of virtual environment helps the parallel development of projects to improve the product development cycle, and can advance some of the later work in traditional development steps; on the other hand, the virtual development environment can show the prototype of the product and expose some practical problems of the experimental product in the virtual design stage. For example, the combination of mechanical design software SoliWorks and LabView can complete the simulation of design work with high risks such as three-dimensional motion control, control logic analysis, and component collision analysis of machine moving parts. For enterprises, reducing risk investment and accelerating product launch are key factors in winning the market. Therefore, the virtual development environment described here can well adapt to the needs of future scientific research and product development, and cultivating the virtual development awareness of developers is an important knowledge asset for enterprises and society.


2. Proteus simulation system
Proteus is a circuit analysis and physical simulation software from Labcenter, a British company. It can simulate and analyze (Spice) various analog devices and integrated circuits. The features of this software are:
(1) It realizes the combination of single-chip microcomputer simulation and Spice circuit simulation. It has the functions of analog circuit simulation, digital circuit simulation, simulation of systems composed of single-chip microcomputers and their peripheral circuits, RS 232 dynamic simulation, I2C debugger, SPI debugger, keyboard and LCD system simulation; it has various virtual instruments such as oscilloscopes, logic analyzers, signal generators, etc.
(2) It supports the simulation of mainstream single-chip microcomputer systems. The types of single-chip microcomputers currently supported are: 68000 series, 8051 series, AVR series, PIC12 series, PIC16 series, PIC18 series, Z80 series, HC11 series and various peripheral chips. (
3) It provides software debugging functions. In the hardware simulation system, it has debugging functions such as full speed, single step, and setting breakpoints. At the same time, it can observe the current status of various variables, registers, etc., so these functions must also be available in the software simulation system; it also supports third-party software compilation and debugging environments, such as Keil C51 μVision 2 and other software.
(4) It has powerful schematic drawing functions. After starting Proteus, the ISIS design window will appear, as shown in Figure 1. It includes: title bar, main menu, standard toolbar, drawing toolbar, status bar, object selection button, preview object orientation control button, simulation process control button (bottom row), preview window, object selector window, and graphic editing window.
[page]

The software also has a circuit board demonstration function. Taking temperature display as an example, its demonstration effect is shown in Figure 2. This demonstration diagram is not only helpful for teaching work, but also can help enterprises reduce product design risks.


3 Program Development
Here, the AVR MCU ATmega16 and DS18B20 are used as examples to demonstrate the MCU program development process for temperature measurement and display. The AVR MCU is a high-performance MCU launched by Atmel. Some of this series of MCUs use a 16-bit structure. All IO ports can set the data direction individually and have programmable internal pull-up resistors, which improves the overall performance and application range. In terms of MCU program design, ICCAVR provides a good programming interface, and the initialization program can be generated by selecting the visualization option box, as shown in Figure 3.

When developing a project program, you only need to select the CPU used, the initial direction of the I/O port, the use of the timer, the UART and other peripheral function modules to make settings to generate a corresponding C language initialization program. After completing the initialization, the programmer only needs to write a functional program for his specific application. DS18B20 supports the "one-line bus" interface, and the measurement temperature range is -55~+125℃. In the range of -10~+85℃, the accuracy is ±0.5℃. The accuracy of DS1822 is poor, which is ±2℃. The field temperature is directly transmitted in a digital way of "one-line bus", which greatly improves the anti-interference ability of the system. It is suitable for field temperature measurement in harsh environments, such as: environmental control, equipment or process control, temperature measurement consumer electronics products, etc. Unlike the previous generation of products, the new product supports a voltage range of 3.0~5.5 V, making the system design more flexible and convenient. Moreover, the new generation of products is cheaper and smaller in size. The interface between DS18B20 and microcontroller is only one line, and the single bus feature of DS18B20 only needs one microcontroller I/O pin to support multiple DS18B20, which greatly reduces the hardware cost. Of course, the small hardware cost needs relatively complex software to compensate. Since serial data transmission is used between DS1820 and microprocessor, the read and write timing must be strictly guaranteed when reading and writing programming of DS1820, otherwise the temperature measurement result will not be read. The specific flow chart is shown in Figure 4.

[page]

After programming according to the design requirements, double-click the ATmega16 microcontroller in the ISIS Professional window, an editing window will pop up, select the .hex file generated by ICCAVR in the program file, and click "OK". Click the simulation process control button in the ISIS window, and the simulation results shown in Figure 5 will appear. Change the temperature of DS18B20, and the display will show accordingly.


4 Conclusion
Single-chip microcomputer technology is an indispensable technology in the modern electronic industry. Mastering single-chip microcomputer technology is a basic condition for the employment of students majoring in electronic information. Here, through the example of single-chip microcomputer product development, the status and role of Proteus in single-chip microcomputer teaching and single-chip microcomputer application product development are discussed. Proteus is an efficient, economical and reliable single-chip microcomputer system design and simulation platform for single-chip microcomputer teaching and application product development. Students can boldly carry out circuit design, program design, measurement, debugging and modification in the Proteus ISIS window. Not only will it not damage components and instruments, but the results can be seen before installing the physical work. The students' independent operation ability, initiative, enthusiasm and creativity are all brought into play. In short, the single-chip microcomputer virtual development environment based on Proteus is conducive to promoting curriculum and teaching reforms, and is more conducive to the cultivation of talents; the use of simulation systems can not only save development time and development costs, but also has great flexibility and scalability; it is also a beneficial attempt for colleges and universities to improve the level of laboratory construction.

Keywords:Proteus Reference address:MCU virtual development environment based on

Previous article:Design of fast position servo system based on single chip microcomputer
Next article:Design of camera motion control system based on single chip microcomputer

Recommended ReadingLatest update time:2024-11-16 22:25

51 MCU Learning Notes——1. Custom delay function lights up and controls the flashing seconds of LED and uses Proteus to simulate
#include reg52.h #define LED P0 void delay(); //delay for one second void main() //Bitwise operation to light up the small light  {   unsigned int i;   while(1)   {   for(i = 0;i 8;i++) { LED = ~(0X01 i); //The reason for inverting is that the hexadecimal number is relatively small and more intuitive delay
[Microcontroller]
51 MCU Learning Notes——1. Custom delay function lights up and controls the flashing seconds of LED and uses Proteus to simulate
Proteus simulation of single chip microcomputer key and digital tube test program
I recently reviewed the microcontroller and simulated it through proteus 7.8. The effect was good.     The microcontroller program is as follows:   /* 51 MCU key and digital tube experiment, simulated by proteus 7.8. By pressing the key, K1: the digital tube number increases by one, 0~F, and then starts from 0 after
[Microcontroller]
Proteus simulation of single chip microcomputer key and digital tube test program
AVR microcontroller Proteus anemometer model simulation bascom source program
Compilation environment: bascom avr+Proteus8.9 The microcontroller source program is as follows: rem Main.bas file generated by New Project wizard rem rem Created: Tuesday June 2 2020 TAOTIE rem Processor: ATmega8 rem Compiler:  BASCOM-AVR rem Write your code here $regfile = "m8def.dat"                         
[Microcontroller]
AVR microcontroller Proteus anemometer model simulation bascom source program
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号