Arduino Micro pinout: every hole, I2C on 2 and 3, SPI on 14 to 17
Beginner
Or see every lesson.
- 526parts on the bench
- 46boards running now
- 1.00xreal time, on every board
The Arduino Micro puts the Leonardo's ATmega32U4 on a small board that pushes into a breadboard. It runs at 16 MHz and measures 48 by 18 mm, with two rows of seventeen holes 0.6 inch apart. It uses the same chip and the same pin numbers as the Leonardo. This page lists the pins so you can find each one when you build.
A few pin names on this board work differently than you might expect. SDA and SCL are pins 2 and 3, not A4 and A5, because I2C sits on port D here. The MISO, SCK, MOSI and SS holes are pins 14 to 17, and SPI.h uses them. The two NC holes connect to nothing. The two RST holes are one trace.
Every pin on the board
The table has one row for each of the 34 holes of the Arduino Micro in Mokxi, in the order of the part's pin list, which follows the board's headers. A row that says "Not a GPIO" is a supply, a ground or a control pin, and a sketch cannot drive it.
Every row below is worked out from the same board model the simulator runs: the pin list, the Circuit Doctor's pin data and the default bus pins.
| Pin | Sketch name | What it can do | Watch out for |
|---|---|---|---|
| 13 | 13 | Digital in and out. PWM. The on-board LED is on this pin. | - |
| 3V3 | - | A 3.3 V power pin: 3V3. | Not a GPIO. |
| AREF | - | The board's AREF pin. | Not a GPIO. |
| A0 | A0 | Digital in and out. Analog in. | - |
| A1 | A1 | Digital in and out. Analog in. | - |
| A2 | A2 | Digital in and out. Analog in. | - |
| A3 | A3 | Digital in and out. Analog in. | - |
| A4 | A4 | Digital in and out. Analog in. | - |
| A5 | A5 | Digital in and out. Analog in. | - |
| NC | - | Not connected. | - |
| NC | - | Not connected. | - |
| 5V | - | A 5 V power pin: 5V. | Not a GPIO. |
| RESET | - | The board's RESET pin. | Not a GPIO. |
| GND | - | Ground. | - |
| VIN | - | A power input pin: VIN. | Not a GPIO. |
| MISO | 14 | Digital in and out. SPI MISO (default). | - |
| SCK | 15 | Digital in and out. SPI SCK (default). | - |
| 12 | 12 | Digital in and out. | - |
| 11 | 11 | Digital in and out. PWM. | - |
| 10 | 10 | Digital in and out. PWM. | - |
| 9 | 9 | Digital in and out. PWM. | - |
| 8 | 8 | Digital in and out. | - |
| 7 | 7 | Digital in and out. | - |
| 6 | 6 | Digital in and out. PWM. | - |
| 5 | 5 | Digital in and out. PWM. | - |
| 4 | 4 | Digital in and out. | - |
| 3 | 3 | Digital in and out. PWM. I2C SCL (default). | - |
| 2 | 2 | Digital in and out. I2C SDA (default). | - |
| GND | - | Ground. | - |
| RESET | - | The board's RESET pin. | Not a GPIO. |
| 0 | 0 | Digital in and out. Serial1 RX. | - |
| 1 | 1 | Digital in and out. Serial1 TX. | - |
| SS | 17 | Digital in and out. SPI SS (default). | Also the RX lamp: it lights while the pin is driven low. |
| MOSI | 16 | Digital in and out. SPI MOSI (default). | - |
How to read the table
The Pin column is what is printed on the board. The Sketch name column is what a sketch writes: plain numbers for pins 0 to 13, A names for the analog holes, and 14 to 17 for the holes marked MISO, SCK, MOSI and SS.
A hole that has no sketch name is a supply, a ground or a control pin. It is listed so the table matches the board, hole for hole.
Power and ground pins
The Arduino Micro has 2 ground holes in its pin list. Its 5 V pins are 5V. Its 3.3 V pins are 3V3. Its power input pins are VIN. Pins named for a job, not for a GPIO, are AREF, RESET and RESET. 2 holes are not connected to anything. A sketch cannot drive any of these with digitalWrite.
PWM and analog pins
These pins can drive PWM with analogWrite: 13, 11, 10, 9, 6, 5 and 3.
These pins can read an analog voltage with analogRead: A0, A1, A2, A3, A4 and A5. The pins run at 5 V.
The default I2C and SPI pins
Wire uses SDA on 2 and SCL on 3.
SPI uses SCK on 15, MISO on 14, MOSI on 16 and SS on 17.
Which pin should I use for what?
For an LED, a buzzer or a switch, any GPIO row in the table will do. For dimming, pick a PWM pin: 13, 11, 10, 9, 6, 5 and 3. For a potentiometer or an analog sensor, use A0, A1, A2, A3, A4 and A5. For an I2C module, wire SDA to 2 and SCL to 3. For an SPI module, wire SCK to 15, MISO to 14 and MOSI to 16, and use 17 for SS. The pins run at 5 V logic.
Reading the rows
Hold the board with the USB at the top. The left row reads 13, 3V3, AREF, A0 through A5, two NC holes, 5V, RST, GND, VIN, MISO and SCK. The right row reads 12 down to 2, then GND, RST, RX (pin 0), TX (pin 1), SS and MOSI.
The MISO, SCK, MOSI and SS holes are pins 14 to 17. The Leonardo only has these on its ICSP header. The Micro gives them holes of their own, and SPI.h uses them, as the Arduino core does.
The lamps on the board
Pin 13 has the L LED, as on the Leonardo. The L, RX, TX and ON lamps in Mokxi light from the pins behind them.
The RX lamp hangs from 5 V on SS, which is pin PB0. Driving SS low lights it. The calls RXLED1 and RXLED0 do that from a sketch. The TX lamp sits on PD5, which has no hole, and TXLED1 and TXLED0 light it.
Serial ports
The USB goes to the chip itself. Serial is the chip's own USB port, and that is what the serial monitor shows.
Serial1 is the USART on pins 0 and 1, the holes marked RX and TX. The USB stack itself is not modeled. Serial is a pipe to the monitor, with no enumeration and no USB descriptors.
What is modeled
The Mokxi model includes everything the Leonardo model has. That means the ATmega32U4's core, five ports, four timers including the ten-bit timer 4, and the USART.
It also has fourteen ADC channels, external interrupts and sleep. The USB serial port works as a byte pipe to the monitor. Keyboard.h, Mouse.h and Joystick.h build, and print each report to the serial monitor instead of typing into a computer.
Open this circuit in the editor. Arduino Micro: the RX lamp and pin 9, wired as it runs at the top of this page. Change a part or a value and run it again.
Open the circuitQuestions
What are the Arduino Micro I2C pins?
SDA is 2 and SCL is 3.
What are the Arduino Micro SPI pins?
SCK is 15, MISO is 14, MOSI is 16 and SS is 17.
Which pin has the built in LED?
Pin 13 has the `L` LED, as on the Leonardo.
Where are SDA and SCL on the Arduino Micro?
`SDA` and `SCL` are pins 2 and 3, not `A4` and `A5`. On this chip I2C is on port D.
What are the NC holes for?
The two `NC` holes are connected to nothing.
How do I light the RX and TX lamps?
`RXLED1` and `RXLED0` drive the `RX` lamp on `SS`. `TXLED1` and `TXLED0` light the `TX` lamp on PD5, which has no hole.
Will my Leonardo sketch run on the Micro?
Yes. It is the same chip with the same pin numbers, so a sketch and a program built for one run on the other unchanged.
Build this for real
Open the editor, change a value and watch the number move with it. Nothing to install, and no account needed.