14.4.8.1 Alternate Functions of Port A

The Port A pins with alternate functions are shown in the table below:

Table 14-3. Port A Pins Alternate Functions
Port PinAlternate Functions
PA[0]

ADC0: ADC Input Channel 0

AIN0: Analog Comparator, Positive Input

T0: Timer/Counter0 Clock Source (default location)

PCINT0: Pin Change Interrupt source 0

CLKI: External Clock

TPICLK: Serial Programming Clock

PA[1]

ADC1: ADC Input Channel 1

AIN1: Analog Comparator, Negative Input

OC0B: Timer/Counter0 Compare Match B Output (default
    location)

PCINT1: Pin Change Interrupt source 1

TPIDATA: Serial Programming Data

PA[2]

PCINT2: Pin Change Interrupt source 2

RESET: Reset Pin

PA[3]

OC0A: Timer/Counter0 Compare Match A Output (alternative
    location)

PCINT3: Pin Change Interrupt source 3

PA[4]

ICP0: Timer/Counter0 Input Capture Input (alternative
    location)

PCINT4: Pin Change Interrupt source 4

PA[5]

ADC2: ADC Input Channel 2

OC0B: Timer/Counter0 Compare Match B Output (alternative
    location)

PCINT5: Pin Change Interrupt source 5

PA[6]

ADC3: ADC Input Channel 3

PCINT6: Pin Change Interrupt source 6

PA[7]

PCINT7: Pin Change Interrupt source 7

The alternate pin configuration is as follows:
  • PA[0] – ADC0/AIN0/T0/PCINT0/CLKI/TPICLK
    • ADC0: Analog to Digital Converter, Channel 0.
    • AIN0: Analog Comparator Positive Input. Configure the port pin as input with the internal pull-up switched off to avoid the digital port function from interfering with the function of the Analog Comparator.
    • T0: Timer/Counter0 counter source.
    • PCINT0: Pin Change Interrupt source 0. The PA[0] pin can serve as an external interrupt source for pin change interrupt 0.
    • CLKI: External Clock.
    • TPICLK: Serial Programming Clock.
  • PA[1] – ADC1/AIN1/OC0B/PCINT1/TPIDATA
    • ADC1: Analog to Digital Converter, Channel 1.
    • AIN1: Analog Comparator Negative Input. Configure the port pin as input with the internal pull-up switched off to avoid the digital port function from interfering with the function of the Analog Comparator.
    • OC0B: Output Compare Match B Output. The PA[1] pin can serve as an external output for the Timer/Counter0 Compare Match B. The PA[1] pin has to be configured as an output (DDB1 set (one)) to serve this function. The OC0B pin is also the output pin for the PWM mode timer function.
    • PCINT1: Pin Change Interrupt source 1. The PA[1] pin can serve as an external interrupt source for pin change interrupt 0.
    • TPIDATA: Serial Programming Data.
  • PA[2] – PCINT2/RESET
    • PCINT2: Pin Change Interrupt source 2. The PA[2] pin can serve as an external interrupt source for pin change interrupt 0.
    • RESET: Reset Pin.
  • PA[3] – OC0A/PCINT3
    • OC0A: Output Compare Match A Output. The PA[3] pin can serve as an external output for the Timer/Counter0 Compare Match A. The pin has to be configured as an output (DDB0 set (one)) to serve this function. This is also the output pin for the PWM mode timer function.
    • PCINT3: Pin Change Interrupt source 3. The PA[3] pin can serve as an external interrupt source for pin change interrupt 0.
  • PA[4] - ICP0/PCINT4
    • ICP0: Input Capture Pin. The PA[4] pin can act as an Input Capture pin for Timer/Counter0.
    • PCINT4: Pin Change Interrupt source 4. The PA4 pin can serve as an external interrupt source for pin change interrupt 0.
  • PA[5] - ADC2/OC0B/PCINT5
    • ADC2: Analog to Digital Converter, Channel 2.
    • OC0B: Output Compare Match B Output: The PA1 pin can serve as an external output for the Timer/Counter0 Compare Match B. The PA[5] pin has to be configured as an output (DDB1 set (one)) to serve this function. The OC0B pin is also the output pin for the PWM mode timer function.
    • PCINT5: Pin Change Interrupt source 5. The PA5 pin can serve as an external interrupt source for pin change interrupt 0.
  • PA[6] - ADC3/PCINT6
    • ADC3: Analog to Digital Converter, Channel 3.
    • PCINT6: Pin Change Interrupt source 6. The PA6 pin can serve as an external interrupt source for pin change interrupt 0.
  • PA[7] - PCINT7
    • PCINT7: Pin Change Interrupt source 7. The PA7 pin can serve as an external interrupt source for pin change interrupt 0.

The following tables relate the alternate functions of Port B to the overriding signals shown in the figure of Alternate Port Functions.

Table 14-4. Overriding Signals for Alternate Functions in PA[7:6]
Signal 
NamePA7/PCINT7PA6/ADC3/PCINT6
PUOE00
PUOV00
DDOE00
DDOV00
PVOE00
PVOV00
PTOE00
DIEOE(PCINT7 • PCIE0) (PCINT6 • PCIE0) + ADC3D
DIEOVPCINT7 • PCIE0PCINT6 • PCIE0
DIPCINT7 InputPCINT6 input
AIO-ADC3
Table 14-5. Overriding Signals for Alternate Functions in PA[5:4]
Signal 
NamePA5/ADC2/OC0B/PCINT5PA4/ICP0/PCINT4
PUOE00
PUOV00
DDOE00
DDOV00
PVOE(OC0B Enable • REMAP) 0
PVOV(OC0B • REMAP) 0
PTOE00
DIEOE(PCINT5 • PCIE0) + ADC2D(PCINT4 • PCIE0)
DIEOVPCINT5 • PCIE0(PCINT4 • PCIE0)
DIPCINT5 InputICP0/PCINT4 Input
AIOADC2-
Table 14-6. Overriding Signals for Alternate Functions in PA[3:2]
Signal 
NamePA3/OC0A/PCINT3PA4/ICP0/PCINT4
PUOE0RSTDISBL(1)
PUOV01
DDOE0RSTDISBL(1)
DDOV00
PVOE(OC0A Enable • REMAP) 0
PVOV(OC0A • REMAP) 0
PTOE00
DIEOE(PCINT3 • PCIE0) RSTDISBL(1) + (PCINT2 • PCIE0)
DIEOVPCINT3 • PCIE0RSTDISBL • PCINT2 • PCIE0
DIPCINT3 InputPCINT2 input
AIO--
Note:
  1. RSTDISBL is 1 when the configuration bit is “0” (Programmed).
Table 14-7. Overriding Signals for Alternate Functions in PA[1:0]
Signal 
NamePA1/ADC1/AIN1/OC0B/PCINT1PA0/ADC0/AIN0/CLKI/T0/PCINT0
PUOE0EXT_CLOCK(1)
PUOV00
DDOE0EXT_CLOCK(1)
DDOV00
PVOE(OC0B Enable • REMAP) EXT_CLOCK(1)
PVOV(OC0B • REMAP) 0
PTOE00
DIEOE(PCINT1 • PCIE0) + ADC1DEXT_CLOCK(1) + (PCINT0 • PCIE0) + ADC0D
DIEOVPCINT1 • PCIE0EXT_CLOCK(1)PWR_DOWN) + (EXT_CLOCK(1)• PCINT0 • PCIE0)
DIPCINT1 InputCLKI/T0/PCINT0 Input
AIOADC1/Analog Comparator Negative InputADC0/Analog Comparator Positive Input
Note:
  1. EXT_CLOCK is 1 when external clock is selected as main clock.