With the development of science and technology, SCM technology plays an increasingly important role in the human-computer interaction design of products, and SCM simulation and PCB design become its important branches. Proteus Software is one of the best simulation tools because of its excellent simulation ability in MCU and peripheral devices, and it can also design PCB Based on simulation schematic diagram. This paper takes at80c51 as an example, discusses the drawing and Simulation of the whole circuit schematic diagram and PCB design process based on Proteus Software and keil uVision 2 software, aiming to provide an effective learning method for beginners of SCM.

1. Introduction

A single-chip microcomputer is composed of CPU chip, memory chip, I / O interface chip and simple I / O equipment assembled on a printed circuit board, and monitoring program stored in ROM. The traditional development of single-chip microcomputer adopts the way of hardware experiment box or experiment board, and the hardware investment cost is relatively high; This kind of fixed environment is easy to confine the developers’ thinking in a small experimental box, which is not conducive to the realization of innovative thinking. For beginners, it will also cause cognitive errors, that is, the so-called single-chip microcomputer is to thread a needle in a box, which is extremely not conducive to the subsequent development.

At present, there are many software with circuit simulation function, such as Multisim, PROTEL, Orcad and so on, but they can’t do anything for the simulation of single chip microcomputer. So far, only Proteus Software can provide perfect simulation of MCU chip and embedded system.

2. Experimental configuration for MCU simulation

2.1 Proteus Software is selected as the simulation software of MCU

Proteus is an EDA tool software developed by Lab Center Electronics Company in UK. It is not only the design platform of analog circuit, digital circuit and a / D mixed circuit, but also the most advanced and complete design and simulation platform of various types of microprocessor system in the world. It truly realizes the schematic design, circuit analysis and simulation, microprocessor program design and simulation, system test and function verification on the computer, To form a complete PCB electronic design, research and development process.

Proteus Software consists of Isis and Ares. Isis is an intelligent schematic input system software, which can be used as electronic system simulation platform. Ares is an advanced wiring editing software, which is used to design PCB

2.2 keil uVision 2 software is used to compile and debug the program

The MCU chip in Proteus simulation, like the MCU chip in MCU hardware test-bed, needs to download the compiled machine language file, so it needs the compiler of assembly language and C language. Keiluvision2 is a 51 series compatible MCU C language software development system. It uses the syntax close to the traditional C language to develop. It can also be embedded in assembly. You can embed it in key positions. At the same time, it has strong portability, making the program close to the efficiency of assembly. In addition, Keil uVision 2 software also supports MCU chips from many different companies, integrating editing, compiling and program debugging, which will be generated later. Hex file, download to the MCU chip, which completes the solidification of the program.

3. Based on Proteus Software, including at80c51 chip water lamp simulation and PCB production

3.1 experimental process of Proteus MCU imitation and PCB production (as shown in Figure 1)

Simulation design of water lamp based on Proteus and at80c51

3.2 use Isis software to draw the schematic diagram containing at80c51 MCU chip

1) Open Isis professional software, execute “file” → “new design”, select the default template “default” in the pop-up window, click “OK”, then save and name it “liushuideng. DSN”.

2) “System” → “set sheet sizes…”, pop up the “sheet size configuration” dialog box, set the sheet to A4, and click “OK”.

3) Add components.

The specific value is shown in Figure 3. In the toolbar, execute the menu command “library” → “pick device / symbol…”, and a dialog box will pop up. Input the required components in the “Keywords” column, and the right column will be displayed. At this time, just select the components you need, click “OK”, and then select the components in the list (the components used are shown in Table 1 below), Click the mouse in the appropriate position of the schematic editing window to complete the placement, and add all the components in the list according to this method.

Simulation design of water lamp based on Proteus and at80c51

4) Place power and ground: click the icon in the toolbox on the left, click “power” in the object selector to make it appear blue bar, and then click the mouse at the appropriate position in the schematic editing window to place “power” in the schematic; Click “group” and place “ground” in the schematic in the same way.

5) Wiring: there is no special wiring button in the editing window of Isis schematic diagram, but automatic wiring is effective by default, so you can draw lines directly, as shown in Figure 2.

4. C language programming

4.1 establishment of engineering documents

1) Open the Kii Lu VI SiO N 2 software, click “project” → “new project”, name it “liushuideng”, then save it, and select “ATMEL” → “89C51” → “OK” in the “data base” column of the pop-up dialog box; Then click “file”

→“New File”。

2) Click “save” → the file is named “liushuideng

C “→” save “, this program uses C language programming, suffix must be”. c“。

3) Click “target 1” → “soul group1”

Select the newly created file in the pop-up dialog box, and then click Add. After adding, click close; The project has been completed.

4.2 using C language to write the program source code of water lamp

#include #include

#define uint unsigned int

#define uchar unsigned char

uchar temp; void delay(uint);

void main()

{temp=0xfe; P0=temp; while(1)

{temp=_ crol_( temp,1); delay(600);

P0=temp;} }

void delay(uint z)

{ u i n t x , y ; f o r(x = 1 0 0 ; x 》 0 ; x – -)

for(y=z; y》0; y-);}

4.3 debugging procedure

After debugging this program, the lower status bar shows “0 errors, 0 warning”, indicating “0” error and “0” warning.

4.4 generation. Hex target file

Select “target 1”, right-click “option for target” target 1 “, in the pop-up dialog box, click” output “→” create hex file “to check, and then run the program again to generate. Hex target file.

5. Schematic simulation

(1) In Proteus Isis, double-click AT89C51 single-chip microcomputer chip, in the pop-up “Edit component”

In the “P R o g r a m f IL e” column of the dialog box, select “liushuideng. Hex”, and then click “OK”.

(2) Click the play button at the bottom left of the Proteus Isis editing window, or select “execute” under the “debug” menu. You can see that first, p0.0 lights up the LED light, and then goes out after one second. At the same time, P0.1 lights up another LED light, and then goes out after one second. Similarly, P0.2 lights up the LED light ┄ when p0.7 lights up the LED light, and then goes out after one second, p0.0 lights up the LED light ┄, The interval time can be set in the delay function, and the running result is shown in Figure 2.

Simulation design of water lamp based on Proteus and at80c51

When the dot on the left side of the LED is blue, it means it is on, and when it is red, it means it is off.

6. PCB production

6.1 statistics of components used in circuit schematic diagram

Execute the menu command “tools” → “billof materials” → “2 ASCII output” in Isis to generate the component list, as shown in Figure 3

Simulation design of water lamp based on Proteus and at80c51

6.2 import network table

In Isis, double-click the switch “K”, the “Edit component” dialog box will pop up, remove “√” before “exclude PCB layout”, and click “OK”; Execute the menu command “tools” → “netlisto ares”, and the system will automatically open ares software. In Isis, some components do not specify the packaging form, so the system will automatically pop up the “package selector” dialog box, and enter the corresponding packaging form in the “package” column. For LED, the packaging form of button “K” is “sw-push1”.

6.3 placing components

After the components are packaged, to enter the Ares operation interface, first click the icon in the main toolbox, which is the 2dgraphics box mode. Select the current board layer as “board edge” (yellow) in the drop-down box in the lower left corner, and click in the work area to pull out a yellow box. Set the size as required, that is, the PCB editing board layer. In the case of few components, in order to achieve the desired design effect, the method of manually arranging components is adopted. Click the component mode icon in the main toolbox, select a component in the component list, and then click the left mouse button in the editing area to place the component; If there are many components, the combination of automatic layout and manual layout can greatly improve the efficiency of plate making. After the components are placed, and “no DRC errors” is displayed in the lower right corner, there is no design rule error.

6.4 wiring

Ares provides two ways of interactive manual wiring and automatic wiring, which are usually combined to improve efficiency and make PCB have better electrical characteristics and more beautiful. Execute the menu command “tools” → “auto router”, pop up the “shape based auto router” dialog box, set the parameters as needed, and then click “OK” to start automatic routing, and then adjust it manually. The results are shown in Figure 4

Simulation design of water lamp based on Proteus and at80c51

6.5 rule checking

CRC check: click “tools” → “connectivitychecker”, the system checks the connectivity, and the bottom status box prompts “0 CRC vialitionsfound”, indicating that there is no CRC error and no DRC error.

6.6 copper coating

1) Top layer copper coating: click “tools” → “powerplane generator” to pop up the “power plane g e n e r a t o r” dialog box, and select “GND = powre”, “layer” in the “net” column of the dialog box

Select “top copper” in the “boundary” column and “T10” in the “boundary” column. After setting, click “OK” to apply copper on the top layer.

2) Bottom copper: just select “bottom copper” in “layer” column, other operations are the same as top copper.

6.7 3D effect display

Click “output” → “3D visualizatio n” to display 3D effects, as shown in Figure 5. Different 3D effects can be displayed through the drop-down menu of “view”.

Simulation design of water lamp based on Proteus and at80c51

6.8 output photo file

Click “output” → “IDF manufacturing output”, set parameters according to PCB production requirements, and click “generate” to generate corresponding photo file. Send the exported photo file and the corresponding drilling file to the PCB manufacturer for board making. You can also buy your own raw materials and make a water lamp PCB, which can deepen the understanding of SCM development process and working principle.

7. Conclusion

In this paper, Proteus Software is used as the simulation tool, Keil uVision 2 software is used as the program editor, and the simulation of single-chip microcomputer and the process of making PCB are relatively complete. At the same time, the production of water lamp is also a typical example of single-chip microcomputer; This will let the majority of MCU beginners have a general understanding of its development process. Using Proteus Software to carry out MCU simulation experiment not only reduces the loss of raw materials, but also makes up for the lack of experimental instruments and components. Through the simulation experiment, beginners can understand the development method of SCM system, which is very helpful to cultivate their comprehensive analysis ability, troubleshooting ability and development and innovation ability.

Source; internet

Leave a Reply

Your email address will not be published. Required fields are marked *