Pinout AVRPi-32U4

The female 2x25 header on the top of the board is connected to the GPIO pins of the Raspberry Pi and some analog pins of the ATmega32U4. The female 1x25 header on the bottom of the board is connected to the pins of the ATmega32U4, and contains all 'digital Arduino' pins.

The board also contains dual row male headers to directly connect suitable pins from the ATmega32U4 to the Raspberry Pi.

RPI Header

All of the Raspberry Pi GPIO pins are broken out to this header.

For a detailed description of these pins, see: http://elinux.org/RPi_BCM2835_GPIOs

Pin Type Pull Default Remap
GPIO4I/OhighGPIO4GPCLK0
GPIO17I/OlowGPIO17GPIO_GEN0
GPIO18I/OlowGPIO18GPIO_GEN1
GPIO27I/OlowGPIO27GPIO_GEN2
GPIO22I/OlowGPIO22GPIO_GEN3
SCL.3I/OhighGPIO3I2C1_SCL
SDA.2I/OhighGPIO2I2C1_SDA
TX.14I/OlowGPIO14USART_TXD
RX.15I/OlowGPIO15USART_RXD
MOSI.10I/OlowGPIO10SPI0_MOSI
MISO.9I/OlowGPIO9SPI0_MISO
SCK.11I/OlowGPIO11SPI0_SCK
CE0.8I/OhighGPIO8SPI0_CE0
CE1.7I/OhighGPIO7SPI0_CE1
GPIO23I/OlowGPIO23GPIO_GEN4
GPIO24I/OlowGPIO24GPIO_GEN5
GPIO25I/OlowGPIO25GPIO_GEN6
GPIO5I/OhighGPIO5CAM_CLK
GPIO6I/OhighGPIO6LAN_RUN
GPIO12I/OlowGPIO12 
GPIO13I/OlowGPIO13 
GPIO19I/OlowGPIO19 
GPIO20I/OlowGPIO20 
GPIO21I/OlowGPIO21CAM_GPIO
GPIO26I/OlowGPIO26 
GPIO16I/OlowGPIO16STATUS_LED
 

AVR1 Header (ATmega32U4)

Some of the ATmega32U4 GPIO pins are broken out on this header.

Please note that some of the pins may also be connected to Raspberry Pi GPIO pins, depending on what jumpers are on the CONN header.

There are also power related pins on this header. Please note that the PI5V pin on this header is powered from the Raspberry Pi. If you're backpowering 5V to the Raspberry Pi through the PI5V pin, please take the necessary precautions.

Pin Type Arduino Default Remap
USBPWRVUSB (5V)5V0 Power from USBoutput only
VINPWR-External (PWR)5V0 from RPI or USB
PI5VPWR-5V0 from RPIoutput only
VCCPWR-VCC (3V3)Powers the board
GNDPWR-GND 
PD0I/O3GPIO (SCL)OC0B/SCL/INT0
PD1I/O2GPIO (SDA)SDA/INT1
PD2I/O0GPIO (RX)RXD1/INT2
PD3I/O1GPIO (TX)TXD1/INT3
PB2I/OMOSIGPIOPDI/PCINT2/MOSI
PB3I/OMISOGPIOPDI/PCINT3/MISO
PB1I/OSCKGPIOPCINT1/SCLK
RSTI/ORESETRESETRESET
PB0I/OrxledGPIOSS/PCINT0
PE2I/O-GPIOHWB
AREFREFAREFAREF 
PF0I/OA5GPIOADC0
PF1I/OA4GPIOADC1
PF4I/OA3GPIOADC4/TCK
PF5I/OA2GPIOADC5/TMS
PF6I/OA1GPIOADC6/TDO
PF7I/OA0GPIOADC7/TDI
VCCPWR-VCC (3V3)Powers the board
GNDPWR-GND 
 

VIN Header

The ATmega32U4 on the board is powered by the VCC pin. Put a jumper on either RPI/VIN or USB/VIN, depending on what source you want to use for the 3V3 voltage regulator to power VCC.

Pin Type Startup Default With Jumper
RPIPWR-5V0 from RPIoutput only
VINPWR-External (PWR)5V0 from RPI or USB
USBPWRVUSB (5V)5V0 Power from USBoutput only
 

CONN Header

On the CONN header you can make direct connections from the ATmega32U4 to the RPI (USART, I2C, SPI, RST, HWB) using jumpers.

To program the ATmega32U4, put jumpers on 'MOSI-10', 'MISO-9', 'SCK-11' and 'RST-8'.

After programming is done you can do with the pins as you please (see RPI and AVR header).

To be able to communicate with the ATmega32U4 in 'minicom' or 'screen', put a jumper on 'RX-14' and 'TX-15'.

For faster communication than UART, jumper the appropriate pins and use the ATmega32U4 as an I2C or SPI slave (the Raspberry Pi can only be master).

Pin Type Function With Jumper Info
SCL-IO3I/OI2CConnects ATmega32U4 SCL (PD0) to RPI SCL (GPIO3) 
SDA-IO2I/OI2CConnects ATmega32U4 SDA (PD1) to RPI SDA (GPIO2) 
RX-IO14I/OUARTConnects ATmega32U4 RX (PD2) to RPI TX (GPIO14) 
TX-IO15I/OUARTConnects ATmega32U4 TX (PD3) to RPI RX (GPIO15) 
MOSI-IO10I/OSPIConnects ATmega32U4 MOSI (PB2) to RPI MOSI (GPIO10)jumper for programming
MISO-IO9I/OSPIConnects ATmega32U4 MISO (PB3) to RPI MISO (GPIO9)jumper for programming
SCK-IO11I/OSPIConnects ATmega32U4 SCK (PB1) to RPI SCK (GPIO11)jumper for programming
RST-IO8I/OSPIConnects ATmega32U4 RST (RST) to RPI CE0 (GPIO8)jumper for programming
SS-IO7I/OSPIConnects ATmega32U4 SS (PB0) to RPI CE1 (GPIO7) 
HWB-IO23I/OHWBConnects ATmega32U4 HWB (PE2) to RPI GPIO23 
 

ICSP Header (ATmega32U4)

On the ICSP header you can connect an external programmer to program the chip.

Do not connect a programmer when the AVRPi board is still on the Raspberry Pi! At least remove all the jumpers from the CONN header first, or (better) remove the board completely from the Pi.

Whatever you do, don't put jumpers on these header. Things won't break, but they won't work either.

Pin Type Arduino Default Remap
PB3I/OMISOGPIOPDI/PCINT3/MISO
VCCPWR-VCC (3V3)Powers the board
PB1I/OSCKGPIOPCINT1/SCLK
PB2I/OMOSIGPIOPDI/PCINT2/MOSI
RSTI/ORESETRESETRESET
GNDPWR-GND 
 

AVR2 Header (ATmega32U4)

All of the ATmega32U4 GPIO pins are broken out on this header.

Please note that some of the pins may also be connected to Raspberry Pi GPIO pins, depending on what jumpers are on the CONN header.

Pin Type Arduino Default Remap
VCCPWR-VCC (3V3)Powers the board
GNDPWR-GND 
PE6I/O7GPIOINT6/AIN0
PB0I/OrxledGPIOSS/PCINT0
PB1I/OSCKGPIOPCINT1/SCLK
PB2I/OMOSIGPIOPDI/PCINT2/MOSI
PB3I/OMISOGPIOPDI/PCINT3/MISO
PB7I/O11GPIOPCINT7/OC0A/OC1C/RTS
RSTI/ORESETRESETRESET
VCCPWR-VCC (3V3)Powers the board
GNDPWR-GND 
PD0I/O3GPIO (SCL)OC0B/SCL/INT0
PD1I/O2GPIO (SDA)SDA/INT1
PD2I/O0GPIO (RX)RXD1/INT2
PD3I/O1GPIO (TX)TXD1/INT3
PD4I/O4GPIOICP1/ADC8
PD5I/OtxledGPIOXCK1/CTS
PD6I/O12GPIOT1/OC4D/ADC9
PD7I/O6GPIOT0/OC4D/ADC10
PB4I/O8GPIOPCINT4/ADC11
PB5I/O9GPIOOC1A/PCINT5/OC4B/ADC12
PB6I/O10GPIOOC1B/PCINT6/OC4B/ADC13
PC6I/O5GPIOOC3A/OC4A
PC7I/O13GPIOICP3/CLK0/OC4A
GNDPWR-GND