Some suggestions for beginners of 8-bit microcontrollers

Publisher:a407895356Latest update time:2015-12-25 Source: eefocus Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere
Pre-study requirements:
(1) Have a certain foundation in C language,
(2) preferably have some knowledge of digital circuits
 
Preface: (1) As long as you are a student of the Department of Electronics or Computer Science. C language is the minimum threshold for you to get professional knowledge. Therefore, students who do not have a solid foundation in C language should focus on it and master the basic knowledge of C language before getting started with microcontrollers. Don't rush for success. I have also tasted the "bitter melon" of rushing for success, and the detours I took were many circles around Huizhou School. When learning C language, I hope that students can focus on arrays, pointers, and structures. Be able to understand the relationship between arrays and pointers and the combination of these three. I personally think that the combination of these three is really powerful, outstanding, and invincible. It seems a bit exaggerated, but it is very powerful anyway. Another point is that when writing code, you should pay attention to your own programming style. It is best to refer to the specifications given by some large companies or large projects. Don't do whatever you want, thinking that the program can work when it runs, and ignore the programming style. Developing good programming habits is a basic requirement for becoming a programmer, so you should pay more attention to it.
(2) In terms of digital electronics, because the microcontroller is a combination of logic sequential circuits, and the logic sequential circuit is a digital circuit, some knowledge of digital electronics can make you more comfortable learning microcontrollers. Of course, you can also get started with microcontrollers directly. You have to learn it sooner or later, so why not learn the basics of digital electronics now? When learning digital electronics, you can choose to watch video tutorials. I recommend "Basics of Digital Electronic Circuits" by Liu Runhua, a teacher at the Petroleum University. It's okay as long as you can understand it. There are many online searches. If you can't understand it, ask your senior for it. Reading books is also okay, but it's too slow. It may be difficult for students without circuit foundation to understand.
 
In terms of single-chip microcomputers: There are 7 experiments that must be done for beginners of single-chip microcomputers:
$1__VE_ITEM__(1) Marquee
$1__VE_ITEM__(2) Buzzer
$1__VE_ITEM__(3) Static and dynamic display of digital tubes
$1__VE_ITEM__(4) Matrix keyboard
The above 4 mainly involve the operation of the input and output (IO) ports of single-chip microcomputers. The following are 3 very important and commonly used contents of single-chip microcomputers
$1__VE_ITEM__(5) External interrupt
$1__VE_ITEM__(6) Timer interrupt
$1__VE_ITEM__(7) Serial communication
 
Because most of you are at the beginning of school, I suggest that you spend two days on each experiment (if you don’t need to study, you can spend one day on each experiment). One day to watch the video, and one day to write code on the computer by yourself, until the burning test is successful.
 
The following are just some of the things that need to be paid attention to when learning single-chip microcomputers:
(1) When watching the video, pay attention to: how to control the chip by viewing the chip datasheet, especially the timing diagram in it. You should know that the video tutorial is not just to let you realize the above functions. That would not be considered as getting started. What is more important is to teach you how to use the manual of the microcontroller to program and use the various functions provided by the microcontroller to control external devices. In fact, the C51 microcontroller is not difficult, but the external devices are difficult.
Speaking of external devices, I think it is necessary to mention the bus protocol. Because the microcontroller must follow various bus protocols to communicate with many external devices, so understanding various bus protocols can help you learn some external device drivers. I hope that when you see a bus, you can master it through Baidu.
 
 
(2) Note when operating on the computer: Try to read the datasheet and the timing diagram to write the code yourself. If you don’t understand, look back and refer to the routine. Make sure you can understand every line of code. When writing code, pay attention to the modular programming of the project to facilitate the porting of the code in the future. Of course, you can't really appreciate the importance of modular programming at the beginning, but when you write some larger projects, you will clearly feel the effect of modular programming. How to achieve modular programming depends on your own exploration.
After 2 weeks of hard work, if you can pass the above experiments, you have mastered the most commonly used functions in the C51 microcontroller, and you will often use these functions in the future. It can be said that you have already got started, but getting started alone is not enough. The microcontroller provides more than these functions, such as PWM, ADC (analog-to-digital conversion), DAC (digital-to-analog conversion), PCA, etc. These functions need to be learned by yourself. Each external device on the development board can basically correspond to a function on the microcontroller, and each external device may correspond to a bus. So in the future, you have to find the datasheet corresponding to the chip, read the manual of the microcontroller, and write the code yourself in combination with some routines provided. The supporting development board may provide more external equipment video tutorials, but I personally think that if you can try to complete it yourself, just complete it yourself. You must know that university is to exercise your self-study ability. The master introduces you to the door, and the practice depends on the individual. This saying is vulgar, but it is enduring.
Finally, I will say it again. Interest is really important in learning this thing. You must have perseverance and patience. Sometimes the failure of a small experiment is because a small problem drags you for a week, or even longer. Don't be discouraged or complain. I dare say that everyone who learns these things will experience such things, and there are even more people who are worse off than you. Don't rely too much on others for learning. Others can only guide you to learn, but don't even think about teaching you hand in hand, of course, with the exception of paying. University is supposed to cultivate your own self-study ability. It is too naive to wait for others to teach you every day. Finally, a word to the students who are just starting to learn 8-bit microcontrollers: Don't study for competition, you should compete for learning. (Applicable to students only) Winning a place in a competition is important, but it is more important to discover your own shortcomings and make up for them in time.
Reference address:Some suggestions for beginners of 8-bit microcontrollers

Previous article:Some common sense of single chip microcomputer
Next article:MCU expansion I/O port

Latest Microcontroller Articles
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号