3.1 I/O Multiplexing

VQFN64/
                                TQFP64

VQFN48/
                                TQFP48

VQFN32/
                                TQFP32

SOIC28/SSOP28/
                                SPDIP28

Pin name(1,2)

Special

ADC0 ACn DAC0 OPAMP ZCDn USARTn SPIn TWIn(4) TCAn TCBn TCD0 EVSYS CCL-LUTn
62 44 30 22 PA0

XTALHF1
                                EXTCLK

0, TxD 0, WO0 0, IN0
63 45 31 23 PA1 XTALHF2 0, RxD 0, WO1 0, IN1
64 46 32 24 PA2 TWI Fm+ 0, XCK 0, SDA(HC) 0, WO2 0, WO EVOUTA 0, IN2
1 47 1 25 PA3 TWI Fm+ 0, XDIR 0, SCL(HC) 0, WO3 1, WO 0, OUT
2 48 2 26 PA4 0, TxD(3) 0, MOSI 0, WO4 WOA
3 1 3 27 PA5 0, RxD(3) 0, MISO 0, WO5 WOB
4 2 4 28 PA6 0, XCK(3) 0, SCK WOC 0, OUT(3)
5 3 5 1 PA7 CLKOUT

0, OUT
                                1, OUT
                                2, OUT

0, OUT
                                1, OUT
                                    2, OUT

0, XDIR(3) 0, SS WOD EVOUTA(3)
6 VDD
7 GND
8 4 PB0 3, TxD

0, WO0(3)
                                1, WO0

4, IN0
9 5 PB1 3, RxD

0, WO1(3)
                                1, WO1

4, IN1
10 6 PB2 TWI 3, XCK 1, SDA(HC)(3)

0, WO2(3)
                                1, WO2

EVOUTB 4, IN2
11 7 PB3 TWI 3, XDIR 1, SCL(HC)(3)

0, WO3(3)
                                1, WO3

4, OUT
12 8 PB4 3, TxD(3) 1, MOSI(3)

0, WO4(3)
                                1, WO4

2, WO(3) WOA(3)
13 9 PB5 3, RxD(3) 1, MISO(3)

0, WO5(3)
                                1, WO5

3, WO WOB(3)
14 PB6 3, XCK(3) 1, SCK(3) 1, SDA(C)(3) WOC(3) 4, OUT(3)
15 PB7 3, XDIR(3) 1, SS(3) 1, SCL(C)(3) WOD(3) EVOUTB(3)
16 10 6 2 PC0 1, TxD 1, MOSI 0, WO0(3) 2, WO 1, IN0
17 11 7 3 PC1 1, RxD 1, MISO 0, WO1(3) 3, WO(3) 1, IN1
18 12 8 4 PC2 TWI Fm+ 1, XCK 1, SCK 0, SDA(HC)(3) 0, WO2(3) EVOUTC 1, IN2
19 13 9 5 PC3 TWI Fm+ 1, XDIR 1, SS 0, SCL(HC)(3) 0, WO3(3) 1, OUT
20 14 10 6 VDDIO2
21 15 GND
22 16 PC4 1, TxD(3) 1, MOSI(3)

0, WO4(3)
                                1, WO0(3)

23 17 PC5 1, RxD(3) 1, MISO(3)

0, WO5(3)
                                1, WO1(3)

24 18 PC6

0, OUT(3)
                                1, OUT(3)
                                2, OUT(3)
                            

1, XCK(3) 1, SCK(3) 0, SDA(C)(3) 1, WO2(3) 1, OUT(3)
25 19 PC7

0, OUT(3)
                                1, OUT(3)
                                            2, OUT(3)

1, XDIR(3) 1, SS(3) 0, SCL(C)(3) EVOUTC(3)
26 20 PD0 AIN0

0, AINN1
                                1, AINN1
                                2, AINN1

0, WO0(3) 2, IN0
27 21 11 7 PD1 AIN1 OP0, INP 0, ZCIN 0, WO1(3) 2, IN1
28 22 12 8 PD2 AIN2

0, AINP0
                                1, AINP0
                                2, AINP0

OP0, OUT 0, WO2(3) EVOUTD 2, IN2
29 23 13 9 PD3 AIN3

0, AINN0
                                1, AINP1

OP0, INN 0, WO3(3) 2, OUT
30 24 14 10 PD4 AIN4

1, AINP2
                                2, AINP1

OP1, INP 0, WO4(3)
31 25 15 11 PD5 AIN5 1, AINN0 OP1, OUT 0, WO5(3)
32 26 16 12 PD6 AIN6

0, AINP3
                                1, AINP3
                                2, AINP3

OUT 2, OUT(3)
33 27 17 13 PD7 VREFA AIN7

0, AINN2
                                1, AINN2
                                2, AINN0/AINN2

OP1, INN EVOUTD(3)
34 28 18 14 AVDD
35 29 19 15 AGND
36 30 PE0 AIN8 0, AINP1 4, TxD 0, MOSI(3) 0, WO0(3)
37 31 PE1 AIN9 2, AINP2 OP2, INP 4, RxD 0, MISO(3) 0, WO1(3)
38 32 PE2 AIN10 0, AINP2 OP2, OUT 4, XCK 0, SCK(3) 0, WO2(3) EVOUTE
39 33 PE3 AIN11 OP2, INN 1, ZCIN 4, XDIR 0, SS(3) 0, WO3(3)
40 PE4 AIN12 4, TxD(3)

0, WO4(3)
                                1, WO0(3)

41 PE5 AIN13 4, RxD(3)

0, WO5(3)
                                1, WO1(3)

42 PE6 AIN14 4, XCK(3) 1, WO2(3)
43 PE7 AIN15 2, ZCIN 4, XDIR(3) EVOUTE(3)
44 34 20 16 PF0 XTAL32K1 AIN16(5) 2, TxD 0, WO0(3) WOA(3) 3, IN0
45 35 21 17 PF1 XTAL32K2 AIN17(5) 2, RxD 0, WO1(3) WOB(3) 3, IN1
46 36 22 PF2 TWI Fm+ AIN18(5) 2, XCK 1, SDA(HC) 0, WO2(3) WOC(3) EVOUTF 3, IN2
47 37 23 PF3 TWI Fm+ AIN19(5) 2, XDIR 1, SCL(HC) 0, WO3(3) WOD(3) 3, OUT
48 38 24 PF4 AIN20(5) 2, TxD(3) 0, WO4(3) 0, WO(3)
49 39 25 PF5 AIN21(5) 2, RxD(3) 0, WO5(3) 1, WO(3)
50 40 26 18 PF6(6) RESET
51 41 27 19 UPDI UPDI
52 PG0 5, TxD

0, WO0(3)
                                1, WO0(3)

5, IN0
53 PG1 5, RxD

0, WO1(3)
                                1, WO1(3)

5, IN1
54 PG2 5, XCK

0, WO2(3)
                                1, WO2(3)

EVOUTG 5, IN2
55 PG3 5, XDIR

0, WO3(3)
                                1, WO3(3)

4, WO 5, OUT
56 42 28 20 VDD
57 43 29 21 GND
58 PG4 5, TxD(3) 0, MOSI(3)

0, WO4(3)
                                1, WO4(3)

WOA(3)
59 PG5 5, RxD(3) 0, MISO(3)

0, WO5(3)
                                1, WO5(3)

WOB(3)
60 PG6 5, XCK(3) 0, SCK(3) WOC(3) 5, OUT(3)
61 PG7 5, XDIR(3) 0, SS(3) WOD(3) EVOUTG(3)
Note:
  1. Pin names are of type Pxn, with x being the PORT instance (A, B, C, ...) and n the pin number. Notation for signals is PORTx_PINn. All pins can be used as event inputs.
  2. All pins can be used for external interrupt, where pins Px2 and Px6 of each port have full asynchronous detection.
  3. Alternative pin positions. To select alternative pin positions refer to the Port Multiplexer section.
  4. TWI pins are marked HC if they can be used as TWI Host or Client pins, and C if they can only be used as TWI Client pins.
  5. AIN16 - AIN21 cannot be used as a negative ADC input for differential measurements.
  6. Input only.