Application of simulation software ProteuS in ARM system design

Publisher:ZhenxiangLatest update time:2012-12-04 Source: 维库开发网 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere
introduction

Nowadays, embedded devices exist in every corner of people's lives, such as DVDs, mobile phones, MP3s, and PDAs. Most of these embedded devices use 32-bit RISC embedded processors as core components. Among them, embedded processors based on ARM cores are the best, accounting for more than 75% of the market share in 32-bit RISC processors. Therefore, more and more electronics enthusiasts have joined the team of learning ARM. By comparing with the development process of general single-chip microcomputer systems, it is not difficult to find that the design of embedded systems includes two aspects: hardware design and software design, and its debugging process includes three processes: software debugging, hardware testing, and system debugging. Software debugging is generally easier to carry out, but hardware testing and system debugging are more troublesome, because these two processes must be carried out after PCB production and component welding are completed; and PCB production and component welding are very time-consuming and labor-intensive. If the simulation tool ProteuS VSM can be used, the above work can be completed without making a specific circuit board. There is no doubt that this will bring great convenience to the majority of ARM learners.

1 Introduction to Proteus

Proteus software is an EDA tool software of Labcenter electronics in the UK. It is an electronic design teaching platform, experimental platform and innovation platform, covering all functions of electrical and electronic laboratories, electronic technology laboratories, single-chip microcomputer application laboratories, etc. It runs on the Windows operating system and can simulate and analyze (SPICE) various analog devices and integrated circuits. The features of this software are:

① 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 the system composed of single-chip microcomputer and its peripheral circuits, RS232 dynamic simulation, I2C debugger, SPI debugger, keyboard and LCD system simulation; there are various virtual instruments, such as oscilloscope, logic analyzer, signal generator, etc.

②Support the simulation of mainstream single-chip microcomputer systems. Currently supported single-chip microcomputer types include: 68000 series, 8051 series, AVR series, PIC12 series, PIC16 series, PIC18 series, Z80 series, HC11 series and ARM (LPC series) of Phil-lips Company, etc.

③ Provide software debugging functions. The hardware simulation system has debugging functions such as full speed, single step, and breakpoint setting. At the same time, the current status of various variables and registers can be observed. Therefore, these functions must also be available in the software simulation system; at the same time, it supports third-party software compilation and debugging environments, such as Keil, ADS and other software.

④It has powerful schematic drawing function. It can design SCH (schematic diagram) and PCB (printed circuit board) circuits.

2 Schematic design under Proteus environment

Proteus is similar to Protel, EWB and other software. When drawing a schematic diagram, you must first take out the required component symbols from the device library and lay them out in the drawing area, edit the parameters of the components, and then connect them, add necessary network labels and other steps. The following is a simple example to illustrate how to use Proteus software to implement the design and simulation of ARM (taking LPC2106 as an example) system. The example takes the LPC2106 controller as the core, uses the hardware SPI interface to connect with 74HC595, adds necessary peripheral circuits, and controls 74HC595 to drive LED digital tube display. The circuit principle is shown in Figure 1. P0.4 (/SCK/CAP0.1), P0.6 (/MOSI/CAP0.2) and P0.8 (/TxD1/PWM4) of LPC2106 are respectively connected to SH_CP, DS and ST_CP of 74HC595 to control 74HC595. The outputs Q0~Q6 of 74HC595 are respectively connected to the digital tube and LED to control their real-time display.

3. Program code writing

The writing of program code is mainly divided into 4 parts:

①LPC2106 initialization code;

②LPC2106 exception vector entry and the interface between the exception vector and C language code, including the code for initializing the stack;

③LPC2106 target board-specific code, including exception handler and target board initialization program;

④ According to the example requirements and combined with the schematic diagram, write the code to implement the expected function, that is, the usual execution code, and save the code file as "main.C".

In order to save development time, we usually use a designed project template. Here we use the LPC2100 series project template. The template contains the startup files of the LPC2100 series ARM7 microcontroller, including STACK.S, HEAP.S, STARTUP.S and TARGET.C; the template also contains the header files of the LPC2100 series ARM7 microcontroller, scattered loading description files (such as mem_a.scf, mem_b.scf and mem_c.scf), etc. In this way, you can directly use these project templates when writing program codes in the future, without having to write initialization, startup and other program codes. You only need to write "main.C" according to different requirements, which saves a lot of time and greatly improves work efficiency.

Here we mainly explain the writing of "main.C". The function to be realized is to use the hardware SPI interface to output data from 0 to F, control the LED digital tube to display characters from 0 to F through 74HC595, and control the 4 LEDs to display the corresponding hexadecimal numbers. The program source code is as follows:

[page]

4 Simulation

Use the ADS integrated development environment to compile and connect the program. The ADS integrated development environment is an integrated development tool for ARM core microcontrollers launched by ARM. Its full name is ARM Developer Suite, and its mature version is ADS1.2. ADS1.2 supports all ARM series microcontrollers before ARM10, supports software debugging, supports assembly, C and C++ source programs, and has the characteristics of high compilation efficiency and strong system library functions. Open the ADS1.2 integrated development environment CodeWarrior IDE, use the pre-added project template to create a new project spi.mcp, and add the above compiled code file main.c to the project. After making relevant settings, select the Projeet→Make command, compile and connect the project, and generate the spi.hex file.

Double-click the microcontroller LPC2106 in the schematic diagram, and a property setting window Edit Component will appear, as shown in Figure 2. Add the path of the spi.hex file generated above in ProgramFile, and click OK to complete the setting.

Click the Run button in the lower left corner of the schematic to start the simulation. The digital tube displays the data O~F sent by SPI, and the LED displays the corresponding hexadecimal value. The simulation results fully meet the design requirements.

Conclusion

This article explains the application of Proteus in ARM development in detail by combining a simple SPI interface experiment. It can be seen that Proteus is very powerful and can simulate various digital analog circuits. It is simple to operate and easy to use. Using Proteus for virtual development of ARM can not only reduce the investment in experimental hardware capital, but also break through the limitations of experimental content in the actual development board, so that developers can give full play to their own initiative. After the successful virtual development of the system using Proteus simulation , actual production can undoubtedly improve development efficiency, reduce development costs, and increase development speed, and has a high value of promotion and application.

Reference address:Application of simulation software ProteuS in ARM system design

Previous article:Research on Embedded System Based on GPRS Network
Next article:Remote Data Acquisition System Based on Embedded Linux

Recommended ReadingLatest update time:2024-11-16 23:35

About the serial port problem of proteus simulation
The following four pictures are all about serial port interruption. Serial port interruption requires a trigger to receive or send data. Figure 1: Because the data sent by the serial assistant reaches the microcontroller serial port, it causes an interruption of the serial port.   Figure 2: A larger version of Figur
[Microcontroller]
About the serial port problem of proteus simulation
Problems with online simulation settings between Proteus and Keil
KeilC and Proteus connection debugging 1. If KeilC and Proteus have been correctly installed in the directory C:\Program Files, copy C:\Program Files\Labcenter Electronics\Proteus 6 Professional\MODELS\VDM51.dll to the directory C:\Program Files\keilC\C51\BIN. If not, you can download it online; 2. Use Notepad to op
[Microcontroller]
Problems with online simulation settings between Proteus and Keil
ARM embedded experiment familiar with the use of PROTEUS electronic simulation software (LPC2138)
1. Experimental Purpose Master the installation process of RPROTEUS electronic simulation software; Master the use of RPROTEUS electronic simulation software; Master the process of creating electronic simulation schematics; Master the process of adding programs to ARM chips and simulating and debugging them. 2. Expe
[Microcontroller]
ARM embedded experiment familiar with the use of PROTEUS electronic simulation software (LPC2138)
Proteus C51 simulation learning board 9——IIC
    I won't go into detail about the electrical parameters of the IIC bus. You only need to know that IIC has two wires, one SCL clock and one SDA data, and then you can directly use the timing to see how it works.     As usual, let me give you a simple explanation:  Teacher: Classmates, now we will start calling the
[Microcontroller]
Proteus C51 simulation learning board 9——IIC
Proteus simulation and source program design of single chip temperature control fan
Hardware composition: single chip microcomputer + minimum system + digital tube display module + 74HC573 digital tube driver module + temperature acquisition module + fan driver module + button module 1. Use DS18B20 temperature sensor to measure temperature, 74HC573 drives digital tube, digital tube displays temperat
[Microcontroller]
Proteus simulation and source program design of single chip temperature control fan
Proteus introductory tutorial: AVR microcontroller simulation example
Introduction: This article is an introductory tutorial for Proteus and a simulation example of AVR microcontroller. 1. Simulation example of AVR microcontroller This example is to realize AVR driving LCD1602 and use oscilloscope to monitor the data line. Before you start, you need to prepare the simulation file,
[Microcontroller]
Proteus introductory tutorial: AVR microcontroller simulation example
LPC2138+LCD12864 displays real-time clock program keil and proteus joint debugging
In recent years, with the development of computer technology and integrated circuit technology, embedded technology has become increasingly popular and has played an increasingly important role in the fields of communications, networks, industrial control, medical treatment, electronics, etc. Embedded systems have un
[Microcontroller]
LPC2138+LCD12864 displays real-time clock program keil and proteus joint debugging
Writing and simulating digital clock program based on 8051 and Proteus
Functions and features of this program: A digital clock is realized through the 8051 chip and digital tube, and the clock can be adjusted through the two buttons as shown in the figure below. The "PAUSE" button is used to pause/start the clock and select the time parameters to be modified, "hour", "minute", and "second
[Microcontroller]
Writing and simulating digital clock program based on 8051 and Proteus
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号