Arduino MKR Zero Pinout: GPIO, ADC, DAC, PWM, UART, SPI, I2C, I2S and microSD

Arduino MKR Zero pinout guide: SAMD21 GPIO, 7 analog inputs, 10-bit DAC, 12 PWM pins, UART, SPI, I2C, I2S, native USB, Li-Po charging and the dedicated SPI1 microSD interface explained.

The Arduino MKR Zero is a compact 32-bit board based on the SAMD21 Cortex-M0+ processor.

Its defining feature is the onboard:

connected to a dedicated SPI interface, making the board particularly useful for:

  • audio playback;
  • data logging;
  • portable instruments;
  • offline storage;
  • media projects;
  • battery-powered applications.

The core architecture is:

Quick MKR Zero Specifications

Feature MKR Zero
Main MCU SAMD21 Cortex-M0+
Clock 48 MHz
RTC clock 32.768 kHz
Logic voltage 3.3 V
Flash 256 KB
Bootloader 8 KB
SRAM 32 KB
EEPROM No dedicated EEPROM
Digital I/O 22 usable digital-numbered pins including analogue aliases
PWM 12 documented PWM-capable pins
Analog inputs 7
ADC resolution 8/10/12-bit selectable
True DAC 1 × 10-bit on A0
UART 1 external hardware UART
SPI 1 external SPI bus
I2C 1 external I2C bus
I2S Available
microSD Onboard, dedicated SPI1
Native USB Full-Speed USB device / embedded host capable
Li-Po battery Single-cell 3.7 V, 700 mAh minimum recommended
GPIO current 7 mA maximum per pin

3.3 V Logic: Do Not Feed 5 V into GPIO

The most important electrical rule is:

Arduino explicitly warns that applying more than:

to an I/O pin can damage the board.

This is different from classic 5 V boards such as:

  • UNO R3;
  • Mega 2560;
  • Leonardo;
  • Micro;
  • UNO R4.

GPIO Current Limit

The official MKR Zero pinout specifies:

with additional group-level source/sink current limits.

Use GPIO for logic signals, not power loads.

For:

  • relays;
  • motors;
  • solenoids;
  • high-current LEDs;

use a transistor, MOSFET or dedicated driver.

Digital Pin Mapping

The main board edge exposes:

with these primary SAMD21 mappings:

Arduino pin SAMD21 pin Main functions
D0 PA22 PWM
D1 PA23 PWM
D2 PA10 PWM / I2S SCK
D3 PA11 PWM / I2S frame sync
D4 PB10 PWM
D5 PB11 PWM
D6 PA20 PWM
D7 PA21 PWM
D8 PA16 PWM / SPI COPI
D9 PA17 SPI SCK
D10 PA19 PWM / SPI CIPO
D11 PA08 I2C SDA / I2S data
D12 PA09 PWM / I2C SCL / I2S MCK
D13 PB23 UART RX
D14 PB22 UART TX

Analog Pins A0-A6

The MKR Zero exposes seven analogue inputs:

Analog pin Digital alias SAMD21 pin Main function
A0 D15 PA02 AIN0 / DAC0
A1 D16 PB02 AIN10
A2 D17 PB03 AIN11
A3 D18 PA04 AIN4 / PWM
A4 D19 PA05 AIN5 / PWM
A5 D20 PA06 AIN6
A6 D21 PA07 AIN7 / I2S data

Analog Pins Can Also Be Digital Pins

The Arduino core gives the analogue pins digital aliases:

That is why Arduino’s store specification can correctly list:

even though only D0-D14 are printed as the main digital row.

ADC Resolution

The SAMD21 ADC supports selectable:

resolution.

For maximum Arduino-level resolution:

Then:

returns values approximately from:

A0 Is a True DAC Output

A0 is not only an ADC input.

It is also connected to:

and provides a true:

according to Arduino’s board specification.

DAC Example

This is fundamentally different from ordinary PWM output.

PWM Pins

Arduino currently lists 12 PWM-capable pins:

The remaining header pins are not marked as default PWM outputs in the official board specification.

Hardware UART

The external hardware UART is:

Use:

for these pins.

USB Serial vs Serial1

Because the SAMD21 has native USB:

This lets a project communicate with a PC and an external serial device at the same time.

I2C Pins

The main I2C bus is:

Use:

I2C Example

External SPI Pins

The user-accessible SPI bus is:

Use:

The microSD Card Uses a Separate SPI Interface

This is one of the MKR Zero’s best design features.

The onboard microSD slot uses:

rather than the main user-facing SPI pins.

That means using the SD card does not normally consume:

from your external SPI bus.

Internal microSD Pin Mapping

The dedicated SD interface is wired internally as:

These are internal board signals rather than normal header pins.

Why Dedicated SPI1 Is Useful

A typical project can therefore use:

without sharing the same SPI wires.

This is especially useful for:

  • audio players;
  • data loggers;
  • display projects;
  • portable instruments.

SD Library

Arduino’s official MKR Zero documentation states that the SD library recognises the board’s dedicated SD interface automatically.

The important chip-select constant is:

rather than hard-coding an UNO-style SD chip-select number.

Basic microSD Example

Writing a File

microSD Card Uses 3.3 V Signalling

The onboard SD interface is already designed for the board’s 3.3 V domain.

No external SD level-shifter board is required when using the integrated socket.

I2S Makes MKR Zero Useful for Audio

The SAMD21 also exposes an:

digital-audio interface.

The official pinout identifies signals including:

This is one reason Arduino positions MKR Zero strongly for sound and music projects.

microSD + I2S Audio Architecture

A typical digital audio project can use:

The SD card handles storage while I2S moves digital audio data to an external audio device.

Native USB

The SAMD21 includes native:

with USB device and embedded-host capability.

The normal board connector is:

for:

  • programming;
  • power;
  • USB serial;
  • USB HID applications.

USB HID

Because the SAMD21 provides native USB, MKR Zero can be used for:

  • keyboard HID;
  • mouse HID;
  • custom USB interfaces.

This makes it more flexible than classic ATmega328P boards for USB-device projects.

Li-Po Battery Connector

The board includes support for a:

with onboard charging.

Arduino currently recommends at least:

capacity.

Battery Voltage Monitoring

MKR Zero includes an internal battery-voltage measurement path.

The Arduino SAMD core defines:

for reading that internal battery monitor.

This can be useful for:

  • battery gauges;
  • low-voltage warnings;
  • portable loggers;
  • sleep/wake applications.

VIN Is Not a Classic UNO VIN

The board is designed around a:

from USB/VIN.

Do not assume you can feed:

into VIN simply because classic UNO boards accept those ranges.

MKR boards use a different power architecture.

3.3 V and 5 V Rails

Arduino currently specifies:

subject to the power source and board operating conditions.

Remember:

Built-In LED

The SAMD core defines:

This is not one of the normal D0-D14 board-edge numbers.

ATECC508 Secure Element

The official MKR Zero pinout also shows an:

secure element connected internally.

This can be used for secure key storage and cryptographic identity functions through appropriate libraries.

External Interrupts

Arduino’s current store specification lists interrupt-capable pins including:

The SAMD21 event/interrupt system is more flexible than classic AVR boards, but using:

remains the safest Arduino-level approach.

SWD Debugging

The bottom-side debug pads expose:

for advanced debugging and programming with a suitable SWD probe.

Common Mistake 1: Applying 5 V to GPIO

The SAMD21 I/O is:

Do not apply 5 V to digital or analogue inputs.

Common Mistake 2: Using UNO SD Wiring

The onboard microSD does not use the main:

SPI connection.

It uses its own internal:

bus.

Common Mistake 3: Hard-Coding the SD Chip Select

Use:

rather than assuming an UNO-style SS pin.

Common Mistake 4: Assuming D9 Is PWM

Arduino’s current MKR Zero specification does not list:

among its 12 default PWM pins.

D9 is the main SPI:

pin.

Common Mistake 5: Confusing Serial with the UART

On MKR Zero:

Common Mistake 6: Driving Too Much Current

The official pinout states:

so use drivers for larger loads.

Quick Digital Reference

Quick Analog Reference

Quick Communications Reference

Final Thoughts

The Arduino MKR Zero is essentially a compact SAMD21 board optimised for storage and audio-oriented projects.

Its strongest combination is:

The dedicated microSD bus is particularly useful because it leaves the normal external SPI pins free for another peripheral.

The most important pinout rules are:

For a wireless version of the same general MKR/SAMD21 concept, see our Arduino MKR WiFi 1010 pinout guide. For other native-USB choices, see our Arduino USB HID boards comparison.

Share your love