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 HeaderAll 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 |
---|---|---|---|---|
5V0 | PWR | - | 5V0 from RPI | output only |
3V3 | PWR | - | 3V3 from RPI | output only |
EXT3 | PWR | - | Power from external source (3V3) | external 3V3 |
VCC | PWR | - | VCC (3V3) | Powers the board |
GND | PWR | - | GND (VSS) | |
SCL.3 | I/O | high | GPIO3 | I2C1_SCL |
SDA.2 | I/O | high | GPIO2 | I2C1_SDA |
TX.14 | I/O | low | GPIO14 | USART_TXD |
RX.15 | I/O | low | GPIO15 | USART_RXD |
MOSI.10 | I/O | low | GPIO10 | SPI0_MOSI |
MISO.9 | I/O | low | GPIO9 | SPI0_MISO |
SCK.11 | I/O | low | GPIO11 | SPI0_SCK |
CE0.8 | I/O | high | GPIO8 | SPI0_CE0 |
CE1.7 | I/O | high | GPIO7 | SPI0_CE1 |
GPIO4 | I/O | high | GPIO4 | GPCLK0 |
GPIO17 | I/O | low | GPIO17 | GPIO_GEN0 |
GPIO18 | I/O | low | GPIO18 | GPIO_GEN1 |
GPIO27 | I/O | low | GPIO27 | GPIO_GEN2 |
GPIO22 | I/O | low | GPIO22 | GPIO_GEN3 |
GPIO23 | I/O | low | GPIO23 | GPIO_GEN4 |
GPIO24 | I/O | low | GPIO24 | GPIO_GEN5 |
GPIO25 | I/O | low | GPIO25 | GPIO_GEN6 |
GPIO26 | I/O | low | GPIO26 | |
VCC | PWR | - | VCC (3V3) | Powers the board |
GND | PWR | - | GND (VSS) | |
PLUS HeaderOn 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 |
GPIO5 | I/O | high | GPIO5 | CAM_CLK |
GPIO6 | I/O | high | GPIO6 | LAN_RUN |
GPIO12 | I/O | low | GPIO12 | |
GPIO13 | I/O | low | GPIO13 | |
GPIO16 | I/O | low | GPIO16 | STATUS_LED |
GPIO19 | I/O | low | GPIO19 | |
GPIO20 | I/O | low | GPIO20 | |
GPIO21 | I/O | low | GPIO21 | CAM_GPIO |
VIN HeaderThe 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 |
3V3 | PWR | - | 3V3 from RPI | output only |
VCC | PWR | - | VCC (3V3) | Powers the board |
EXT3 | PWR | - | Power from external source (3V3) | external 3V3 |
CONN HeaderOn 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-SCK | I/O | LED | Connects onboard red LED to PB5/SCK (Arduino pin 13) | enables 'Arduino LED' |
SCL-IO3 | I/O | I2C | Connects ATmega328 SCL (PC5) to RPI SCL (GPIO3) | |
SDA-IO2 | I/O | I2C | Connects ATmega328 SDA (PC4) to RPI SDA (GPIO2) | |
RX-IO14 | I/O | UART | Connects ATmega328 RX (PD0) to RPI TX (GPIO14) | |
TX-IO15 | I/O | UART | Connects ATmega328 TX (PD1) to RPI RX (GPIO15) | |
MOSI-IO10 | I/O | SPI | Connects ATmega328 MOSI (PB3) to RPI MOSI (GPIO10) | jumper for programming |
MISO-IO9 | I/O | SPI | Connects ATmega328 MISO (PB4) to RPI MISO (GPIO9) | jumper for programming |
SCK-IO11 | I/O | SPI | Connects ATmega328 SCK (PB5) to RPI SCK (GPIO11) | jumper for programming |
RST-IO8 | I/O | SPI | Connects ATmega328 RST (PC6) to RPI CE0 (GPIO8) | jumper for programming |
SS-IO7 | I/O | SPI | Connects 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 |
PB4 | I/O | 12 | GPIO | MISO/PCINT4 |
VCC | PWR | - | VCC (3V3) | Powers the board |
PB5 | I/O | 13 | GPIO | SCK/PCINT5 |
PB3 | I/O | 11 | GPIO | MOSI/OC2A/PCINT3 |
PC6 | I/O | RESET | RESET | PCINT14 |
GND | PWR | - | 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 |
PC6 | I/O | RESET | RESET | PCINT14 |
PC5 | I/O | A5 | GPIO | SCL/ADC4/PCINT13 |
PC4 | I/O | A4 | GPIO | SDA/ADC4/PCINT12 |
PC3 | I/O | A3 | GPIO | ADC3/PCINT11 |
PC2 | I/O | A2 | GPIO | ADC2/PCINT10 |
PC1 | I/O | A1 | GPIO | ADC1/PCINT9 |
PC0 | I/O | A0 | GPIO | ADC0/PCINT8 |
PD0 | I/O | 0 | GPIO | RXD/PCINT16 |
PD1 | I/O | 1 | GPIO | TXD/PCINT17 |
PD2 | I/O | 2 | GPIO | INT0/PCINT18 |
PD3 | I/O | 3 | GPIO | INT1/PCINT19/OC2B |
PD4 | I/O | 4 | GPIO | T0/XCK/PCINT20 |
VCC | PWR | - | VCC (3V3) | Powers the board |
GND | PWR | - | GND (VSS) | |
AREF | REF | AREF | AREF | |
PD5 | I/O | 5 | GPIO | T1/PCINT21/OC0B |
PD6 | I/O | 6 | GPIO | AIN0/PCINT22/OC0A |
PD7 | I/O | 7 | GPIO | AIN1/PCINT23 |
PB0 | I/O | 8 | GPIO | ICP1/PCINT0/CLKO |
PB1 | I/O | 9 | GPIO | PCINT1/OC1A |
PB2 | I/O | 10 | GPIO | SS/OC1B/PCINT2 |
PB3 | I/O | 11 | GPIO | MOSI/OC2A/PCINT3 |
PB4 | I/O | 12 | GPIO | MISO/PCINT4 |
PB5 | I/O | 13 | GPIO | SCK/PCINT5 |
GND | PWR | - | GND (VSS) | |