AVR MCU Tutorial - Development Environment Configuration

Publisher:boyhxzLatest update time:2019-12-03 Source: eefocusKeywords:AVR Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

Today I visited the design exhibition at the Jiaotong University School of Journalism. The exhibition focused on two themes: Arduino and Python.

What impressed me most about Python was what a Python programmer said: If you want to be hardcore, you can go over there and look at Java.


Come on, it's 2020, Java is already considered hardcore? Is Python too easy to use, or is the Java version updated too quickly? The real hardcore is definitely BrainFuck, and if you want to be more practical, it's also C++ and Haskell. When Java is considered hardcore in their mouths, I think I can change my booth.


So I went to the floor full of Arduino. Seeing so many Arduinos, I couldn't help wondering, although Arduino is the most common development board, there shouldn't be no trace of STM32, right? I asked and found out that the professor asked them to use Arduino, so I was speechless.


I chatted with a designer of an excellent work for a few words. He said that it is difficult to control the delay when controlling the servo and the speaker at the same time, and the rhythm of the music output by the speaker will be chaotic. My first reaction is of course that he did not use the timer interrupt. When I asked, it turned out to be true, and he did not know about interrupts or timers. I don't want to say more, so I'll leave.


When I designed a modular MCU development system, I always thought that "amateurs cannot learn to use advanced MCU functions because the development platform is too encapsulated" (in fact, it refers specifically to Timer/Counter, because the bus, ADC, etc. have libraries, but the T/C must be written by the user). This argument is untenable, and I even wrote a questionnaire. Although the results are consistent with expectations, I still attribute the reason to the small scope of the questionnaire. Now I feel that even senior students have this level.


After visiting this exhibition, I am more determined to write this tutorial. If you want to learn microcontrollers well, a good development environment is essential.

 

The above is nonsense, let's configure the development environment.

Quick Navigation: Download Installation Configuration

1 Overview

We need to install the following software:

Atmel Studio 7.0 (AS7 for short) is an IDE launched by Atmel for its own microcontrollers, based on Visual Studio 2015;

AVRDUDESS is a GUI version of AVRDUDE, an AVR microcontroller programming tool that supports multiple downloaders. If you are familiar with the command line, you can use AVRDUDE directly.

Zadig, used to install USB drivers, no installation required, just download and use, only needs to be used once;

Serial Port Utility (SPU for short) is a serial communication tool with a cleaner interface than similar software;

The driver of the serial port tool depends on the model you use. Generally, there are only two types: PL2303 and CH340. Just download and install the corresponding driver online.

2. Download the installation package

Download address of Atmel Studio 7.0: online installation package, offline installation package;

Download address of AVRDUDESS: installation package, compressed package;

Download address of Zadig: Application;

SPU download address: installation package.

If the download is too slow, search with the following keywords: Atmel Studio 7.0.1931.

In addition, SPU is a paid software, but it can be tried for free for 30 days. You can either buy it, or find a way to continue using it (crazy hint), or replace it with similar software.

programmers who use spaces have higher salaries !

4.8 Flashing Tools

In the menu bar → Tools, click External Tools...

This window is used to configure external tools. We use it to create a "one-click burning" tool.

In the following 4 lines, fill in the following contents between the outermost quotation marks:

Title:             "AVRDUDE"

Command:           "C:Program Files (x86)AVRDUDESSavrdude.exe"

Arguments:         "-c usbasp -p m324pa -B 0.5 -U flash:w:"$(TargetName).hex":i"

Initial directory: "$(TargetDir)"

Note that the directory in the second line should be replaced with the installation directory of AVRDUDESS. I installed it in the default location here.

Finally, check Use Output window.

4.9 USB Driver

In addition to the configuration in AS7, you also need to use Zadig to install the USBasp USB driver. Before installation, insert the USBasp downloader first.

Directly open the software and this interface pops up, and no USB device is displayed.

In the menu bar → Options, check List All Devices.

Then all USB devices are displayed, select USBasp.

First make sure that USBasp is selected above, don't make the wrong choice!!! Click the up and down arrows, select libusbK, and then Replace Driver. I have already installed it here, so it will show Reinstall.

The installation was successful and the environment configuration was completed.

Keywords:AVR Reference address:AVR MCU Tutorial - Development Environment Configuration

Previous article:AVR microcontroller tutorial - lighting up the first LED
Next article:IAR for AVR Full version cracking steps

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

AVR microcontroller proteus simulation lesson 3: single digital tube
Select 7SEG-MPX1-CC for the digital tube, a common cathode digital tube. That is, low level selection (rightmost pin), the 8 pins on the left side of the digital tube, from left to right, from low to high, are connected to PC0---PC7 respectively. The c program is as follows: #include avr/io.h #include util/delay.h
[Microcontroller]
AVR microcontroller proteus simulation lesson 3: single digital tube
Homemade AVRISP Downloadable Programmer
  Compared with the parallel port ISP download cable using a 74LS244, the circuit and principle of this AVRISP are slightly more complicated. But it has advantages: the serial port download performance is more stable than the parallel port, and the speed is also very fast after upgrading to the 3.6 firmware. Accordi
[Microcontroller]
Homemade AVRISP Downloadable Programmer
AVR microcontroller controls light emitting diodes
Light up an LED on the ARV MCU development board Schematic diagram:   Analysis: The screenshot above is the connection schematic diagram of the microcontroller and the LED light, where J6 is a resistor that limits the current to prevent the LED from burning out due to excessive current. The inside of the resist
[Microcontroller]
AVR microcontroller controls light emitting diodes
How are AVR fonts stored in the program memory area?
The compiler can use the keyword const to define constants in flash. For example, keil, ICC, etc. define constants using const unsigned char data=0; then the type of data is a constant stored in flash. The following definition: typedef struct typFNT_ASC16     {     char Index ;     char Msk ; }; const struct typ
[Microcontroller]
The corresponding relationship between AVR microcontroller registers DDR, PORT and PIN
    Each I/O port of the AVR microcontroller corresponds to three registers: DDRx, PORTx and PINx, where DDRx is the data direction, i.e. input or output; PORTx is the state of the internal pull-up resistor, and PINx is the state of the external pin to be read. The following is the correspondence between the three: (a
[Microcontroller]
Translated and modified AVR-gcc3.3 makefile. (Usage: make clean /make all)
#============ MCU selection ======================== # MCU name MCU = atmega8 #============== Output format selection ==================== # Output format. (can be srec, ihex) FORMAT = ihex #============= Target file name (without extension). TARGET = main #============== Optimization level selection ==============
[Microcontroller]
Advanced experience with ultra-low power consumption of AVR microcontrollers
I had done a low-power design more than four years ago, and the debugging was OK at that time, and the program was basically transplanted. This time I made some changes and did it. I thought it would take about a day, but it took another two days. The hardware platform uses a 9V battery, and the system voltage is stab
[Microcontroller]
Advanced experience with ultra-low power consumption of AVR microcontrollers
AVR reads keyboard using IF statement
#include int main(void) {       DDRD &= ~(1 6);//The sixth bit is set as input       DDRD &= ~(1 3);//The sixth bit is set as input       DDRD &= ~(1 7);//The sixth bit is set as input       PORTD |= (1 6);//Turn on the pull-up resistor       PORTD |= (1 7);//Turn on the pull-up resistor       DDRA |= (1
[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
Guess you like

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号