Using Ultra Edit to improve ICC AVR development efficiency!!!

Publisher:机器人总动员Latest update time:2020-06-21 Source: eefocusKeywords:Ultra  Edit  ICC  AVR Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

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.

Keywords:Ultra  Edit  ICC  AVR Reference address:Using Ultra Edit to improve ICC AVR development efficiency!!!

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

AVR Basics: The ATMEGA's SPI Bus - Part 1
When the AVR communicates with other devices, we need to choose which method to use. You can use classic serial ports such as UART and I2C, or you can choose the serial peripheral interface (SPI). I prefer the SPI bus method. So let's talk about this bus form. relation An important concept in SPI is the master-slave
[Microcontroller]
AVR Basics: The ATMEGA's SPI Bus - Part 1
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号