Example for Arduino IDE

Last revision 2026/01/13

This tutorial offers step-by-step instructions for using Arduino IDE with FTDI and ISP programming, covering tools, ports, and commands for efficient microcontroller programming.

Hardware Preparation

Software Preparation

Example for Arduino IDE

1. FTDI programmer

  1. Connect XSP programmer to your target board, and plug XSP to your PC USB port.

2. FTDI Serial Debug

  1. Connect XSP programmer to your target board, and plug XSP to your PC USB port.
  2. Open Ardino IDE -> Tools -> Port, select the right COM port.
  3. Open the Serial monitor, set the right baudrate.

3. ISP Tutorial

This tutorial aims to guide users on how to use the XSP Programmer to burn a bootloader or upload a program to an Arduino-compatible board.

ISP (In-System Programming) allows direct programming of the microcontroller via a programming interface without requiring a pre-installed bootloader. The tutorial covers two methods.

1. Operation via the Arduino IDE graphical interface

DFR0360-Connection

  1. Connect XSP programmer to your target board, and plug XSP to your PC USB port;

  2. Open Ardino IDE -> Tools -> Board, Select the board type;

  3. Open Ardino IDE -> Tools -> Port, Select the right COM port;(Do not open the COM port after this step)

  4. Open Ardino IDE -> Tools -> Programmer, Select "AVR ISP"
    DFR0360_ISP adruino

  5. Open Ardino IDE -> Tools -> Burn Bootloader, click

  6. Done!

Note: AVR ISP is using Virtual Serial Port, so please do not open the serial port in the other way, or it will lose control; You need to close the Serial monitor, and powered off and re-up electricity to the device.

2. Operation via the avrdude command line

Avrdude is an open-source programming tool that allows direct command-line operations. This method is more flexible and suitable for automation or debugging.

Prerequisites

  • Install avrdude. It may come with the Arduino IDE (located in the installation directory's hardware/tools folder) or can be installed separately (e.g., via package managers like Homebrew or apt-get).

  • Identify the XSP Programmer's port number (e.g., COM3 on Windows, /dev/ttyUSB0 on Linux).

Basic Command Example

Below is a common command for interacting with the target board:

avrdude -p atmega328p -c stk500v1 -P <port> -b 57600 -t

  • p atmega328p: Specifies the target chip model.

  • c stk500v1: Specifies the programmer type as STK500v1 (the XSP Programmer is compatible with this protocol).

  • P : Specifies the port address of the XSP Programmer, for example:

    • Windows: -P COM3
    • Mac: -P /dev/tty.usbmodem14111
    • Linux: -P /dev/ttyUSB0
  • b 57600: Sets the baud rate to 57600 (a typical value).

  • t: Enters interactive terminal mode, allowing manual command input.

Was this article helpful?

TOP