The learning process of MCU summarized by experts can be divided into four stages
The first stage
First browse the hardware part of the textbook, to understand the hardware structure of MCU. Such as ROM, ram, address, I / O port, etc., and look at the data sheet of some manufacturers to enhance the impression of the resources provided by MCU.
The second stage
Is to understand the binary, hexadecimal and software content. Although there are many high-level languages that can be used for MCU programming, I think assembly language is better for beginners, which is more conducive to combining with hardware and mastering hardware structure. After knowing the concepts of assembly language, machine language, instruction, program, etc., you can learn assembly language and programming from MOV instruction. For example, 51 MCU assembly language system has 111 instructions, which is simple and easy to understand how they relate to hardware, Therefore, the method can first understand several basic mov instructions and its machine language, roughly establish the concept of hardware and software of single-chip microcomputer, and know that the hardware of single-chip microcomputer is controlled by instructions.
The third stage
According to the user manual of programming environment, familiar with programming environment. Today’s programming environment is generally connected with the computer, as long as people with basic computer knowledge can quickly master the operation steps.
The fourth stage
Relying on the experimental board, we can learn and master the assembly language instruction system and simple programming of MCU. At the same time, combined with the previous knowledge of hardware, it plays a dual role of learning software and consolidating hardware. At the beginning, we can use a simple program compiled by others to verify and analyze on the experimental board, mainly to be familiar with the learning method. In the aspect of application, we mainly focus on the use of MCU I / O interfaces, such as the application of a / D, D / A, PWM output, the control of LCD and VFD, and how to standardize the communication protocol of various serial output ports, It is necessary to analyze the driving ability of the controlled components, such as current and voltage.
After being familiar with assembly language, it is suggested to learn the programming of C language as soon as possible. After all, C language has rich library functions, fast operation speed, high compilation efficiency, good portability, and can directly control the system hardware. C language is a kind of structured programming language, which supports the top-down structured programming technology widely used in current programming. In addition, the C language program has a perfect modular program structure, which provides a strong guarantee for the use of modular programming method in software development. Therefore, the use of C language programming has become a mainstream of software development. Using C language to write the target system software will greatly shorten the development cycle, and significantly increase the readability of the software, which is easy to improve and expand, so as to develop a larger scale and more complete performance system.