Two years ago, when I was learning about 51 MCU, I bought a 51hei MCU development board. Now I am learning FAT32, UGUI and UCOSII operating systems based on STM32 embedded system. I rarely look at 51 MCU development boards. One day, my baby suddenly asked me to buy her a remote control car, saying that others have one. I checked the Internet and found that the price of a car with better performance is quite high. I suddenly remembered that I still have an idle 51hei MCU development board. Why not make a smart car for my baby? Stop talking and take action.
After nearly a week of work, the car was finally completed. Although it looks a little ugly, its performance is not bad. Main functions: 1. Infrared remote control, the car can move forward and backward synchronously, turn left, turn right, reverse left, and reverse right; 2. Automatic barrier during driving. In fact, you can add any function as long as you are willing to spend money.
The program is modified based on the source code of the infrared experiment of the 51hei single-chip microcomputer development board. The program is very simple and uses the interrupt working mode. The power supply was bought from someone who collects old mobile phones. Although it is old, it still performs well after my charging experiment; the frame, motor and infrared probe were bought online. The motor drive circuit was designed by myself. It can be said that it is tailor-made for the peripheral circuit of the 51hei single-chip microcomputer development board. For this motor drive circuit, I really spent a lot of thought and money---I used 4 DC solid-state relays (of course, it is free, and I got them from the unit). The most time-consuming and thoughtful part of making this car is program debugging and motor drive circuit design. Anyway, the car is "obedient" and runs. Single-
chip microcomputer is a very practical science. If you simply learn theoretical knowledge without practice, it is difficult to fully grasp the single-chip microcomputer. Although the single-chip microcomputer is an intelligent integrated chip, it is essentially an electronic component. Since it is an electronic component, it must be operated in a certain circuit to realize its function. This is just like a resistor. If a resistor is placed independently, it is meaningless. Only when the resistor is connected to the circuit can its function be realized. Whether it is voltage division, current division or current limiting depends on the detailed circuit.
By debugging the program by myself and modifying the code repeatedly, I also experienced many unexpected things. For example, to which IO port the signal line of the infrared probe is connected, we should try to consider the interference of the infrared signal on the peripheral system of the microcontroller, how the main loop and the interrupt cooperate, etc. By dealing with these unexpected things, I deeply realized a truth: practice makes perfect! Of course, theory is the basis of practice. By making a car by myself, it can be said that it is also a kind of review of the knowledge of 51 single-chip microcomputer: I have a deeper understanding of the minimum system, working principle, and MCU resources of the single-chip microcomputer!
In fact, the smart car can also be regarded as a simple robot. The more complete the robot's functions and the higher the degree of intelligence, the higher the requirements for the MCU. Simple robots can only complete the intelligent control of the robot by working in the main program in the main loop or interrupt mode; if it is a very complex motion intelligent robot (using a large number of sensors), it must be equipped with an operating system. This shows how important the operating system is! And the affordable operating system that is easy to transplant in the industrial field is naturally the free and open source UCOSSII operating system!
Knowledge is integrated. When I was learning C language by myself, I felt it was boring; but when I combined C language with embedded systems and learned it by using it, I felt different. I lamented that time and energy are limited, and there are too many things to learn! No matter what, I must seize the time to learn the powerful STM32 thoroughly; remember this year's task: I must master the "three major things" of FAT32, UGUI and UCOSII operating system.
Previous article:51 single chip microcomputer drives stepper motor (assembly language)
Next article:51 single chip microcomputer to simulate playing table tennis
- Popular Resources
- Popular amplifiers
- Learn ARM development(16)
- Learn ARM development(17)
- Learn ARM development(18)
- Embedded system debugging simulation tool
- A small question that has been bothering me recently has finally been solved~~
- Learn ARM development (1)
- Learn ARM development (2)
- Learn ARM development (4)
- Learn ARM development (6)
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- LED chemical incompatibility test to see which chemicals LEDs can be used with
- Application of ARM9 hardware coprocessor on WinCE embedded motherboard
- What are the key points for selecting rotor flowmeter?
- LM317 high power charger circuit
- A brief analysis of Embest's application and development of embedded medical devices
- Single-phase RC protection circuit
- stm32 PVD programmable voltage monitor
- Introduction and measurement of edge trigger and level trigger of 51 single chip microcomputer
- Improved design of Linux system software shell protection technology
- What to do if the ABB robot protection device stops
- CGD and Qorvo to jointly revolutionize motor control solutions
- CGD and Qorvo to jointly revolutionize motor control solutions
- Keysight Technologies FieldFox handheld analyzer with VDI spread spectrum module to achieve millimeter wave analysis function
- Infineon's PASCO2V15 XENSIV PAS CO2 5V Sensor Now Available at Mouser for Accurate CO2 Level Measurement
- Advanced gameplay, Harting takes your PCB board connection to a new level!
- Advanced gameplay, Harting takes your PCB board connection to a new level!
- A new chapter in Great Wall Motors R&D: solid-state battery technology leads the future
- Naxin Micro provides full-scenario GaN driver IC solutions
- Interpreting Huawei’s new solid-state battery patent, will it challenge CATL in 2030?
- Are pure electric/plug-in hybrid vehicles going crazy? A Chinese company has launched the world's first -40℃ dischargeable hybrid battery that is not afraid of cold
- HGI HC32A460 series function comparison chart
- PCB drawing process shortcut keys
- How to start power supply design
- EEWORLD University ---- Machine Learning
- Has anyone tried the baud rate adaptation of LIN communication?
- Analog Electronics Design
- Will adding a nonlinear link to the RC bridge sine wave oscillation circuit cause waveform distortion?
- Introduction to TI_DSP link command file (*.cmd)
- [N32L43x Review] 2. Turn on the lights, blink, blink, blink...
- EEWORLD University Hall - Talking about the development creativity of electronic products and using network resources to help development