.

Digital PinArduino 168/328Arduino Mega

.

PortAnalog pinUsagePortAnalog PinUsage

.

0PD 0USART RX PE 0 USART0 RX, pin Int 8

.

1PD 1USART TX PE 1 USART0 TX

.

2PD 2Ext Int 0 PE 4 PWM T3B, INT4

.

3PD 3PWM T2B, Ext Int 1 PE 5 PWM T3C, INT5

.

4PD 4 PG 5 PWM T0B

.

5PD 5PWM T0B PE 3 PWM T3A

.

6PD 6PWM T0A PH 3 PWM T4A

.

7PD 7 PH 4 PWM T4B

.

8PB 0Input Capture PH 5 PWM T4C

.

9PB 1PWM T1A PH 6 PWM T2B

.

10PB 2PWM T1B PB 4 PWM T2A, Pin Int 4

.

11PB 3PWM T2A, MOSI PB 5 PWM T1A, Pin Int 5

.

12PB 4MISO PB 6 PWM T1B, Pin Int 6

.

13PB 5SCK PB 7 PWM T0A, Pin Int 7

.

14PC 00 PJ 1 USART3 TX, Pin Int 10

.

15PC 11 PJ 0 USART3 RX, Pin Int 9

.

16PC 22 PH 1 USART2 TX

.

17PC 33 PH 0 USART2 RX

.

18PC 44I2C SDA PD 3 USART1 TX, Ext Int 3

.

19PC 55I2C SCL PD 2 USART1 RX, Ext Int 2

.

20 PD 1 I2C SDA, Ext Int 1

.

21 PD 0 I2C SCL, Ext Int 0

.

22 PA 0 Ext Memory addr bit 0

.

23 PA 1 Ext Memory addr bit 1

.

24 PA 2 Ext Memory addr bit 2

.

25 PA 3 Ext Memory addr bit 3

.

26 PA 4 Ext Memory addr bit 4

.

27 PA 5 Ext Memory addr bit 5

.

28 PA 6 Ext Memory addr bit 6

.

29 PA 7 Ext Memory addr bit 7

.

30 PC 7 Ext Memory addr bit 15

.

31 PC 6 Ext Memory addr bit 14

.

32 PC 5 Ext Memory addr bit 13

.

33 PC 4 Ext Memory addr bit 12

.

34 PC 3 Ext Memory addr bit 11

.

35 PC 2 Ext Memory addr bit 10

.

36 PC 1 Ext Memory addr bit 9

.

37 PC 0 Ext Memory addr bit 8

.

38 PD 7

.

39 PG 2 ALE Ext Mem

.

40 PG 1 RD Ext Mem

.

41 PG 0 Wr Ext Mem

.

42 PL 7

.

43 PL 6

.

44 PL 5 *PWM 5C

.

45 PL 4 *PWM 5B

.

46 PL 3 *PWM 5A

.

47 PL 2 T5 external counter

.

48 PL 1 ICP T5

.

49 PL 0 ICP T4

.

50 PB 3 SPI MISO

.

51 PB 2 SPI MOSI

.

52 PB 1 SPI SCK

.

53 PB 0 SPI SS

.

54 PF 0 0

.

55 PF 1 1

.

56 PF 2 2

.

57 PF 3 3

.

58 PF 4 4

.

59 PF 5 5

.

60 PF 6 6

.

61 PF 7 7

.

62 PK 0 8Pin Int 16

.

63 PK 1 9Pin int 17

.

64 PK 2 10Pin Int 18

.

65 PK 3 11Pin Int 19

.

66 PK 4 12Pin Int 20

.

67 PK 5 13Pin Int 21

.

68 PK 6 14Pin Int 22

.

69 PK 7 15Pin Int 23

.

.

Functions not available on Mega

.

.

PD 4 ICP1

.

PD 6 T1 (external counter)

.

PE 6 T3, Int 6

.

PE 7 Int 7, ICP3

.

PH 7 T4 (external counter)

.

PJ 2 Pin Int 11

.

.

* functions not implemented on version 0015

.

.

.

PWM pins Timer04,13

.

Timer111,12

.

Timer29,10

.

Timer32,3,5

.

Timer46,7,8

.

Timer5 none

.