Number of pins: 18+2
The Arduino Pro Micro has 18 easily accessible pins, that's theoretically enough for a board with up to 81 keys (9*9).
However, there are 2 more pins, used by the onboard LEDs, which can be quite easily turned into usable pins. Just follow my Pro Micro upgrade guide and solder your wire to the pad of the removed resistors of the RX/TX LEDs. This way you can wire up a board with up to 100 keys (using the 18+2 pins in a matrix of 10 rows and 10 columns).
The additional pins are B0 and D5 as described in the ATmega16U4/32U4 data sheet.
The Atmega32u4 has even more GPIO pins (26), which could be available by soldering directly to the microcontroller, but that's not really for beginners.
Pinout & pin names
If you use the Pro Micro outside the Arduino IDE (e.g. with QMK), you'll have to translate the pin names marked on its PCB to the AVR ones. E.g. pin 3 on the Pro Micro is called D0 on the Atmega32u4.
Arduino makes it confusing by not mapping its pin numbers to AVR ports, but this is for a reason. Some pins on the AVR can also be used for special purposes such as serial, timer input, PWM output, etc. and they are therefore sometimes labelled by those functions on the Pro Micro.
Here is the mapping:
Arduino pins to AVR ports. This is a table to translate the Arduino pin names marked on the silk screen into ARV ports, ordered more or less alphabetically:
|LED pin (left of crystal)||B0|
|LED pin (right of crystal)||D5|
AVR ports to Arduino pin names. The same data as above, this time in order of the AVR codes to make translating from AVR to Arduino easier:
|B0||LED pin (left of crystal)|
|D5||LED pin (right of crystal)|
The Pro Micro has a built-in voltage regulator (it was designed to run on batteries).
There are two variants of the Pro Micro: One which feeds the AVR 3.3V, and one which is made to feed it 5V - the 5V version being the most common.
If you do feed it with +5.0V from USB, however, there is a penalty - the voltage regulator will deliver only +4.9V.
The AVR should run well on 4.9V, but you could also bypass the voltage regulator by bridging J1 with solder.
- RAW = +5V from the USB port (or power IN if you use battery).
- VCC = +4.9V (or 3.3V) from the voltage regulator, or +5V if bypassed.
On 3.3V, the AVR is limited to 8 MHz and the firmware needs to be made for it but since most firmwares are made for the Teensy 2.0 which runs always on 5V, if you have the 3.3V of the Pro Micro you should bridge J1 to run that firmware.
The Pro Micro is a great choice if its 18+2 pins are sufficient for your project. For more pins the Teensy is a good alternative (Pro Micro vs. Teensy comparison), or check this ever growing list of common controllers with similar form factor (not just for keyboard projects).
Creditsscottc, Findecanon, Ladrigon
- Sparkfun Pro Micro datasheet
- deskthority.net - Cheaper Teensy alternative
- deskthority.net - In praise of Bigfoot
- You have more than 18 pins on a Pro Micro
Az első flash