Let’s learn the version. I have a Wu Jianying microcontroller development board, which is very helpful.
I learn microcontrollers out of interest. Although I often make small products, of course I am only a newbie in this subject. I am still a beginner in many technologies. There are really too many awesome people. Students often ask me how to learn microcontrollers, and my answer is always two words: practice. I think practice can bring out true knowledge. Without practice, you will never learn microcontroller. This is the same as if you read a hundred recipes and don’t cook, you will never be able to cook delicious food. If you read a hundred swimming books and don’t get into the water, you will never learn to swim. It's a truth. So how to put it into practice? This may be the question that beginners are most concerned about. There are many similar answers on the Internet. This is a cliché. As long as you are thoughtful, you can search a lot.
Let me briefly talk about the steps I took to learn microcontrollers:
1. Purchase commonly used tools (multimeter, soldering iron, soldering iron stand, rosin, solder, screwdriver, solder absorber, camera) and electronic components (universal boards, resistors, capacitors, light-emitting diodes, rectifier bridges, digital tubes, commonly used connectors, etc.), first make a 5V DC power supply (transformer/rectifier bridge/7812/7805/a number of electrolytic capacitors, the polarity of the capacitor (The genders are not reversed), let’s start with the basic light-emitting diode drive circuit, sinking current or sourcing current? How big should the current limiting resistor be? How is it calculated? Have you found that you don’t understand a lot of basic knowledge, and you can’t even name the component model? It doesn't matter, just ask more people, there are still enthusiastic people in forums and QQ technical groups. Prepare a notebook where useful knowledge should be written down.
2. Use a universal board to build a minimum system of 51 (of course you have to start with 51, there is too much information), then light up an LED, then the digital tube, buzzer, relay, EEPROM, AD/DA, LCD, clock chip, digital thermometer, infrared remote control codec, etc. Transistors are commonly used here. Sometimes they are used for amplification and sometimes they are used for switches. You must understand them clearly. It seems that there is really a lot of work to be done. Don't rush this. Do it one by one. Who makes you want to learn real skills? It is also very convenient to buy a development board if you have the conditions. If you insist on DIY, it will be endless fun. Many chips can be applied for free. The best ones are from Maxim. Many of the chips I use are applied from there, such as: MAX1270, DS12C887, DS18B20, MAX518, MAX396, MAX7219, MAX145, etc., here I sincerely thank Mexin Company for providing me with free lunch. Of course, the datasheets of these chips are all in English, so friends, even though we are studying electricity, we still need to learn English well.
3. When it comes to programming microcontrollers, most people come into contact with assembly first. To learn microcontrollers well, you need to understand assembly, but in the end you must master C language. C language is really too powerful and convenient. Its benefits I don’t need to say more. Personally, the IDE I feel is best is Keil, and I recommend it here. Of course, I started with the marquee. There are many source codes for microcontroller experiments on the Internet. They are all excellent learning materials. If you digest them carefully, you will gain a lot. The serial port communication example of "hello world" should be opened as soon as possible. In the absence of an emulator, the serial port is the best debugging tool. An expert once told me: when you get a processor, the first thing to do is to open the serial port. Once the serial mouth is clear, it is like a martial arts practitioner who has opened up all the muscles and veins in his body, and then learning other martial arts will be a piece of cake. The timer is a very important resource of the microcontroller, and its usage must be clear. Experts have said that a microcontroller without a timer is not a microcontroller. In fact, I have never seen a microcontroller without a timer. In addition, a good programming style is also very important. You will benefit a lot by taking a look at the relevant information. There is also a lot of such information on the Internet.
4. After the program is written, how to download it to the microcontroller? It is always not good to borrow other people's programmers. Now some microcontrollers have ISP functions, such as 89S5X and AVR microcontrollers. There is an Easy 51Pro v2.0 universe version on the Internet. The information is very complete. Thank you for your selfless dedication. Follow the circuit he said and make your own ISP download cable. It will be very easy to use. If the one you make yourself doesn’t work, it’s not expensive to buy a ready-made one. If you still can't bear the money, then try STC's 51 series microcontroller. You can use the serial port to burn your program. This is actually called IAP. If you are interested, you can search it online. Of course, when you use more microcontrollers in the future, a programmer will still be indispensable.
5. Troubleshooting of microcontroller faults: For problems with microcontrollers, first understand the three elements of a CPU:
Power supply, clock source (crystal oscillator), reset circuit,
Is there any problem? It would be better if you have an oscilloscope. Check if there is a fosc/6 square wave signal on the ALE pin. If there is, it means that the microcontroller is working and the three elements have been met. No. If so, you can only take the trouble to check. In fact, it is very simple. Generally, there will be no problem if you refer to the circuit in the book.
When you make something by yourself, you can be considered a beginner and you will have a sense of accomplishment, but don’t be satisfied with this small success. These are still small tricks, and the road ahead is still long. Such as FPGA, PCB, DSP, ARM, etc., all need to be learned. Keep your circuits and source code, they are your wealth. There will be times when they are used. In addition, what you make may only be functionally feasible, but there is still a long way to go before it becomes a mature product. Stability and anti-interference are not minor issues. This knowledge must have good basic circuit theory. Digital electricity, analog electricity, and signals learned in college are very important, especially analog electricity. Review it carefully to ensure that you will gain new gains every time you review it. The road is long and long, so be patient and pursue it.