Blog  /  Seeeduino XIAO: Powerful Microcontroller in a Tiny Package

Seeeduino XIAO: Powerful Microcontroller in a Tiny Package

In the Seeeduino family, XIAO is one of the essential compatible boards. Though small, it's a microcontroller, compatible and excellent in various functions due to its multiple development interfaces. Therefore, you need to know how it can be used in multiple projects. In this article, we will feature its specification and how to set it up with Arduino IDE. In addition, we will also run Arduino Code on the Seeeduino XIAO resources roundup to see how it works. Let's get started.

 

What is Seeeduino XIAO?

 

Seeeduino XIAO is a small-sized Arduino microcontroller, the tiniest member in the Seeeduino family. Even though it's tiny, it offers excellent performance while consuming fewer power surges. Its design fits for usage in small projects and wearable devices.

In addition, Seeeduino XIAO contains a Type-C interface that provides download code and power. It's also a quality build available in 3-packs or individually. The boards come equipped with some male header pins. With these cables, you can wire to the pins directly or solder them once you want to use them. However, the USB-C jack is the only connector to the board.

Seeeduino XIAO Specifications

Seeeduino XIAO Specifications

Key Features

 

  • Multiple development interfaces
  • Small-sized for trim but advanced level projects and wearable devices, approximately (20x17.5mm) for small project building and wearable devices
  • Easy project setups
  • Flexibility compatibility; matches well with Arduino IDE
  • Potent CPU
  • 11 x analog output/digital pins

 

Seeeduino XIAO Pinout

 

Seeeduino XIAO development board contains fourteen GPIO PINs, including:

  • 1 DAC output pin D0
  • 10 PWM interfaces (d1-d10)
  • 1 UART interface
  • 11 digital interfaces
  • 1 SWD pad interface
  • 11 mock interfaces
  • 1 SPI interface
  • 11 mock interfaces
  • Blink light (L)
  • Serial port communication indicator (T/R)
  • 1 I2C interface

Most of these PINs usually do several tasks. For instance, Pin Ao has a function of DAC, and A1/D1 to A10/D10 has PWM functions. Once you define it as an analog output pin, you will get true analog output signals instead of getting PWM signals. As a result, 14 GPIO PINs interfaces and releases more I/O PINs.  

Seeeduino XIAO Interrupt

 

Microcontroller board display with sensor button switches cables

Microcontroller board display with sensor button switches cables

 

Seeeduino XIAO pins do support interrupts. However, as you work with interrupts, you need to be aware of a few issues you might encounter.

  • Pin 7 and 5 can't be used simultaneously since they share a similar interrupt (INT_9).
  • Pin 4 interrupts non-mistakable; it can't be programmatically ignored.
  • Most interrupts are "maskable," which means you can programmatically decide to overlook them.

Furthermore, Seeeduino XIAO power pins support a USB Type-C interface that downloads code and source power pads. The reason is they share a similar interrupt (INT_9).  

USB Type-C connector

USB Type-C connector

 

Purse Width Modulation (PWM)

 

All the Seeeduino XIAO pins support PWM. Nevertheless, there is an exception of pin 0. Due to this reason, it makes XIAO ideal for innovative wearable advanced level projects and the perfect controller for power LED.  

Getting Started with Seeeduino XIAO

 

There are two ways of programming with Seeeduino XIAO:

  • Using Circuit Python. It subcategories to enhance microcontrollers
  • Using Arduino IDE and C++. You can as well use Platform IO

In this tutorial, our focus will be on how to set up the Arduino IDE for Seeeduino XIAO Arduino.  

 

Setting up the Arduino IDE for the Seeeduino XIAO

 

You have to install another board manager when using Arduino IDE with XIAO. The procedure works similarly to ESP32. You need to take the following two steps – install the XIAO board itself and the new Board Manager.  

Installing the Seeeduino SAMD21 Boards Manager

 

Here is the installation process:

Open the Arduino IDE ->File->Preferences>Additional Boards Manager.

At the bottom of the Preference window, you will locate the URLs textbox of the Additional Board Manager.

If the URLs textbox of the Additional Boards Manager is empty, copy and paste the above URL. If there is an entry already in the URLs textbox, open the next entry by clicking the RESET button. A dialog box will open, permitting you to add additional board managers. Below the other thresholds, paste the above link to the blank box and click OK.

By clicking OK, you accept the new entry and are ready for the next step. Close the Preference window.  

Installing the XIAO Board

 

After installing the new Boards Manager to your Arduino IDE, the final step is performing the Seeeduino XIAO pinout board.

Go to Arduino IDE -> Tool item -> Boards Manager.

Type “Seeeduino XIAO” in the filter box. It will display the Seeed SAMD Boards package. Then click the install button. Note that the process might take a while to install the package. Hence, it would help if you were patient. Once it’s done, click the close button. From the SeeedSAMD Boards, you should be able to select the Seeeduino XIAO development Board.

 

Hooking up the Seeeduino XIAO

 

The significant component you will require is a USB-C cable that connects both data and battery power supply. However, you must note that most USB-C only delivers battery power supply and can’t carry data. To be sure if your USB-C connector cable will fit, begin by connecting it up to the Arduino IDE, and then observe the ports listed. If it's suitable, once connected, on its description, it will display  “Seeeduino XIAO.” If not applicable, it won't say that description.  

USB cable

USB cable

 

Using a micro USB to USB-C connector is the easiest way to ensure you find a suitable cable.  

Hello World

 

After connecting XIAO to the Arduino IDE, what is remaining now is testing the installation to make sure all is running well. The best way for doing this in the Arduino Uno World is by running a Blink sketch to the “Hello World.” Adjacent to the USB connector and XIAO M0 with a yellow LED labeled “L” connects to pin 13. Hence, the Blink draft is required to run untouched. There are many similarities between working with Arduino Uno and XIAO LEDs when uploading the sketch. Like in Arduino, you must wait for the message showing sketch upload.  

Running Arduino Code on the Seeeduino XIAO

 

Most of the code features on the Arduino AVR boards, and Uno runs unmodified on the XIAO M0. Besides, most Arduino Uno features are similar to the Seeeduino XIAO Board. Nevertheless, there are a few differences; some are elusive, and others aren't elusive.

To understand the differences and similarities, you need to run simple code and learn how  XIAO M0 responds. Let's begin!  

Test Connection

 

We will run some basic sketches by connecting modest constituents to the XIAO. The connection will let us expose some differences between XIAO and Arduino and also test some XIAO features. We will run simple code and compare it to Arduino's equivalent code to accomplish this.  

Test Sketch - Built-in LED and Digital I/OIN

 

In this simple sketch, we want to expose the differences between Arduino Uno (including other Arduino AVR boards) and the Seeeduino XIAO Expansion board.  

 

First, we define constants representing the ground pin that connects both XIAO LEDS and pushbutton. We will connect pin 7 to the pushbutton and write the value to both built-in XIAO LEDS and pin 9.  

 

After running the sketch, you will observe the following on both LEDs:

  • By pressing the pushbutton, the LED extinguishes while the built-in LED illuminates. Meaning the pushbutton output voltage, in this case, is LOW.
  • Without pressing the push button, the LED on pin seven won’t illuminate. Nevertheless, the built-in LED will be off, which means the pushbutton output, in this case, is HIGH.
  • You will observe that, on the XIAO M0, the Builtin LED works contrariwise on the Arduino AVR boards Built-in LED. When the input is LOW, it illuminates and goes off when HIGH.

 

CircuitPython on Seeeduino XIAO

 

CircuitPython is a programming language that streamlines the learning and testing process on the microcontroller boards. With circuitPython, there is no need for upfront desktop downloads.  

CircuitPython installation process

  Step 1. Go to the official CircuitPython Bootloader for Seeeduino XIAO Arduino and download A .uf2 Step 2. Using USB Type-C, hook up the Seeeduino to the PC. Step 3. Use hurdler to connect RST power Pins into the DFU bootloader mode easily.  

Note:

  • The Arduino (external drive) must display on your PC.  After downloading the CircuitPython uf2 files, drag them to the Arduino drive.
  • Disconnect the USB Type-C and re-join after loading the CircuitPython bootloader. You will see a new external drive known as CIRCUTTPY appearing.

Currently, the CircuitPython will already have loaded on the Seeeduino XIAO Expansion board. You need now to compose a python program, and after naming it, you drag it into the CIRCUTTPY drive.  

Typical Application

 

  • Wearable devices

 

Smart wearable devices flat icons set 

Smart wearable devices flat icons set. 

 

  • DIY keyboard
  • Excellent for every project operation requiring mini Arduino
  • Rapid prototyping (assigns directly to the lengthened PCB as a minor system)
  • USB development (USB for multi-channeling USB/TTL host mode)
  • A scenario where you must read several mock values The DAC output.

 

Summary

 

The Seeeduino XIAO Expansion board is the smallest in the group of boards but packs much power into a tiny package. Its capability to reprocess the old Arduino code makes it the perfect choice for swift project development. Besides, its low cost makes Seeeduino XIAO ideal for various hobbyist applications.