After you have a MCU learning board, you need to practice more. Connect the learning board to the computer, open the debugging software and sit in front of the computer. First, learn how to use the debugging software, and then start with the simplest running light experiment. When you can make the eight running lights flow freely according to your wishes, you have already entered the door. You will find
that MCU
is such a fascinating thing. It is so fun. This is not learning knowledge, but playing. When the program you wrote is realized according to your wishes, you are happier than doing anything else. You will be addicted, really. People who do electronics are really addicted. Then make the digital tube light up. After these two things, you can't help yourself. You have begun to consider which career you will take in this life. This is how to practice. When writing a program, you will definitely encounter many problems. At this time, you will look for it in a book or ask others. When you get the answer, you will remember it for a lifetime. Knowledge must be used in real life to solve practical problems, so that it can play its role. In addition, I will talk about the problem of programming in assembly and C language. Many students have C language courses in their freshman and sophomore years. I have also taken them. I know that at that time, we had to multiply, add, and calculate factorials every day. What's the point of learning it? Would you be stupid if you were asked to program a microcontroller in C language? We must be able to apply what is in the book. Microcontroller programming can be done in C language or assembly language, but I suggest that C language is better. If you have a foundation in C language, it will be easier to learn. If not, you can also learn C language while learning microcontrollers. C language is also very simple. It is just a tool. I advise you to learn it. It will definitely be useful in the future. Otherwise, you will have to learn it in the future. It doesn't matter if you don't know any assembly language, but if you don't know any C language, you will suffer in the future. Writing program codes in assembly language is highly efficient, but relatively difficult and verbose. It is extremely troublesome, especially when encountering algorithmic problems. Now the main frequency of single-chip microcomputers is constantly increasing. We do not need such efficient codes at all, because there are high-frequency clocks, and the ROM of single-chip microcomputers is also constantly improving, which is enough to hold any code you write in C language. There are many C language materials and they are easy to find. In the future, it will be very portable. You only need to change an IO port to write a temperature sensor program and it can be used anywhere, so I advise everyone to use C language. In summary, as long as you have confidence, can stick to doing things to the end, and have a strong will not to give up until you succeed, then learning a single-chip microcomputer is a very easy thing.
Steps:
1. Find a book to understand the structure of the single-chip microcomputer roughly. You don't need to understand it all.
2. Find a learning board to practice writing programs. Learning single-chip microcomputers is to practice programming. If you don't know how to ask people or look up books.
3. Find some small circuit materials on the Internet to practice designing peripheral circuits. After welding, debug it yourself and get familiar with the process.
4. Design your own circuits and products with your own style. You are already an expert
^_^.
Eight steps to learn MCU
Learning to use MCU means understanding the hardware structure of MCU and the application of internal resources, learning the initialization settings of various functions in assembly or C language, and programming to realize various functions.
Step 1: Use of digital I/O Using
buttons to input signals and LEDs to display output levels, you can learn the digital I/O function of pins. After pressing a button, a LED lights up. This is the function of combinational logic in digital circuits. Although it is very simple, you can learn general MCU programming ideas. For example, many registers must be set to initialize the pins so that the pins have digital input and output functions. Every time a function of the MCU is used, the register that controls the function must be set. This is the characteristic of MCU programming. Don't be afraid of trouble. All MCUs are like this.
Step 2: Use
of timer Once you learn how to use the timer, you can use the microcontroller to implement the timing circuit. The function of the timing circuit is powerful and has many applications in the control of industrial and household electrical equipment. For example, a single-chip microcomputer can be used to implement a corridor light switch with a button. After the button is pressed once, the light will automatically turn off after 3 minutes. When the button is pressed twice in a row, the light will always be on. When the button is pressed for more than 2s, the light will turn off. Digital integrated circuits can implement timing circuits, programmable logic devices (PLDs) can implement timing circuits, and programmable controllers (PLCs) can also implement timing circuits, but only single-chip microcomputers are the simplest and the lowest cost. The use of timers is very important. Logic plus time control is the basis for the use of single-chip microcomputers.
Step 3: Interrupt
The characteristic of a single-chip microcomputer is that a program is repeatedly executed. The execution of each instruction in the program requires a certain execution time. If the program does not execute a certain instruction, the action of the instruction will not occur, which will delay many fast things, such as the falling edge when the button is pressed. In order to make the microcontroller respond to fast actions during the normal operation of the program, the interrupt function of the microcontroller must be used. This function is that after the fast action occurs, the microcontroller interrupts the normal operation of the program, processes the fast action, and returns to execute the normal program after the processing is completed. The difficulty in using the interrupt function is that it is necessary to accurately know when to not allow interrupts to occur (shield interrupts) and when to allow interrupts to occur (enable interrupts), which registers need to be set to make a certain interrupt work, what the program should do when the interrupt starts, what the program should do after the interrupt is completed, etc.
After learning the interrupt, you can compile a more complex structure program. Such a program can do one thing and monitor one thing. Once the monitored thing happens, it interrupts the thing being done and processes the monitored thing. Of course, it can also monitor multiple things. Figuratively speaking, the interrupt function enables the microcontroller to have the function of eating in the bowl and watching the pot. Learning the above three steps is equivalent to the martial arts of the Eighteen Dragon Subduing Palms. If you have learned three palms, you can barely protect yourself.
Step 4: RS232 communication with the PC Microcontrollers
all have USART interfaces, especially many models in the MSP430 series, which have two USART interfaces. The USART interface cannot be directly connected to the RS232 interface of the PC. The logic levels between them are different, and a MAX3232 chip is needed for level conversion.
The use of the USART interface is very important. Through this interface, the microcontroller and the PC can exchange information. Although RS232 communication is not advanced, it is very important to learn the interface. To use the USART interface correctly, you need to learn the communication protocol, the RS232 interface programming of the PC, and so on. Imagine that the data on the microcontroller experimental board is displayed on the PC monitor, and the keyboard signal of the PC can be displayed on the microcontroller experimental board. How interesting it will be!
Step 5: Learn A/D conversion
The MAP430 microcontroller has a multi-channel 12-bit A/D converter. Through these A/D converters, the microcontroller can operate analog quantities, display and detect voltage, current and other signals. When learning, pay attention to the concepts of analog ground and digital ground, reference voltage, sampling time, conversion rate, conversion error, etc. A simple example of using the A/D conversion function is to design a voltmeter.
Step 6: Learn PCI, I2C interface and LCD interface
The use of these interfaces can make it easier for the microcontroller to connect to external devices, which is very important in expanding the functions of the microcontroller.
Step 7: Learn comparison, capture, and PWM functions
These functions enable the microcontroller to control the motor, detect the speed signal, and realize the control functions such as the motor speed regulator.
If you have learned all the above seven steps, you can design a general application system, which is equivalent to learning the ten moves of the Eighteen Palms of the Dragon Subduing, and you can attack.
Step 8: Learn the hardware and software design of USB interface, TCP/IP interface, and various industrial buses
It is very important to learn the hardware and software design of USB interface, TCP/IP interface, and various industrial buses, because this is the current development direction of product development.
Keywords:MCU
Reference address:Engineers share the steps to learn MCU
It is very important to learn the hardware and software design of USB interface, TCP/IP interface, and various industrial buses, because this is the current development direction of product development.
Previous article:Integrated Circuit_IC Testing Working Principle
Next article:A Brief Discussion on the Minimum System of Single Chip Microcomputer
Recommended ReadingLatest update time:2024-11-16 15:47
Simulation Intelligent Irrigation System Based on Single Chip Microcomputer
Simulating smart irrigation system:
First the schematic diagram
This is a simulation picture drawn with Proteus. Of course, there are also pictures of the actual object, but I have placed them all in my studio (it’s obviously a laboratory, okay?). I am currently studying outside, so I will not show the actual
[Microcontroller]
Circuit module design of intelligent environmentally friendly car based on AT89C52 microcontroller
With the rapid development of electronic products, "smart tools" are becoming more and more popular. Smart cleaning tools also bring great convenience to people's lives. Traditional cleaning tools have relatively single functions, they can only vacuum or mop the floor, and are basically manual, making them laborious
[Microcontroller]
What creative gadgets can a microcontroller do? How can a novice make a microcontroller smart car?
Once, a boss told me that he envied those of us who work in technology. We all feel a bit ironic that a person worth tens of millions is envious of those of us who earn less than 200,000 a year. But judging from the way he spoke, he seemed to be serious. He said that he also liked to study technology, but he was too o
[Microcontroller]
Reading matrix keyboard based on single chip microcomputer, using digital tube to display corresponding key value
/****************************************************** **** 007.ASM Wiring: P0 port connects to digital tube and P2 port connects to matrix keyboard. Use timer interrupt. If there is no operation for a period of time, the digital tube will enter the self-circulation display **************
[Microcontroller]
Design of a Single-Chip Microcomputer Multi-Machine Communication System
1 Introduction
With the continuous development of single-chip microcomputer and computer technology, the application of single-chip microcomputer has also developed from independent single machine to network. The multi-machine network system composed of computer and single-chip microcomputer has become a direct
[Microcontroller]
Simple Intelligent Robot Designed Based on AT89C51 Single Chip Microcomputer
With the continuous development of microelectronics technology, the integration of microprocessor chips is getting higher and higher. Single-chip microcomputers can integrate multiple circuits such as CPU, memory, timer/counter, parallel and serial interface, watchdog, preamplifier, A/D converter, D/A converter on a
[Microcontroller]
51 MCU timer/counter structure and mode control register TMOD
1. The structure of the timer/ counter is shown in Figure 1. Picture 1 2. Timer/Counter Mode Control Register TMOD TMOD is used to control the working mode and operation mode of the timer/counter. Its byte address is 80H and the format is as follows: The lower 4 bits are used to determine the working mode
[Microcontroller]
51 MCU Study Notes [VIII] - Stepper Motor
1. Stepper Motor Basics 1. Definition The stepper motor is an actuator that converts electrical pulses into angular displacement. It mainly uses permanent magnet stepper motors. The stepper motor used in this experiment is a four-wire bipolar stepper motor. The phase number of a stepper motor refers to the number of p
[Microcontroller]
- Popular Resources
- Popular amplifiers
- Wireless Sensor Network Technology and Applications (Edited by Mou Si, Yin Hong, and Su Xing)
- Modern Electronic Technology Training Course (Edited by Yao Youfeng)
- Modern arc welding power supply and its control
- Small AC Servo Motor Control Circuit Design (by Masaru Ishijima; translated by Xue Liang and Zhu Jianjun, by Masaru Ishijima, Xue Liang, and Zhu Jianjun)
Recommended Content
Latest Analog Electronics Articles
- High signal-to-noise ratio MEMS microphone drives artificial intelligence interaction
- Advantages of using a differential-to-single-ended RF amplifier in a transmit signal chain design
- ON Semiconductor CEO Appears at Munich Electronica Show and Launches Treo Platform
- ON Semiconductor Launches Industry-Leading Analog and Mixed-Signal Platform
- Analog Devices ADAQ7767-1 μModule DAQ Solution for Rapid Development of Precision Data Acquisition Systems Now Available at Mouser
- Domestic high-precision, high-speed ADC chips are on the rise
- Microcontrollers that combine Hi-Fi, intelligence and USB multi-channel features – ushering in a new era of digital audio
- Using capacitive PGA, Naxin Micro launches high-precision multi-channel 24/16-bit Δ-Σ ADC
- Fully Differential Amplifier Provides High Voltage, Low Noise Signals for Precision Data Acquisition Signal Chain
MoreSelected Circuit Diagrams
MorePopular Articles
- Innolux's intelligent steer-by-wire solution makes cars smarter and safer
- 8051 MCU - Parity Check
- How to efficiently balance the sensitivity of tactile sensing interfaces
- What should I do if the servo motor shakes? What causes the servo motor to shake quickly?
- 【Brushless Motor】Analysis of three-phase BLDC motor and sharing of two popular development boards
- Midea Industrial Technology's subsidiaries Clou Electronics and Hekang New Energy jointly appeared at the Munich Battery Energy Storage Exhibition and Solar Energy Exhibition
- Guoxin Sichen | Application of ferroelectric memory PB85RS2MC in power battery management, with a capacity of 2M
- Analysis of common faults of frequency converter
- In a head-on competition with Qualcomm, what kind of cockpit products has Intel come up with?
- Dalian Rongke's all-vanadium liquid flow battery energy storage equipment industrialization project has entered the sprint stage before production
MoreDaily News
- Allegro MicroSystems Introduces Advanced Magnetic and Inductive Position Sensing Solutions at Electronica 2024
- Car key in the left hand, liveness detection radar in the right hand, UWB is imperative for cars!
- After a decade of rapid development, domestic CIS has entered the market
- Aegis Dagger Battery + Thor EM-i Super Hybrid, Geely New Energy has thrown out two "king bombs"
- A brief discussion on functional safety - fault, error, and failure
- In the smart car 2.0 cycle, these core industry chains are facing major opportunities!
- The United States and Japan are developing new batteries. CATL faces challenges? How should China's new energy battery industry respond?
- Murata launches high-precision 6-axis inertial sensor for automobiles
- Ford patents pre-charge alarm to help save costs and respond to emergencies
- New real-time microcontroller system from Texas Instruments enables smarter processing in automotive and industrial applications
Guess you like
- Infrared remote control
- EEWORLD University ---- Introduction to the internal structure of FPGA (Intel official tutorial)
- EEWORLD University Hall----Live Replay: Keysight High-Speed Oscilloscope Basics and Keysight's New Oscilloscope Analysis
- Micropython-Editor that can embed Micropython
- TVS Tube Selection
- Msp430f5529 car source code exchange
- Let's take a look at domestic chip tubes and imported chip tubes
- Application of Zigbee in Traffic Light Control
- (Xiaomi) Hualai Xiaofang Smart Camera Disassembly
- The role of Python in developing real-time embedded systems