Pinout AVRPi-328

The female 1x25 header on the top of the board is connected to the GPIO pins of the Raspberry Pi. The female 1x25 header on the bottom of the board is connected to the pins of the ATmega328.

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

RPI Header

All of the Raspberry Pi GPIO pins (that were on the original Raspberry Pi Model A and B) are broken out to this header (but there was room for pin 26 as well).

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

There are also power related pins on this header. Please note that the 5V0 and both 3V3 pins on this header are powered from the Raspberry Pi. They're strictly output only. If you're backpowering 5V to the Raspberry Pi through the 5V0 pin, please take the necessary precautions.

Do not (ever) supply external power to the 3V3 pins!!

Pin Type Pull Default Remap
5V0PWR-5V0 from RPIoutput only
3V3PWR-3V3 from RPIoutput only
EXT3PWR-Power from external source (3V3)external 3V3
VCCPWR-VCC (3V3)Powers the board
GNDPWR-GND (VSS) 
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
GPIO4I/OhighGPIO4GPCLK0
GPIO17I/OlowGPIO17GPIO_GEN0
GPIO18I/OlowGPIO18GPIO_GEN1
GPIO27I/OlowGPIO27GPIO_GEN2
GPIO22I/OlowGPIO22GPIO_GEN3
GPIO23I/OlowGPIO23GPIO_GEN4
GPIO24I/OlowGPIO24GPIO_GEN5
GPIO25I/OlowGPIO25GPIO_GEN6
GPIO26I/OlowGPIO26 
VCCPWR-VCC (3V3)Powers the board
GNDPWR-GND (VSS) 
 

PLUS Header

On this header you'll find the pins that were added on the Raspberry Pi Model A+/B+ and 2B (pin 26 is on the RPI header).

Pin Type Pull Default Remap
GPIO5I/OhighGPIO5CAM_CLK
GPIO6I/OhighGPIO6LAN_RUN
GPIO12I/OlowGPIO12 
GPIO13I/OlowGPIO13 
GPIO16I/OlowGPIO16STATUS_LED
GPIO19I/OlowGPIO19 
GPIO20I/OlowGPIO20 
GPIO21I/OlowGPIO21CAM_GPIO
 

VIN Header

The ATMega328 on the board is powered by the VCC pin. Put a jumper on either RPI3V3/VCC or EXT3V3/VCC, depending on where you want the 3V3 power to VCC from.

Pin Type Startup Default With Jumper
3V3PWR-3V3 from RPIoutput only
VCCPWR-VCC (3V3)Powers the board
EXT3PWR-Power from external source (3V3)external 3V3
 

CONN Header

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

To program the ATmega328, 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 ATmega328 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 ATmega328 as an I2C or SPI slave (the Raspberry Pi can only be master).

Pin Type Function With Jumper Info
LED-SCKI/OLEDConnects onboard red LED to PB5/SCK (Arduino pin 13)enables 'Arduino LED'
SCL-IO3I/OI2CConnects ATmega328 SCL (PC5) to RPI SCL (GPIO3) 
SDA-IO2I/OI2CConnects ATmega328 SDA (PC4) to RPI SDA (GPIO2) 
RX-IO14I/OUARTConnects ATmega328 RX (PD0) to RPI TX (GPIO14) 
TX-IO15I/OUARTConnects ATmega328 TX (PD1) to RPI RX (GPIO15) 
MOSI-IO10I/OSPIConnects ATmega328 MOSI (PB3) to RPI MOSI (GPIO10)jumper for programming
MISO-IO9I/OSPIConnects ATmega328 MISO (PB4) to RPI MISO (GPIO9)jumper for programming
SCK-IO11I/OSPIConnects ATmega328 SCK (PB5) to RPI SCK (GPIO11)jumper for programming
RST-IO8I/OSPIConnects ATmega328 RST (PC6) to RPI CE0 (GPIO8)jumper for programming
SS-IO7I/OSPIConnects ATmega328 SS (PB2) to RPI CE1 (GPIO7) 
 

ICSP Header (ATmega328)

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 and the VIN header first. It's best to remove the board completely from the Pi.

Whatever you do, don't put jumpers on this header. Things won't immediately break, but it will stop things from working.

In fact, if you don't have an external programmer you might as well leave the pinheader off.

Pin Type Arduino Default Remap
PB4I/O12GPIOMISO/PCINT4
VCCPWR-VCC (3V3)Powers the board
PB5I/O13GPIOSCK/PCINT5
PB3I/O11GPIOMOSI/OC2A/PCINT3
PC6I/ORESETRESETPCINT14
GNDPWR-GND (VSS) 
 

AVR Header (ATmega328)

All of the ATmega328 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
PC6I/ORESETRESETPCINT14
PC5I/OA5GPIOSCL/ADC4/PCINT13
PC4I/OA4GPIOSDA/ADC4/PCINT12
PC3I/OA3GPIOADC3/PCINT11
PC2I/OA2GPIOADC2/PCINT10
PC1I/OA1GPIOADC1/PCINT9
PC0I/OA0GPIOADC0/PCINT8
PD0I/O0GPIORXD/PCINT16
PD1I/O1GPIOTXD/PCINT17
PD2I/O2GPIOINT0/PCINT18
PD3I/O3GPIOINT1/PCINT19/OC2B
PD4I/O4GPIOT0/XCK/PCINT20
VCCPWR-VCC (3V3)Powers the board
GNDPWR-GND (VSS) 
AREFREFAREFAREF 
PD5I/O5GPIOT1/PCINT21/OC0B
PD6I/O6GPIOAIN0/PCINT22/OC0A
PD7I/O7GPIOAIN1/PCINT23
PB0I/O8GPIOICP1/PCINT0/CLKO
PB1I/O9GPIOPCINT1/OC1A
PB2I/O10GPIOSS/OC1B/PCINT2
PB3I/O11GPIOMOSI/OC2A/PCINT3
PB4I/O12GPIOMISO/PCINT4
PB5I/O13GPIOSCK/PCINT5
GNDPWR-GND (VSS)