Datasheet
ATmega164A/PA/324A/PA/644A/PA/1284/P
2018 Microchip Technology Inc. Data Sheet Complete DS40002070A-page 89
The alternate pin configuration is as follows:
• SCK/OC3B/PCINT15 – Port B, Bit 7
SCK: Master Clock output, Slave Clock input pin for SPI channel. When the SPI is enabled as a slave, this pin is
configured as an input regardless of the setting of DDB7. When the SPI0 is enabled as a master, the data
direction of this pin is controlled by DDB7. When the pin is forced to be an input, the pull-up can still be
controlled by the PORTB7 bit.
OC3B, Output Compare Match B output: The PB7 pin can serve as an external output for the Timer/Counter3
Output Compare. The pin has to be configured as an output (DDB7 set “one”) to serve this function. The OC3B
pin is also the output pin for the PWM mode timer function.
PCINT15, Pin Change Interrupt source 15: The PB7 pin can serve as an external interrupt source.
• MISO/OC3A/PCINT14 – Port B, Bit 6
MISO: Master Data input, Slave Data output pin for SPI channel. When the SPI is enabled as a master, this pin
is configured as an input regardless of the setting of DDB6. When the SPI is enabled as a slave, the data
direction of this pin is controlled by DDB6. When the pin is forced to be an input, the pull-up can still be
controlled by the PORTB6 bit.
OC3A, Output Compare Match A output: The PB6 pin can serve as an external output for the Timer/Counter0
Output Compare. The pin has to be configured as an output (DDB6 set “one”) to serve this function. The OC3A
pin is also the output pin for the PWM mode timer function.
PCINT14, Pin Change Interrupt source 14: The PB6 pin can serve as an external interrupt source.
• MOSI/ICP3/PCINT13 – Port B, Bit 5
MOSI: SPI Master Data output, Slave Data input for SPI channel. When the SPI is enabled as a slave, this pin is
configured as an input regardless of the setting of DDB5. When the SPI is enabled as a master, the data
direction of this pin is controlled by DDB5. When the pin is forced to be an input, the pull-up can still be
controlled by the PORTB5 bit.
ICP3, Input Capture Pin 3: The PB5 pin can act as an input capture pin for Timer/Counter3.
PCINT13, Pin Change Interrupt source 13: The PB5 pin can serve as an external interrupt source.
•SS
/OC0B/PCINT12 – Port B, Bit 4
SS
: Slave Port Select input. When the SPI is enabled as a slave, this pin is configured as an input regardless of
the setting of DDB4. As a slave, the SPI is activated when this pin is driven low. When the SPI is enabled as a
master, the data direction of this pin is controlled by DDB4. When the pin is forced to be an input, the pull-up can
still be controlled by the PORTB4 bit.
OC0B, Output Compare Match B output: The PB4 pin can serve as an external output for the Timer/Counter0
Output Compare. The pin has to be configured as an output (DDB4 set “one”) to serve this function. The OC0B
pin is also the output pin for the PWM mode timer function.
PCINT12, Pin Change Interrupt source 12: The PB4 pin can serve as an external interrupt source.
• AIN1/OC0A/PCINT11, Bit 3
AIN1, Analog Comparator Negative input. This pin is directly connected to the negative input of the Analog
Comparator.
OC0A, Output Compare Match A output: The PB3 pin can serve as an external output for the Timer/Counter0
Output Compare. The pin has to be configured as an output (DDB3 set “one”) to serve this function. The OC0A
pin is also the output pin for the PWM mode timer function.
PCINT11, Pin Change Interrupt source 11: The PB3 pin can serve as an external interrupt source.