Detailed explanation of the classic experimental examples of the single-chip microcomputer (with source program)

Self-study

Whether as an amateur electronics enthusiast or a related practitioner in the electronics industry, mastering MCU technology will undoubtedly make you more comfortable, open the door for your electronic production or development of electronic products!

And now the craze of learning MCU technology is heating up, the electronic enthusiast network has opened a detailed SCM learning column and a very popular forum discussion group, which is very helpful for friends who want to learn MCU, it can be said that the current MCU learning environment is The best, after a period of hard work, the use of microcontrollers to develop and design electronic products is no longer a "patent" of professional electronics engineers! As an ordinary electronic enthusiast, you can master it through some efforts! Foreign electronic enthusiasts use SCM to design small production is very popular, some intelligent robots, intelligent automatic devices are inseparable from the inside of the MCU ~~~

Learning MCU technology has certain difficulties. It is difficult to learn without spending a lot of effort, but as long as you keep working hard, you will succeed. Apply an ad lyrics: Efforts always pay off!

It is best to start with the 51 series. The first is the book, the data, and the number of people who master the 51 technology, the number of teachers who can ask questions, the 51 series experimental chip AT89C51 is cheap and easy to buy. To, AT89C51 chip and can be repeatedly erased more than 1000 times, is really suitable for beginners, even if you consider industrial applications in the future, you can learn 51 after learning other types of microcontrollers, after all, the technology is the same.

The first step in learning a single-chip computer is reading a book. The single-chip computer is a knowledge-intensive Dongdong. It is absolutely impossible to read a book. Beijing University of Aeronautics and Astronautics Press has published a large number of good books on single-chip computers. You can log in directly to their website for mail order. I think that the first book should be the basic principle book of the 8051 single-chip computer. The first book I read is a question from the Tsinghua University Press of Tsinghua University Press, which is a university of 51. Textbooks, a systematic introduction to the basics of the 51 chip, I think this book is still very helpful to me, can systematically understand 51 single-chip, although not easy to understand at first, but it is very useful, very chewable Head, you can look at it first, and you can study it in trial practice later.

Here I recommend a beginner to learn a multimedia CD-ROM of the single-chip microcomputer. This CD-ROM has a more detailed basic knowledge of the single-chip microcomputer. Because it is illustrated, it is easier to learn. It is easy to get interested in learning. Of course, it is still necessary to read the book. More systematic and comprehensive.

"MCS-51 MCU Practical Interface Technology" This is a good book published by Beijing University of Aeronautics and Astronautics Press. It describes the common interface technology of MCU in detail. If you want to develop products in the future, then you can have one! "Microcontroller Practice and Application" This book introduces the experiment with single-chip microcomputer in detail. It has a very practical assembly source program. It can be tested by imitating the above program to quickly master the single-chip technology.

The second step of learning the MCU is to purchase the tool. The MCU chip must be programmed by the programmer. The programmer used by the webmaster is a Genius NSP general-purpose programmer with better performance. The general-purpose programmer is specially developed for the MCU. It is a general-purpose model designed to write various types of memories. It has high programming reliability and supports a wide variety of devices.

Genius NSP Universal Programmer:

4Opins universal locking socket. Adapt to the needs of most device programming. Use an adapter to support programming of non-DIP packaged devices.

RS232 port communication. Communication baud rate: 57600bit/s

9V/500mA power converter.

Main functions: EPROM, EEPROM, FLASH, MPU/CPU, PLD. Serial EEPROM programming of six major types of devices; testing of RAM devices and CMOS/TTL devices, etc.

The optional device is inserted into the automatic detection start function. When you select this function and start it, you no longer need to start the operation with a click of the mouse. The operation starts automatically every time you replace the chip and lock the universal socket.

Genius NSP can run on WINDOS95, 98, me, 2000, XP.

In the long run, it is necessary to purchase a universal programmer.

The third step in learning a microcontroller is repeated programming practice. Here you need a test board for the AT89C51.

The emulator is familiar to both beginners and some strangers, mainly because the price of traditional emulators on the market is more than a thousand dollars, which is not a small expense for people who are not very economical. At the same time, the emulator is used to improve the efficiency of the debugging program, and it is not necessary, so the webmaster has not used the emulator at the beginning of the self-learning microcontroller. When it encounters a program error, it has to be meditation or inserted in the program. Some instructions for driving the port, and then connect some LEDs for simple instructions, generally debugging a program, it is very common to repeatedly write dozens of chips.

Now we introduce a new type of cheap online emulator: it uses a single-chip microcomputer of STC89C516RD from Hongjing Company [SST], and the emulator is connected to the PC through the serial port. This type of MCU is one of the 51 series MCUs, with ISP ( In the system programmable) function, the program can be downloaded serially, emulating 63K user program space, with 450 external RAM bytes.

After having the necessary tools, you can start to learn the MCU. The programming of the MCU can be done in assembly language or C language. The assembly language is characterized by compact code, low computer requirements for beginners, quick start, but programming workload. Large, the program example of the webmaster website is written in assembly language. The C language mentioned here is the C language dedicated to 51 single-chip microcomputer. It is characterized by high writing efficiency, but it requires high level of user's computer. Already in C language, there is also a single-chip C language tutorial on the website of the electronic enthusiast website. I think that the beginner MCU is better to understand some assembly language. The assembly language can directly control the resources of the MCU, such as the specific MCU pin and memory address. It is also necessary to master these. Learning assembly language can lay a good foundation. This is also the case with many reference books. If you are a professional MCU developer, the C language is more efficient and more suitable for you.

Self-learning assembly language, you must first learn to understand other people's assembly language programs, you can translate assembly language instructions into self-understanding functional descriptive text, detailed comments behind the program, so that you can easily refer to later or others can easily understand. The webmaster sees that some of the assembler's comments are very few, which is very unfavorable for beginners to learn and communicate with each other, so as long as the program written by the webmaster has made a very detailed comment.

Learning assembly language can refer to related books. There are more than 100 instructions in assembly language, but the commonly used instructions are also twenty or thirty. You can remember the common assembly instructions first. If you can't remember, you can print on paper and get familiar with it. Then, the other people's assembly program will be tested and verified. Finally, the relevant parameters of the assembler can be modified and tested repeatedly on the basis of their own understanding. This is a shortcut to quickly master the single-chip microcomputer!

Primary Filter

Pre-Filter,Primary Filter,Primary Air Filter,Air Filter Primary

Dongguan V1 Environmental Technology Co., Ltd. , https://www.v1airpurifier.com

Posted on