1. Why do so many people still choose AVR microcontrollers?
I came into contact with 51 single-chip microcomputers when I was in college. As a beginner, C51 is a very good choice. For me, it has its own complete bit-by-bit operation system from internal hardware to software. This makes it easier for novices to define and operate. Secondly, novices do not need a large amount of calculations or too high a working frequency, but it is equipped with a rich peripheral module. It is enough for beginners to show off their skills. It is an excellent entry-level classic.
By the way, when you get started, if you want to make some small things with stability to improve, you will find that C51 is not enough to satisfy your ambition, but you are not confident enough to learn other advanced MCUs. At this time, AVR microcontroller will be a good choice. Compared with 51, it has many advantages of its own, such as faster speed, richer on-chip resources, stronger IO driving ability, and lower power consumption! ! Isn't this enough to make you excited? ? ? Oh, don't forget, what we are most concerned about is also easy to learn and low cost.
2. Why use ICC as the development environment?
First of all, ICC Project Manager can directly generate INTEL HEX format files that can be used directly. INTEL HEX format files can be supported by most programmers and used to download programs to chips. . . . . Forget it, let's talk about a more practical benefit.
As we all know, when writing a function, you can't avoid the initialization process of the function, which is a tedious but necessary process. It requires you to be familiar with and understand the registers, but nowadays, in the pursuit of high efficiency, we only focus on creating our own smooth algorithms. ICC can cater to your needs and achieve the initialization effect you want through simple settings.
Let's go through it again and run Tools>>Application Builder to create the project property settings.
Change Targat CPU to M128 (according to your own requirements), because the chip I use is mega128
Change Xtal speed to 8.0000, we use a crystal frequency of 8Mhz.
Switch to the Ports option, it's much simpler here, the direction is on the top and the value is on the bottom. Just click and you're done.
There are also timers, interrupts, serial ports, ADCs, etc. You can play with them like this! !
Then click File>>Save as and save it to the folder of the project you created in the first step. Remember to end it with .C.
Finally, right click your source files and header files >> add to project.
You will see the following effect after the project is completed, it is great! !
3. What is the most critical step related to UE?
I almost went off topic. If you use ICC for development for a while, as you do more and more projects, the file definitions become more and more, and your mind becomes more and more confused. Suddenly, you find that there is a bug, and what's more tragic is that it is hard to find. Because it is too difficult to use ICC to sort out the function relationship, it can't jump directly, and there is no matching prompt for upper and lower brackets, it's a headache, what can I do? There is a way, it's UltraEdit's turn to help, you can transfer your project to UE to view and compile.
Let the picture above speak for itself! ~
First, run the project in ICC, make sure it runs correctly (you can delete some parts first to ensure it is correct), then copy this sentence
Find your project folder, find the .SRC file (ASM source file), right-click and open it with UE, and the icon below will appear.
Then right click to open each file. You can define and modify it freely.
After the modification is completed, it needs to be compiled. At this time, the key technology comes. The sentence copied above comes in handy. Press F9 in UE and a page will appear as follows
Then a command output box will appear, which is equivalent to the OUTPUT output of a general project, showing reminders and errors. After compiling the project, you can press Ctrl+F9 to compile it, and the command output box will still appear. After the modification, you can directly use the compiler downloader to download the program to the CPU and debug the hardware.
OK, this is how to use UE to debug AVR program. You can experience its mystery carefully.
Previous article:MCU MQTT push simple use
Next article:Establishment of the official platform for AVR debugging and downloading
Recommended ReadingLatest update time:2024-11-16 07:56
- Popular Resources
- Popular amplifiers
- Principles and Applications of Single Chip Microcomputers 3rd Edition (Zhang Yigang)
- Metronom Real-Time Operating System RTOS for AVR microcontrollers
- Digital integrated circuit backend design (Tian Xiaohua, Li Chunxia, Wang Xu)
- Learn C language for AVR microcontrollers easily (with video tutorial) (Yan Yu, Li Jia, Qin Wenhai)
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- Innolux's intelligent steer-by-wire solution makes cars smarter and safer
- 8051 MCU - Parity Check
- How to efficiently balance the sensitivity of tactile sensing interfaces
- What should I do if the servo motor shakes? What causes the servo motor to shake quickly?
- 【Brushless Motor】Analysis of three-phase BLDC motor and sharing of two popular development boards
- Midea Industrial Technology's subsidiaries Clou Electronics and Hekang New Energy jointly appeared at the Munich Battery Energy Storage Exhibition and Solar Energy Exhibition
- Guoxin Sichen | Application of ferroelectric memory PB85RS2MC in power battery management, with a capacity of 2M
- Analysis of common faults of frequency converter
- In a head-on competition with Qualcomm, what kind of cockpit products has Intel come up with?
- Dalian Rongke's all-vanadium liquid flow battery energy storage equipment industrialization project has entered the sprint stage before production
- Allegro MicroSystems Introduces Advanced Magnetic and Inductive Position Sensing Solutions at Electronica 2024
- Car key in the left hand, liveness detection radar in the right hand, UWB is imperative for cars!
- After a decade of rapid development, domestic CIS has entered the market
- Aegis Dagger Battery + Thor EM-i Super Hybrid, Geely New Energy has thrown out two "king bombs"
- A brief discussion on functional safety - fault, error, and failure
- In the smart car 2.0 cycle, these core industry chains are facing major opportunities!
- The United States and Japan are developing new batteries. CATL faces challenges? How should China's new energy battery industry respond?
- Murata launches high-precision 6-axis inertial sensor for automobiles
- Ford patents pre-charge alarm to help save costs and respond to emergencies
- New real-time microcontroller system from Texas Instruments enables smarter processing in automotive and industrial applications
- LIS2HH12 MEMS Digital Output Motion Sensor Datasheet
- Three major misunderstandings about Bluetooth transmission
- The problem of not being able to sample the AD value using the official ADC routine based on the BlueNRG-LP chip
- [RVB2601 Creative Application Development] Environmental Monitoring Terminal 06-Synchronize Data to Alibaba Cloud
- One question per week, relax and broaden your mind
- Crowdfunding 3,000 yuan to buy batteries for needle penetration tests, BYD VS CATL technology game
- [Evaluation of EC-01F-Kit, the NB-IoT development board of Anxinke] + Alibaba Cloud connection to upload light illumination data
- Operate the lmx2582 registers through stm32, the project file is in the attachment
- 【ESP32-S2-Kaluga-1 Review】2. Update the firmware
- Speed sensor