DIO pin matching

From Dooba Wiki
Jump to navigation Jump to search


This page presents the pin matching used by the DIO (Digital I/O) library (and therefore by most other libraries of the Dooba ecosystem).

While ioNode users (or anyone targeting an ATMEGA1284P) should never have to worry about this, it becomes relevant when using other chips.

For example, the very common ATMEGA328P chip has less GPIO than the ATMEGA1284P. When using different chips, not all DIO pins will be available.

Always refer to the datasheet for your specific microcontroller to determine which ports/pins are available.

The table below present which AVR pin ID (in terms of port and pin number) corresponds to each DIO pin.

DIO pin AVR port/pin
0 A7
1 A6
2 A5
3 A4
4 A3
5 A2
6 A1
7 A0
8 B0
9 B1
10 B2
11 B3
12 B4
13 B5
14 B6
15 B7
16 D2
17 D3
18 D4
19 D5
20 D6
21 D7
22 C0
23 C1
24 C2
25 C3
26 C4
27 C5
28 C6
29 C7