Datasheet

Port Pin Alternate Function
PCINT18 (Pin Change Interrupt 18)
PD1
TXD0 (USART0 Output Pin)
OC4A (Timer/Counter4 Output Compare Match A Output)
PCINT17 (Pin Change Interrupt 17)
PD0
RXD1 (USART1 Input Pin)
OC3A (Timer/Counter3 Output Compare Match A Output)
PCINT16 (Pin Change Interrupt 16)
The alternate pin configuration is as follows:
AIN1/OC2B/PCINT23 – Port D, Bit 7
AIN1: Analog Comparator1 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.
PCINT23: Pin Change Interrupt source 23. The PD7 pin can serve as an external interrupt
source.
AIN0/OC0A/PCINT22 – Port D, Bit 6
AIN0: Analog Comparator0 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.
OC0A: Output Compare Match output. The PD6 pin can serve as an external output for the
Timer/Counter0 Compare Match A. The PD6 pin has to be configured as an output (DDD6 set
(one)) to serve this function. The OC0A pin is also the output pin for the PWM mode timer
function.
PCINT22: Pin Change Interrupt source 22. The PD6 pin can serve as an external interrupt
source.
T1/OC0B/PCINT21 – Port D, Bit 5
T1: Timer/Counter1 counter source.
OC0B: Output Compare Match output. The PD5 pin can serve as an external output for the
Timer/Counter0 Compare Match B. The PD5 pin has to be configured as an output (DDD5 set
(one)) to serve this function. The OC0B pin is also the output pin for the PWM mode timer
function.
PCINT21: Pin Change Interrupt source 21. The PD5 pin can serve as an external interrupt
source.
XCK0/T0/PCINT20 – Port D, Bit 4
XCK0: USART0 external clock.
T0: Timer/Counter0 counter source.
ATmega328PB
I/O-Ports
© 2018 Microchip Technology Inc.
Datasheet Complete
DS40001906C-page 114