How to learn AVR microcontroller well

Publisher:ching80790Latest update time:2015-04-07 Source: eechinaKeywords:AVR Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere
First of all, let me introduce why we should learn AVR microcontrollers! ! With the introduction of various high-performance microcontrollers by various IC manufacturers, 51 microcontrollers are far from meeting everyone's demand for high-performance microcontrollers. ATMEL, as a large manufacturer of 51 series microcontrollers, launched a cost-effective RISC (reduced instruction set) microcontroller series in the mid-to-late 1990s, which is the very popular and famous AVR microcontroller. It stands out in the competition of various high-performance microcontrollers and is loved by electronic professionals from all walks of life. Many people who want to learn microcontrollers dare not learn AVR, thinking that it is not easy to get started. In fact, if you use C language programming, the entry is the same, and when you learn it well, you don't have to learn a high-performance microcontroller like those who learn 51, which is a waste of time. At present, many companies and schools have begun to turn to AVR microcontrollers. I believe that in the next few years, AVR will be very prosperous, so learning AVR microcontrollers will be very promising.
Let's talk about the advantages of AVR microcontrollers first. Compared with the classic 51 series, the outstanding advantages are mainly the following:

1. Fast speed. AVR is a reduced instruction set microcontroller, and its speed can reach 1MIPS/second, which is theoretically 12 times that of the traditional 51, and in fact about 10 times.

2. Rich on-chip resources. The MEGA series has JTAG simulation and download functions on the chip. The chip contains watchdog circuit, on-chip program Flash, on-chip data RAM, synchronous serial interface SPI, asynchronous serial port UART, embedded AD converter, EEPROM, analog comparator, PWM timer counter, TWI (IIC) bus interface, hardware multiplier, independent oscillator real-time counter RTC, on-chip calibrated RC oscillator and other on-chip peripherals, which can meet various development needs.

3. Strong driving ability. The I/O port can directly drive digital tubes, LEDs, relays and other devices, saving a lot of peripheral circuits, which saves development difficulty and reduces costs.

4. Low power consumption. Although the low power consumption is not as good as the 430 microcontroller, it is also a leader among microcontrollers.

5. There are many types of models to choose from. Various models can meet different needs, giving you a lot of choices for your project.

6. High cost performance. Under the premise of high performance, the price of the chip has not increased. The price can be compared with 51, but the function is incomparable to 51.

Combining the above advantages and future trends, it is necessary to learn AVR microcontrollers. 

Here is my personal experience on how to learn AVR microcontrollers faster! ! Many people who want to learn AVR asked me how to learn it well? Here I will tell you how I learned AVR microcontrollers, how to get started, and how to become proficient in this process.

The learning of any microcontroller should be a process closely combined with practice, and it cannot stay in books for a long time. However, learning microcontrollers is also learning knowledge, so you must first read books, because you need to have a general understanding of what a microcontroller is from the book? What can it do? How to control it to achieve our goals, etc.? You may not understand it for the first time or the second time, but it doesn’t matter, because you still lack practical sensory knowledge. You can treat it as a novel, as long as you understand it roughly. I recommend a book called "AVR Series Microcontroller C Language Programming and Application Examples", which is published by Tsinghua University Press. It is very important to have a general understanding of the content in the book and then practice it, because you cannot learn the microcontroller without practice.

There are two ways you can choose for practice. One way is to spend money to buy a microcontroller learning board. The one with fewer functions costs less and is useless after getting started. Although the one with more functions is more expensive, you can learn more. A good learning board can be used as a development board. Many people think that the learning board and the development board are the same thing. In fact, the learning board can only be used for simple learning. What about the development board? The things above are very professional, and the sub-functions in the program are very independent. When you develop, many things can be used directly, which is very convenient. So I personally recommend buying a better learning board that can be used as a development board. Flowing lights, digital tubes, independent keyboards, matrix keyboards, AD or DA (the principle is the same), LCDs, buzzers and other very basic experiments. If you can apply them proficiently, it can be said that you have already gotten started with the hardware of the microcontroller. The rest is to practice designing circuits by yourself and constantly accumulate experience. As long as you pass the first level of entry, the rest of the road will be much easier.

Method 2: If there is an expert in single-chip microcomputer around you, ask him for help and let him help you build a simple minimum system board. For experts, it only takes a few minutes to make a minimum system board for single-chip microcomputer, but it is much more difficult for beginners, because only when you understand the hardware can you use it skillfully, and you haven't gotten started yet. If you don't have such an expert around you and can't find someone to help you, then I advise you to buy one yourself. After all, it is much more convenient to have one yourself. You can use it when doing single-chip microcomputer experiments in the future, saving time and trouble. For the sake of learning, it is still worth investing a little, because the value it creates for you in the future is incomparable. Buy one less piece of clothing, eat two less meals in restaurants, go to Internet cafes less, save some money to learn some useful things, this is what young people should do.   

After you have a single-chip microcomputer learning board, you should practice more. It is best to have your own computer, study more programs, play fewer games, and watch fewer movies. First, learn to use development software, how to edit and compile source programs? How to simulate programs? At present, 90% of people use C language to develop AVR, and most beginners use ICCAVR (AVR's C language environment) as the software for editing and compiling source programs, and use AVR Studio for simulation (if you need these two software, you can contact the author of this article on QQ: 475661158). Then start with the simplest running light experiment. When you can make the eight running lights flow freely according to your wishes, you have already entered the door. You will find how interesting the microcontroller is. It is so interesting (when the program you write is realized according to your wishes, you will feel very comfortable, and slowly you will fall in love with the electronics industry). Then make the digital tube light up. After these two items, you have been immersed in it. This is how to practice. When writing a program, you will definitely encounter many problems. At this time, you will look for it in a book or ask others. When you get the answer, you will be deeply impressed and remember it firmly. In this way, you will soon be familiar with the AVR microcontroller. When

the program practice is almost done, you will start to make hardware, find relevant information, and make circuits by yourself. After a few months, you will become a master. Let me briefly talk about C language and assembly language. You can use C language or assembly language to program a single-chip computer, but I suggest that C language is better. If you have a foundation in C language, it will be easier to learn. If not, you can also learn C language while learning single-chip computers. C language is also very simple. It is just a tool. I advise you to learn it. It will definitely be useful in the future. Otherwise, you will have to learn it in the future. It doesn’t matter if you don’t know any assembly language, but you will suffer in the future if you don’t know any C language. Assembly language is efficient in writing program codes. It is often used in occasions with strict timing requirements, but it is relatively difficult to develop and very troublesome. Especially when encountering problems with slightly complex algorithms, it is easy to mess yourself up when writing code in assembly language. The main frequency of AVR single-chip microcomputers can be as high as 20MHz, which is equivalent to the 51 single-chip microcomputer with a frequency of more than 200MHz. With such a high-frequency clock, we can use C language to write code without any problem. The capacity of the program memory (ROM, FLASH) of the microcontroller is also constantly improving, which is enough to hold any code you write in C language. The C language has rich information and is very portable. It can be transplanted with just a slight modification, so I advise everyone to use C language.    

In general, as long as you have confidence, can stick to what you do, and have the spirit of not giving up until you succeed, it is very easy to learn AVR microcontrollers, whether you have learned microcontrollers or not. Let

me briefly introduce the steps:

1. Find a book to get a general understanding of the structure and functions of AVR microcontrollers. Just have a general understanding, no need to read it in detail. (Five days) 2. Find

a learning board to practice writing programs. Learning microcontrollers is mainly about practicing writing programs. If you encounter something you don’t know, ask others or look up books. (Forty days)

3. If you are learning the MEGA series AVR microcontroller, you also need to learn how to set the fuse position to make it work more efficiently and conveniently for you. (One day)

4. Find some small circuit materials on the Internet to practice designing peripheral circuits. After soldering, debug by yourself and get familiar with the process. (Ten days)

5. Design circuits and products with your own style independently, ... you are already an expert.        

Calculate the time, you will be able to operate the AVR microcontroller proficiently in about two months. As for how long it will take to become an expert, it depends on your efforts.
Keywords:AVR Reference address:How to learn AVR microcontroller well

Previous article:Automatic voltage regulation system of DC power supply screen silicon chain based on ATMAGE16 single chip microcomputer
Next article:Design of remote multi-object control system based on myDAQ

Recommended ReadingLatest update time:2024-11-16 15:04

PIC microcontroller learning independent buttons
Hardware circuit: independent button connected to RA5 Effect: Make the LED at port RD0 light up when the independent button is 0. Note: The default state of PORTA is not a digital IO port, we need to configure it as a digital IO port. This involves the ADCON1 register. //Basic application of buttons Independent
[Microcontroller]
Introduction to the principle and structure of 8051 series microcontrollers
A microcontroller is a control chip, a microcomputer, and with the addition of crystal oscillator, memory, address latch, logic gate, seven-segment decoder (display), buttons (similar to a keyboard), expansion chip, interface, etc., it is a microcontroller system, the following is a basic introduction to the principle
[Microcontroller]
Introduction to the principle and structure of 8051 series microcontrollers
Design of automatic metering feeding system based on single chip microcomputer 8031
  1 Introduction   In order to increase the proportion of domestic equipment, save foreign exchange, facilitate maintenance and ensure production, this paper, at the request of the manufacturer, has developed an embedded microcomputer automatic metering and feeding system based on 8031 ​​on the basis of a thorough
[Microcontroller]
Design of automatic metering feeding system based on single chip microcomputer 8031
Hands-on teaching of 51 single chip microcomputer | 1602 LCD
For components like this that contain chips, the most important thing is to learn how to understand the pin functions of the chip, rather than to memorize the statements of the chip. The same components from different manufacturers have slight differences, so when purchasing such things, ask the manufacturer for a chi
[Microcontroller]
Hands-on teaching of 51 single chip microcomputer | 1602 LCD
51 single chip microcomputer course design - LED dot matrix billboard program design
The final assignment for last semester was LED dot matrix billboards. The requirements were as follows: (1) LED dot matrix billboards capable of displaying different characters; (2) Press buttons to switch between different display effects (such as flashing, still, panning, etc.); (3) Press the button to switch differ
[Microcontroller]
51 single chip microcomputer course design - LED dot matrix billboard program design
51 MCU UART communication sends and receives numbers, letters and Chinese characters, and controls the LED on and off
1. Receive what you send /* Project creation MCU selection, Atmel 89C55 MCU: STC12C5A60S2 Crystal oscillator: 12M Function: Serial port application Baud rate: 4800 8 None 1 None */ #include REG51.h // You can use the general header file //Serial port interrupt initialization program void UART_init(void){
[Microcontroller]
51 MCU UART communication sends and receives numbers, letters and Chinese characters, and controls the LED on and off
Design of infrared communication interface in single chip microcomputer system
In many application systems based on single-chip microcomputers, the system needs to realize remote control function, and infrared communication is a method that is widely used. The remote control protocols on the market are generally simple, not very confidential, and have weak anti-interference capabilities. Here, we
[Microcontroller]
Low-power system design based on Atmega48 microcontroller
With the development of microelectronics and computer technology, especially the widespread application of microcomputers in various fields, indicators such as power consumption, cost, volume, and reliability have become important issues that designers are concerned about. Especially in battery-powered devices, how to
[Microcontroller]
Latest Microcontroller Articles
  • Download from the Internet--ARM Getting Started Notes
    A brief introduction: From today on, the ARM notebook of the rookie is open, and it can be regarded as a place to store these notes. Why publish it? Maybe you are interested in it. In fact, the reason for these notes is ...
  • Learn ARM development(22)
    Turning off and on interrupts Interrupts are an efficient dialogue mechanism, but sometimes you don't want to interrupt the program while it is running. For example, when you are printing something, the program suddenly interrupts and another ...
  • Learn ARM development(21)
    First, declare the task pointer, because it will be used later. Task pointer volatile TASK_TCB* volatile g_pCurrentTask = NULL;volatile TASK_TCB* vol ...
  • Learn ARM development(20)
    With the previous Tick interrupt, the basic task switching conditions are ready. However, this "easterly" is also difficult to understand. Only through continuous practice can we understand it. ...
  • Learn ARM development(19)
    After many days of hard work, I finally got the interrupt working. But in order to allow RTOS to use timer interrupts, what kind of interrupts can be implemented in S3C44B0? There are two methods in S3C44B0. ...
  • Learn ARM development(14)
  • Learn ARM development(15)
  • Learn ARM development(16)
  • Learn ARM development(17)
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号