Learn

SparkFun Pro Micro pinout: every pin, its 32U4 port, and no pin 13

Beginner

Or see every lesson.

  • 455parts on the bench
  • 43boards running now
  • 1.00xreal time, on every board
Pro Micro: blink without pin 13live0.000 s 0.00x
Click to open it in the editor
The RX lamp on PB0 lights when the pin is LOW; the LED on pin 9 lights when it is HIGH.

The SparkFun Pro Micro is the Leonardo’s ATmega32U4 on a board 33 by 18 mm with twelve pins down each side and a micro-USB socket on the end. It is the board in most hand-built keyboards and game controllers, because its USB goes straight to the chip. This page lists every pin with its Arduino number and the chip pin behind it, which is the name a QMK keyboard config uses, then the power pins, the PWM and interrupt pins, I2C and SPI, and the two LEDs it has instead of one on pin 13.

The circuit above is a Pro Micro in Mokxi blinking its RX lamp, which lights when its pin is LOW, beside an LED on pin 9 wired the ordinary way around. Mokxi models the 5 V, 16 MHz board, and the table is read from the same board model the simulator runs. Where the simulator does less than the board, the page says so.

Every pin, with its ATmega32U4 pin

With the USB socket at the top, the left row reads TXO, RXI, GND, GND, then 2 to 9. The right row reads RAW, GND, RST, VCC, A3 to A0, then 15, 14, 16 and 10. TXO and RXI are pins 1 and 0. The chip pin column is the port and bit, PD3 for TXO, and that is how QMK names a pin: a keyboard config that says D3 means TXO, not Arduino pin 3.

Pins 14, 15 and 16 sit out of order at the bottom of the right row because they are the chip’s SPI pins, and pin 13 is missing altogether: PC7, which is pin 13 and the L LED on a Leonardo, has no pad on this board.

SparkFun Pro Micro: the left row top to bottom, then the right, USB at the top
PinChip pinWhat it can doWatch out for
1PD3Serial1 TX, printed TXO. INT3: attachInterrupt.Serial is the USB socket, not this pin.
0PD2Serial1 RX, printed RXI. INT2: attachInterrupt.Serial is the USB socket, not this pin.
GND-Ground. Three pins.-
2PD1Digital. I2C SDA. INT1: attachInterrupt.Used by any I2C device.
3PD0PWM on timer 0, 976 Hz. I2C SCL. INT0: attachInterrupt.Used by any I2C device.
4PD4Digital. Also analog input A6.-
5PC6PWM on timer 3, 490 Hz.-
6PD7PWM on timer 4, 976 Hz. Also analog input A7.-
7PE6Digital. INT6: attachInterrupt.The one interrupt pin that is nothing else.
8PB4Digital. Also analog input A8.-
9PB5PWM on timer 1, 490 Hz. Also analog input A9.The Servo library takes timer 1 on a real board.
RAW-Power in for the onboard regulator.Not a GPIO. Mokxi ignores it; the board is on USB.
RESET-Reset, printed RST: low restarts the chip.Not a GPIO.
VCC-The 5 V rail, from USB or the regulator.Not a GPIO.
A3PF4Analog. Digital 21.-
A2PF5Analog. Digital 20.-
A1PF6Analog. Digital 19.-
A0PF7Analog. Digital 18.-
15PB1Digital. SPI SCK (default).Used by any SPI device.
14PB3Digital. SPI MISO (default).Used by any SPI device.
16PB2Digital. SPI MOSI (default).Used by any SPI device.
10PB6PWM on timer 1, 490 Hz. Also analog input A10.The Servo library takes timer 1 on a real board.

Power: RAW, VCC and GND

RAW is the input to the onboard regulator, and SparkFun gives up to 12 V there for the 5 V board. VCC is the regulated 5 V rail, from USB or from RAW, and it can power a sensor or a few LEDs. GND is ground, on three pins. In Mokxi the board is always on USB, RAW is an input it ignores, and VCC is an ideal 5 V rail that cannot sag.

Each pin is good for about 20 mA, and the ATmega32U4’s absolute maximum is 40 mA per pin. The 3.3 V, 8 MHz Pro Micro is a different board with the same pinout and a slower clock; Mokxi models the 5 V one.

No pin 13: the RX and TX LEDs

LED_BUILTIN is still 13, so Blink compiles and lights nothing, on a desk and in Mokxi. The two lamps the board does have are RX, on PB0, which is pin 17 and has no pad, and TX, on PD5, which has no pin number at all. Both are wired from VCC through a resistor to the pin, so they light when the pin is LOW.

RXLED1 and TXLED1 light them, RXLED0 and TXLED0 put them out, and TX_RX_LED_INIT sets both pins up; the USB core also flashes them when data moves. The red lamp is the power light and is on no pin.

PWM, interrupts and the analog pins

Five pins do PWM with analogWrite: 3 and 6 at 976 Hz, on timers 0 and 4, and 5, 9 and 10 at 490 Hz, on timers 3 and 1. Mokxi runs them on the same timers at the same rates. The Servo library takes timer 1 on this chip, which stops PWM on 9 and 10 while a servo is attached.

attachInterrupt works on 0, 1, 2, 3 and 7, which are INT2, INT3, INT1, INT0 and INT6. Four of those five are also Serial1 or I2C, so 7 is the one to reach for first. A0 to A3 read ten bits against the 5 V rail, and pins 4, 6, 8, 9 and 10 are analog inputs too, as A6 to A10: analogRead(A9) reads pin 9, here and on the board.

Serial, USB, I2C and SPI

Serial is the chip’s own USB port, which is the serial monitor, and it reaches no pin. Serial1 is the UART on TXO and RXI, a port of its own. On a real board while (!Serial) {} waits for a computer to open the port; in Mokxi it returns at once. I2C is pin 2 for SDA and 3 for SCL, the Leonardo’s pins, not A4 and A5 as on an Uno.

SPI is where it is on every 32U4 board: SCK on 15, MISO on 14 and MOSI on 16, here and on a desk. SS is 17, which is PB0, the RX lamp’s pin, and has no pad, so give a module’s chip select a pin of its own, such as 10, and drive it yourself. SPI.begin() sets 17 as an output and high, which puts the RX lamp out, as it does on the board.

The USB socket is the upload port too. After a reset the bootloader waits eight seconds for a new program, and the board has no reset button, so touching RST to GND twice quickly is how you recover one whose sketch broke its USB.

Questions

Why is there no pin 13 on a Pro Micro?

The chip’s PC7, which is pin 13 on a Leonardo, has no pad on this board, and neither does the L LED. Blink the RX lamp with `RXLED1` and `RXLED0`, or wire an LED to pin 9.

Which Pro Micro pins are PWM?

3, 5, 6, 9 and 10. 3 and 6 run at 976 Hz and the other three at 490 Hz.

What are the Pro Micro I2C pins?

2 is SDA and 3 is SCL, the same pins as a Leonardo. Not A4 and A5, as on an Uno.

What are the Pro Micro pin names in QMK?

The chip’s port pins: D3 and D2 for TXO and RXI, then D1, D0, D4, C6, D7, E6, B4 and B5 down the left after the grounds, and F4, F5, F6, F7, B1, B3, B2 and B6 on the right after VCC.

Which Pro Micro pin should I use for a button?

Any of 4 to 10, 14 to 16 or A0 to A3, with `INPUT_PULLUP` and the button to ground. Use 7 if it needs an interrupt and you want 0 to 3 for Serial1 and I2C.

Is the Pro Micro the same as an Arduino Micro?

The same chip and the same Arduino numbers, on a smaller board with fewer pins. The Micro has pin 13 and its LED; the Pro Micro has neither.

Build this for real

Open the editor, change a value and watch the number move with it. Nothing to install, and no account needed.