Atmel Studio
Atmel Studio 7.0 is an IDE for AVR and ARM microcontrollers, and AVRDude is a command-line utility used to program AVR microcontrollers. Here’s how you can set up Atmel Studio 7.0 and configure it with AVRDude:
Step 1: Download and Install Atmel Studio 7.0
1. Download Atmel Studio 7.0
Visit: https://www.microchip.com/en-us/tools-resources/develop/microchip-studio
Download the offline installer and Install Atmel Studio.
AVRDUDE
AVRDUDE (AVR Downloader/Uploader) is a command-line tool used to program AVR microcontrollers from Atmel (now part of Microchip Technology). It supports various programmers (e.g., USBasp, Arduino bootloader) and is widely used in the Arduino ecosystem.
Step 1: Download and Install AVRDUDE for all platform
Go: https://github.com/avrdudes/avrdude
For Download and Install AVRDUDE for Windows
Go: https://github.com/avrdudes/avrdude/releases
Fig: Download avrdude-v8.0-windows-x64.zip or latest updated version
Create a new folder and unzip here
Set AVRDude Path (Windows Only)
Add AVRDude to the system PATH:
Go to Control Panel → System → Advanced System Settings → Environment Variables.
Under “System Variables,” find Path, click Edit, and add the AVRDude installation directory.
Open Terminal and type ” avrdude “
C:\Users\userName>avrdude
Fig: AVRDUDE Setup done
USBasp
USBasp is a low-cost, open-source USB in-circuit programmer for AVR microcontrollers. Unlike programming via a bootloader (e.g., Arduino), USBasp connects directly to the microcontroller’s ISP (In-System Programming) pins, allowing you to program AVR chips without a pre-installed bootloader.
Prerequisites
• USBasp Hardware: A USBasp programmer connected to your AVR microcontroller via the ISP header (MISO, MOSI, SCK, RESET, VCC, GND).
• AVRDUDE: Installed on your system (e.g., from Arduino IDE or WinAVR).
• Atmel Studio: Optional, if integrating as an external tool.
• Microcontroller: An AVR chip (e.g., ATmega328P) wired correctly to USBasp.
• Drivers: On Windows, you may need to install USBasp drivers (e.g., libusb or Zadig).
Step 1: Install USBasp Drivers (Windows Only)
• Connect USBasp: Plug your USBasp into a USB port and connect it to your microcontroller’s ISP pins.
• Check Device Manager: Look under “Other devices” or “Universal Serial Bus devices” for “USBasp.” If it shows a yellow triangle (driver missing), proceed to install the driver.
• Install Driver with Zadig: Download Zadig (https://zadig.akeo.ie/). Open Zadig, select “USBasp” from the device list (enable “List All Devices” if needed). Choose “libusb-win32” as the driver and click “Install Driver.” Verify in Device Manager that “USBasp” appears under “libusb-win32 devices.”
Configure Atmel Studio 7.0 to Use AVRDude
Open Atmel Studio and create a new project (File → New → Project).
Go to External Tools:
Navigate to Tools → External Tools
Click Add and enter:
Title: AVRDude
Command: C:\path\to\avrdude.exe
Arguments:
-c <programmer> -p <mcu> -U flash:w:$(TargetDir)$(TargetName).hex:i
Replace:
<programmer> with your programmer (e.g., usbasp, arduino, stk500v2).
<mcu> with your microcontroller (e.g., atmega328p).
Example for atmega8:
-c usbasp -p m8 -P usb -U flash:w:"$(OutDir)Debug\$(TargetName).hex"
Initial Directory: $(ProjectDir)
Fig: Click apply then Ok
Go to the Tool option and click AVRDude and check the output option code upload or not.
Fig: Code upload done