14.4.8.1 Alternate Functions of Port A
The Port A pins with alternate functions are shown in the table below:
Port Pin | Alternate 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 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 PCINT3: Pin Change Interrupt source 3 |
PA[4] |
ICP0: Timer/Counter0 Input Capture Input (alternative PCINT4: Pin Change Interrupt source 4 |
PA[5] |
ADC2: ADC Input Channel 2 OC0B: Timer/Counter0 Compare Match B Output (alternative 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 |
- 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.
Signal Name | PA7/PCINT7 | PA6/ADC3/PCINT6 |
---|---|---|
PUOE | 0 | 0 |
PUOV | 0 | 0 |
DDOE | 0 | 0 |
DDOV | 0 | 0 |
PVOE | 0 | 0 |
PVOV | 0 | 0 |
PTOE | 0 | 0 |
DIEOE | (PCINT7 • PCIE0) | (PCINT6 • PCIE0) + ADC3D |
DIEOV | PCINT7 • PCIE0 | PCINT6 • PCIE0 |
DI | PCINT7 Input | PCINT6 input |
AIO | - | ADC3 |
Signal Name | PA5/ADC2/OC0B/PCINT5 | PA4/ICP0/PCINT4 |
---|---|---|
PUOE | 0 | 0 |
PUOV | 0 | 0 |
DDOE | 0 | 0 |
DDOV | 0 | 0 |
PVOE | (OC0B Enable • REMAP) | 0 |
PVOV | (OC0B • REMAP) | 0 |
PTOE | 0 | 0 |
DIEOE | (PCINT5 • PCIE0) + ADC2D | (PCINT4 • PCIE0) |
DIEOV | PCINT5 • PCIE0 | (PCINT4 • PCIE0) |
DI | PCINT5 Input | ICP0/PCINT4 Input |
AIO | ADC2 | - |
Signal Name | PA3/OC0A/PCINT3 | PA4/ICP0/PCINT4 |
---|---|---|
PUOE | 0 | RSTDISBL(1) |
PUOV | 0 | 1 |
DDOE | 0 | RSTDISBL(1) |
DDOV | 0 | 0 |
PVOE | (OC0A Enable • REMAP) | 0 |
PVOV | (OC0A • REMAP) | 0 |
PTOE | 0 | 0 |
DIEOE | (PCINT3 • PCIE0) | RSTDISBL(1) + (PCINT2 • PCIE0) |
DIEOV | PCINT3 • PCIE0 | RSTDISBL • PCINT2 • PCIE0 |
DI | PCINT3 Input | PCINT2 input |
AIO | - | - |
- RSTDISBL is 1 when the configuration bit is “0” (Programmed).
Signal Name | PA1/ADC1/AIN1/OC0B/PCINT1 | PA0/ADC0/AIN0/CLKI/T0/PCINT0 |
---|---|---|
PUOE | 0 | EXT_CLOCK(1) |
PUOV | 0 | 0 |
DDOE | 0 | EXT_CLOCK(1) |
DDOV | 0 | 0 |
PVOE | (OC0B Enable • REMAP) | EXT_CLOCK(1) |
PVOV | (OC0B • REMAP) | 0 |
PTOE | 0 | 0 |
DIEOE | (PCINT1 • PCIE0) + ADC1D | EXT_CLOCK(1) + (PCINT0 • PCIE0) + ADC0D |
DIEOV | PCINT1 • PCIE0 | EXT_CLOCK(1)• PWR_DOWN) + (EXT_CLOCK(1)• PCINT0 • PCIE0) |
DI | PCINT1 Input | CLKI/T0/PCINT0 Input |
AIO | ADC1/Analog Comparator Negative Input | ADC0/Analog Comparator Positive Input |
- EXT_CLOCK is 1 when external clock is selected as main clock.