How do novices learn microcontrollers? Which software is better for simulation?[Copy link]
First of all, every MCU programming software has a software simulation function. We can learn some MCU functions through this software simulation function. For example, the software simulation function can be used to realize the high and low level output of the MCU port, and then observe the value of the corresponding port register to see if the program is executed correctly; you can also write a timing program to implement the output function of the port at a fixed time (for example, timing 1 second), and use software simulation to see if the interrupt is entered according to the set time, and so on. However, the function of software simulation is really limited. At most, we can only see whether the corresponding registers are executed correctly. Because there is no hardware circuit cooperation, we can't see whether the circuit is executed correctly. Therefore, the software simulation function of the microcontroller programming software can only be used to learn the microcontroller. The first software recommended in this regard is proteus, which is the software I have seen and used so far, and it can simulate the most types of microcontrollers. The microcontrollers supported by the proteus software include: 51 microcontrollers, PIC microcontrollers, MSP430 microcontrollers, Freescale microcontrollers, and also supports LPC21xx series ARM7, and some cortex m3 chips. Especially for 51 single-chip microcomputer, proteus has embedded the programming software keil of 51 single-chip microcomputer into it, and can write programs, build circuits, simulate systems, generate PCB and so on in proteus. It is equivalent to realizing all functions of software design, hardware design, PCB drawing and so on of a single-chip microcomputer, which is very convenient. The function of proteus is very powerful. We can draw the circuit diagram first, and then load the compiled MCU burning file into the MCU in the circuit diagram, and then we can run the whole MCU system and observe whether each part of the circuit is the same as the software function we designed, such as whether the LED is lit, the LCD is displayed, the button is detected, the IIC device accesses data normally, etc. Proteus even provides many virtual instruments, such as virtual oscilloscope, voltmeter, ammeter, logic analyzer, etc. These instruments can be used to observe the operation of programs and circuits. For example, an oscilloscope can be used to observe whether the output waveform of the PWM we designed meets the design requirements.