Create a new Proteus project file and the drawing and brief introduction of the minimum system of 51 single-chip microcomputer

1. Create a new Proteus project

1. Create a new folder to store the project

 

2. Open the Proteus 8 software, the interface is shown in the figure

 

3. Click [New Project]

 

4. Fill in the project name, select the project save path ( the new folder created in step 1 ) and click [ Next ]

 

5. Select [Create schematic diagram from the selected template] , select a specific template and click [ Next ]

You can choose different templates according to your needs. If you don’t need a template, choose DEFAULT

 

6. Select [Do not create PCB layout design] and click [ Next ]

 

7. Select [No firmware item] and click [ Next ]

Because my firmware will be generated by Keil software. If you want to write MCU code directly with Proteus, you can choose to create a firmware project, but Proteus is not a professional compilation software after all, so I don't recommend writing code with Proteus.

 

8. Click [ Finish ] to create the project.

 

9. After the project is created, it will enter the schematic drawing interface

 

10. Use Proteus 8 software to open the file with the suffix .pdsprj to open the existing project file

 

2. Draw the 51 minimum system

1. First preview the schematic diagram we want to build

 

2. The final drawing of the finished renderings

 

3. Table of components and corresponding keywords that need to be used in the above figure

device

Key words

single chip microcomputer

89C52

resistance

RES

capacitance

CAP

button

BUTTON

crystal oscillator

CRYSTAL

electrolytic capacitor

CAP-ELEC

Using proteus simulation, it is not possible to add an STC single chip. It is not necessary to use STC89C52, as long as it is a 51 single-chip microcomputer, it can simulate the effect. And STC89C52 is completely compatible with AT89C52, they are exactly the same. It must be displayed as an STC single-chip microcomputer, after placing the AT89C52, double-click the model, and change it to STC89C52.

Resistors ( Resistors ) and capacitors ( Capacitors ) can be selected according to their subcategories ( Category ) due to the large variety. The biggest difference between different types of capacitors or resistors is reflected in the size of the package, and the device attribute value can be adjusted at will, so you can choose one arbitrarily.

 

4. The following introduces two methods and shortcut keys for finding components in Proteus 8 software

There are two ways to open the Proteus 8 device library ( click the icon [Component Mode] -> icon [ p ]; click the menu bar [Library] -> [ Pick Parts ] ) or use the shortcut key P

a ) Click the icon [Component Mode] -> icon [ p ] to add components, search for the required components in the search box, select the component and click [OK]

 

b) Click [Library] -> [Pick Parts] in the menu bar, search for the required components in the search box, select the component and click [OK]

Note: If your Proteus 8 software has the following error reports, it may be that you have installed Proteus 8 to the C drive. At this time, you need to open Proteus 8 with administrator privileges to use the device library normally (or reinstall Proteus 8 to another drive — there may be other solutions too).

 

5. Referring to step 4 , add the devices listed in step 3 to the project

The component diagram after adding is as follows

 

6. In addition to the device, there are also power ( POWER ) and ground ( GROUND ). These two search methods can be viewed in the following figure:

7. Referring to the diagram in step 2 , drag the components, power ( POWER ) and ground ( GROUND ) to the interface, and connect the circuit

The value is ignored for now. The operation of wiring between device pins is relatively simple, just click on two pins in sequence.

8. Set component properties

Capacitors have capacitance properties, and resistors have resistance properties. To modify them, you can double-click the device or right-click to select edit properties . Modify the property values ​​of related components and power supply ( POWER ) to the values ​​shown in the figure below

The figure below sets the value of capacitor C1 to 30 pF :

 

3. A brief introduction to the minimum system of 5 1 single-chip microcomputer

1. What is a minimal system

The application system that can make the single chip work with the least components


2. Three elements of the minimum system

Power supply, clock circuit and reset circuit

 

3. Power supply

It is the VCC and GND circuit. Any electronic equipment needs power supply. When using it, pay attention to the input requirements of the power supply voltage of the single chip microcomputer, generally 3.3~5V

4. Clock circuit

The crystal oscillator is the heart of the single-chip microcomputer, without the crystal oscillator, the single-chip microcomputer cannot work normally

What is a clock circuit? There is a component called a crystal oscillator in the smallest system of a single-chip microcomputer. This component has an effect called the piezoelectric effect . What is the piezoelectric effect?

Piezoelectric effect: When some dielectrics are deformed by external forces in a certain direction, polarization will occur inside them, and at the same time, opposite charges will appear on its two opposite surfaces. When the external force is removed, it will return to the uncharged state. This phenomenon is called the positive piezoelectric effect. When the direction of the force changes, the polarity of the charge also changes. On the contrary, when an electric field is applied in the polarization direction of the dielectric, these dielectrics will also deform. After the electric field is removed, the deformation of the dielectric will disappear. This phenomenon is called the inverse piezoelectric effect.

Then, looking back at the clock circuit of the microcontroller, what is the principle. If you have played with single-chip microcomputers, you can use an oscilloscope to find that the clock circuit of the single-chip microcomputer outputs a square wave. This square wave is the clock that drives the single-chip microcomputer. The frequency of the square wave determines the speed of the single-chip microcomputer.

There is a high-gain inverting amplifier in the MCS-51 single-chip microcomputer chip. The input terminal of the inverting amplifier is XTAL1, and the output terminal is XTAL2. The oscillator circuit and clock circuit formed by this amplifier together constitute the clock mode of the single-chip microcomputer. According to the difference of the hardware circuit, the clock connection mode of the one-chip computer can be divided into the internal clock mode and the external clock mode, as shown in Figure 1.

It can be seen that the inside is an inverter, and its principle is to continuously change the voltage (polarity) at both ends of the crystal oscillator, and finally output a square wave signal. The clock of the microcontroller is determined.

 

5. Reset circuit

The reset circuit is a circuit used to restore the circuit to the initial state, which is equivalent to restarting the computer.

As the name suggests, the reset circuit is to reset the microcontroller. Common reset circuits are as follows:

In the reset circuit, the capacitor is connected in series with the resistor. As can be seen from the figure, when the system is powered on, the RST pin is kept at a high level first, and the time for keeping the high level is determined by the time constant RC value of the circuit. The high level of the RST pin of the microcontroller will reset for more than two machine cycles, so the reset time is maintained by calculating the RC time constant.

Guess you like

Origin blog.csdn.net/xijinno1/article/details/131671439