Datasheet
81
7674F–AVR–09/09
ATmega164P/324P/644P
12.3.2 Alternate Functions of Port B
The Port B pins with alternate functions are shown in Table 12-6.
The alternate pin configuration is as follows:
• SCK/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.
PCINT15, Pin Change Interrupt source 15: The PB7 pin can serve as an external interrupt
source.
• MISO/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.
PCINT14, Pin Change Interrupt source 14: The PB6 pin can serve as an external interrupt
source.
Table 12-6. Port B Pins Alternate Functions
Port Pin Alternate Functions
PB7
SCK (SPI Bus Master clock input)
PCINT15 (Pin Change Interrupt 15)
PB6
MISO (SPI Bus Master Input/Slave Output)
PCINT14 (Pin Change Interrupt 14)
PB5
MOSI (SPI Bus Master Output/Slave Input)
PCINT13 (Pin Change Interrupt 13)
PB4
SS
(SPI Slave Select input)
OC0B (Timer/Conter 0 Output Compare Match B Output)
PCINT12 (Pin Change Interrupt 12)
PB3
AIN1 (Analog Comparator Negative Input)
OC0A (Timer/Conter 0 Output Compare Match A Output)
PCINT11 (Pin Change Interrupt 11)
PB2
AIN0 (Analog Comparator Positive Input)
INT2 (External Interrupt 2 Input)
PCINT10 (Pin Change Interrupt 10)
PB1
T1 (Timer/Counter 1 External Counter Input)
CLKO (Divided System Clock Output)
PCINT9 (Pin Change Interrupt 9)
PB0
T0 (Timer/Counter 0 External Counter Input)
XCK0 (USART0 External Clock Input/Output)
PCINT8 (Pin Change Interrupt 8)