How to learn fast from single-chip microcomputer?

Many people ask how to learn fast, I will talk about it briefly.

There are 6 points for fast learning microcontrollers:

1. Familiar with the principle and structure of the single chip microcomputer;

2, learn a lot of electricity, mode power, lay a good foundation for the design of the circuit;

3. Skilled in using C language and learning other people's programs;

4. Have a certain understanding of the operating system principles;

5, Protel at least a little basic;

6, the ability to actually debug the circuit.

Steps to learn the microcontroller

There are many types of current MCUs, but 51 is the most basic, so the learning of MCUs is best started from 51, not only easy to use, but also quite practical. However, 51 single-chip microcomputers are too basic after all. Later, many single-chip microcomputers have great functions in terms of expansion. Therefore, according to the majority of our lab's route, most people will learn AVR microcontrollers. AVR microcontrollers have a large function compared with 51. It has many practical functions such as A/D and fast PWM, and it has many similarities with many large-scale single-chip microcomputers. Therefore, if you want to master other AVRs in the future, it is a good springboard.

Learning process

The ultimate thing in learning MCU is of course practice. The learning I said is different from the learning of MCU in the classroom. I have also read some MCU teaching materials before. Some textbooks are about the working principle and internal structure of MCU. These things are temporary for us. I don't need it, I will study it later when I start the class. What I want to learn now is to temporarily abandon the internal structure principle. How can I write some simple small programs with MCU? From the perspective of practicality, there is a saying on the Internet that is called the first post-practice theory.

Therefore, my point of view is as follows, the hardware structure of the microcontroller must first have a basic understanding, at least to know the function and difference of each pin, you can set up the minimum system of a single chip by yourself, and then you can start directly from the program, the program is the most Good to use C language programming, starting from a simple marquee, gradually deepening, you can gradually do some digital tube, LCD, DS1302, DS18B20 and other electronic components applications, in depth can be combined with some specific examples to expand some interrupts, serial ports Communication and other functions. Another point to be made is that the C language used in the MCU is actually very limited. A lot of the content of learning C++ in the classroom is not used in the initial MCU programming, so there is no need to feel that the C language foundation is not very Well, stop looking at the microcontroller!

Learning tool

In terms of software, 51 MCU uses KEIL software. This software is available in the school library software download and other websites. The specific usage of the AVR software is much more. I use CVAVR. There are a number of compiler software such as ICCAVR, depending on personal preference, it is recommended to have a certain 51 basis to learn. The other is the programming software. The function of the programming software is to burn the HEX file generated by the compiler into the MCU. This should be compatible with the download line. If there is a parallel port, it is best to use the parallel port to download the line. The software is best to use Guangzhou Ssangyong. SLISP software, if the notebook does not have a parallel port, you have to buy a downloader yourself, the name is USBASP, the online electronic market has to sell about 20 dollars, the software will come with the CD.

Hardware, the first is to have a single-chip, for the single-chip to pay attention to, 51 single-chip is best to buy 89S51, 89S52 these two models, the above mentioned programming program is ISP mode, these two kinds of microcontroller support ISP download, so If you buy other types of programming programs may be inconvenient, AVR microcontrollers are commonly used in other models of ATmega16L, the difference is not very large, and even some compatible. As for the MCU development board, the current price is very expensive, ranging from one hundred to several hundred, but the best of the sixty dollars like the last time the school advertisement was saved, it has no effect. It is good to buy a piece. If it doesn't, it doesn't matter. It is very convenient to buy a circuit board by yourself. It leads to the ISP interface. It is very easy to program the program, and then it is convenient to extend the I/O port.

Learn a few other points of attention for the microcontroller:

1. Both theory and practice

For a beginner MCU, if you follow the textbook-style approach, it is a lot of instructions and nouns. After learning for a long time, you can't figure out what these commands do. Maybe it will be boring in a few days. give up halfway. Therefore, the combination of learning and practice is a good way to learn, practice, and step by step, so that in less than a few times, the instructions used can be understood, thoroughly understood, rooted in the mind, and even "rooted". That is to say, when you have finished learning a few instructions (once you don't ask for more, just ask for it), you should do experiments next. Through experiments, you can feel the control effect produced by the previous instructions. See (light), ear to hear (sound), more deeply understand how the instructions are converted into signals to achieve control, through experiments to see that the results of their own learning not only have a sense of accomplishment can also enhance your interest in the microcontroller. To put it bluntly, the MCU is not so much as to learn it, but rather to do it experimentally. What is more, the experiment itself is also a learning process. Therefore, the learning method of learning while practicing is particularly effective.

2. Reasonable time to persevere

Learning MCU can't "three days of fishing, two days of drying the net", there must be perseverance and determination. After learning a few instructions, you should experiment in time and integrate them, instead of waiting for a few days or weeks to do the experiment, which is not good or even forgotten before and after school. In addition, you must have the psychological preparation for playing a "protracted war". Don't be interested in coming to school for a few days. If you are not interested, cool for a few weeks. One of the most important aspects of learning a microcontroller is perseverance.

3. Encounter problems and patiently check

MCU has two aspects of software and hardware. Sometimes, a program can't adjust its effect. However, from the theoretical analysis, it is correct. This is to look for the reason carefully. Learning MCU often encounters many problems, sometimes one or two days. Can not solve, it is necessary to have patience, look up from the bottom, I believe that every time you find a mistake will have a new harvest. Don't give up!

4. The knowledge that has only been learned for a short time is only slightly better than the glimpse of the light. Therefore, the better method is to re-learn again after a period of time (1-2 months), and the knowledge you have learned should be used frequently, so that you can thoroughly understand and digest it repeatedly and repeatedly, never forgetting.

5. To invest properly in the purchase of experimental equipment and books

The technology of single-chip technology has a high gold content. Once it is learned, the benefits brought to you are of course high. Whether it is applying for a job or starting a factory, the prospects are bright. Therefore, you should be willing to invest in the necessary learning and experimental equipment when you study. In addition, you should always go to the technology bookstore to buy some books that are suitable for your own study and improvement. A good book is really important, you can read it at any time, and you can add knowledge that you don't understand or forget.

Learning to use the microcontroller is to understand the hardware structure of the microcontroller, as well as the application of internal resources, to learn the initialization settings of various functions in the assembly or C language, and to implement the programming of various functions.

The first step: the use of digital I / O

Using the button input signal, the LED displays the output level, you can learn the digital I/O function of the pin. After pressing a button, a certain LED will light up. This is the function of the combination logic in the digital circuit, although it is very Simple, but you can learn the general idea of ​​microcontroller programming. For example, you must set a lot of registers to initialize the pins, so that the pins have digital input and output. For each function of the MCU, it is necessary to set the register that controls the function. This is the characteristic of MCU programming. Don't be afraid of trouble. All MCUs are like this.

Step 2: Use of the timer

By learning the use of timers, it is possible to implement sequential circuits with a single-chip microcomputer. The functions of the sequential circuits are powerful. There are many applications in the control of industrial and household electrical equipment. For example, a single-chip light switch with a button can be realized by a single-chip microcomputer. After the button is pressed once, the switch will automatically turn off after 3 minutes, and when the button is pressed twice, the light will not be extinguished. When the button is pressed for more than 2s, the light will be off. Digital integrated circuits can implement sequential circuits. Programmable logic devices (PLDs) can implement sequential circuits. Programmable controllers (PLCs) can also implement sequential circuits, but only single-chip microcomputers are the simplest to implement and have the lowest cost.

The use of timers is very important, and logic plus time control is the basis for the use of microcontrollers.

The third step: interrupt

The characteristic of a single-chip computer is that a program is executed repeatedly. The execution of each instruction in the program requires a certain execution time. If the program does not execute an instruction, the action of the instruction will not occur, which will delay many rapid occurrences. Things, for example, the falling edge of the button when pressed. In order to make the MCU react to the fast action during the normal operation of the program, it is necessary to use the interrupt function of the MCU. This function is the program that interrupts the normal operation of the MCU after the fast action occurs, and processes the fast-acting action. After the process is completed, , returning to execute the normal program. The difficulty in using the interrupt function is that you need to know exactly when the interrupt is not allowed to be generated (masked interrupt), when the interrupt is enabled (open interrupt), which registers need to be set to make some kind of interrupt work. When the interrupt starts, the program should What to do, what should the program do after the interruption is completed, and so on.

After interrupting the learning, you can compile a program with a more complex structure. This program can do one thing and monitor one thing. Once the monitoring happens, interrupt the things that are being done, and handle the monitoring. Of course, you can also Monitor multiple things, the metaphor of the image, the interrupt function makes the MCU have a bowl of food, and look at the function in the pot.

The above three steps of learning, it is equivalent to the dragon 18 martial arts, will have three palms, you can barely protect your body.

Step 4: RS232 communication with PC

The MCU has a USART interface, 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 level between them is different. A MAX3232 chip is required for level conversion.

The use of the USART interface is very important. Through this interface, information can be exchanged between the MCU and the PC. Although RS232 communication is not advanced, it is very important for the interface learning. Proper use of the USART interface requires learning communication protocols, RS232 interface programming for PCs, and more. Imagine that the data on the MCU experiment board is displayed on the PC monitor, and the keyboard signal of the PC can be displayed on the MCU experiment board. What an interesting thing!

Step 5: Learn A/D conversion

The MAP430 microcontroller has a multi-channel 12-bit A/D converter. These A/D converters allow the microcontroller to operate analog, display and detect voltage, current and other signals. Pay attention to the concepts of analog ground and digital ground, reference voltage, sampling time, slew rate, and conversion error.

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 makes it easier for the microcontroller to connect to external devices, which is important in extending the functionality of the microcontroller.

Step 7: Learn to compare, capture, and PWM functions

These functions enable the microcontroller to control the motor, detect the speed signal, and implement control functions such as the motor governor.

If you learn all the above seven steps, you can design a general application system, which is equivalent to learning the ten strokes of the dragon, and you can attack.

Step 8: Learning USB interface, TCP/IP interface, hardware and software design of various industrial buses Learning USB interface, TCP/IP interface, hardware and software design of various industrial buses is very important, because this is the current product Development direction of development.

So far, it is equivalent to learning 15 strokes of dragons and 18 palms, but it is not enough to hit the realm of invincible hands in the world. Even so, it is a single-chip prawn.

battery holders


Antenk Battery Holders, Battery Snaps an Mobile battery connectors are designed to create connections and contain batteries in electronic equipment. This series includes battery holders and coin cell holders for AAA, AA, C, D, 9V and lithium coin cells. Antenk produces this series in a variety of terminations such as through hole PCB leads, SMT leads, wire leads and solder lugs. Custom lead lengths on wire configurations are also avaialble. Our superior retention holders are molded of UL-94V0 or UL-94HB material with spring steel contacts and perform extremely well under normal or adverse environment conditions.


Antenk offer a large range of battery and coin cell holders and battery contacts for various mounting requirements.
Our battery clips, contacts & holders are designed with leading edge technology in mind, to accommodate all major manufacturers` batteries.
Available in a wide range of materials and mounting styles including SMT, THM & off board.
Some of the applications include : Telecommunications, memory hold, emergency power systems, personal medical monitoring devices.
Battery Holders

battery holders
Antenk battery holders rely on continuous innovation.
Every year we continue to innovate and create not only new types holders for new kinds of batteries, but also new types of holders for common batteries. Our award-winning designs have been used in all types of projects around the world, and they have been everywhere from under the sea to outer space. No matter what size and shape battery holder is needed, we can provide a solution. Our standard line includes over 250 different battery holders, with enough variations to suit most applications. We also have a long history of delivering custom battery holder solutions, which we optimize to perfectly suit the the needs of our clients.
Specialized Knowledge
Designing the best battery holders requires the best industry knowledge. At Antenk, we have over 15 years of battery holder design experience. We know what works and what doesn't, and we thoroughly test our newest designs to ensure they meet our rigorous quality standards. Understanding batteries and how they vary among brands, the requirements of modern electronics manufacturing practices, and how electronics consumers operate battery holders are all examples of the specific knowledge we apply during our battery holder design process.
Battery Holders by Type of Battery
1/2AA | 1/3N | 223A | 23A | 9V | AA | AAA | AAAA | C | CR123A | CR2 | CR2/3A | CR2N | D | Li-ion 18650 | N | Other Sizes

Coin Cell Battery Holders

coin cell holders
We have created a wide variety of coin cell battery holders for use in all types of devices, and from handheld medical devices to server motherboards we have solutions for any application. The ever increasing types, sizes, and sheer number of devices which use coin cell battery holders have been keeping us busy, and we have a similarly increasing selection of coin cell battery holder designs. After all, the perfect coin cell battery holder for a handheld medical device is going to be vastly different from the one for a server motherboard.
Unique Coin Cell Battery Holders
Antenk has pioneered a large number of new styles of coin cell battery holders to suit the various needs of the electronics industry. Our Verticals are an excellent way to save space on a crowded board, while our Minis can save almost 3 mm in height above the PCB over traditional coin cell battery holders. Gliders are an excellent upgrade over coin cell retainers, offering more reliable connections while also having simple, tool-less battery replacements. Our newest technology is Snap Dragon, which adds a snapping cover to the traditional style of coin cell battery holders for increased reliability.
Coin Cell Battery Holders by Size of Cell
191 | 335 | A76 | CR1025 | CR1216 | CR1220 | CR1225 | CR1620 | CR1632 | CR2016 | CR2025 | CR2032 | CR2320 | CR2325 | CR2330 | CR2335 | CR2354 | CR2420 | CR2430 | CR2450 | CR2477 | CR3032 | Coin Cell | F3 iButton | F5 iButton | LR1120 | LR44 | ML414 | SR512SW | SR60 | V80H or CP1654 | iButton | BR1025 | BR1216 | BR1220 | BR1225 | BR1620 | BR1632 | BR2016 | BR2025 | BR2032 | BR2320 | BR2325 | BR2330 | BR2335 | BR2420 | BR2430 | BR2450 | BR2477 | BR3032 | Other Sizes

Coin Cell Retainers

battery retainers
Coin cell retainers are simple metal contacts that both electrically connect coin cells and hold them in place, while taking up minimal additional space on the PCB. They feature nickel-plating, and since most coin cells have nickel shells this helps to prevent galvanic corrosion, an electrochemical process that can damage dissimilar metals that are in electrical contact. Our retainers are always designed with automation in mind, and can be easily picked and placed, with both through hole and surface mount retainers available for most coin cell sizes. Combining the ease of automation with the low cost of Antenk's retainers, it is no wonder they are such a popular product.

Coin Cell Retainers by Size of Cell
191 | 335 | CR1025 | CR1216 | CR1220 | CR1225 | CR1632 | CR2016 | CR2032 | CR2320 | CR2325 | CR2330 | CR2354 | CR2430 | CR2450 | CR2477 | F3 iButton | F5 iButton | LR1120 | LR44 | ML414 | SR512SW | SR60 | V80H or CP1654 | BR1025 | BR1216 | BR1220 | BR1225 | BR1632 | BR2016 | BR2032 | BR2320 | BR2325 | BR2330 | BR2450 | BR2477 | Other Sizes



Circle Connector,Battery Holders connector,Battery Contacts,Battery Holders,Battery Clips,Battery Contacts​,Battery Enclosures ,Coin Cell Battery Holders ,Cylindrical Battery Holders Contacts, Clips, Holders & Springs

ShenZhen Antenk Electronics Co,Ltd , https://www.antenkelec.com

Posted on