68
ATmega165A/PA/325A/PA/3250A/PA/645A/P/6450A/P [DATASHEET]
8285E–AVR–02/2013
14.3.1
Alternate functions of Port B
The Port B pins with alternate functions are shown in
Table 14-3.The alternate pin configuration is as follows:
OC2A/PCINT15, Bit 7
OC2, Output Compare Match A output: The PB7 pin can serve as an external output for the Timer/Counter2 Output
Compare A. The pin has to be configured as an output (DDB7 set (one)) to serve this function. The OC2A 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.
OC1B/PCINT14, Bit 6
OC1B, Output Compare Match B output: The PB6 pin can serve as an external output for the Timer/Counter1 Out-
put Compare B. The pin has to be configured as an output (DDB6 set (one)) to serve this function. The OC1B 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.
OC1A/PCINT13, Bit 5
OC1A, Output Compare Match A output: The PB5 pin can serve as an external output for the Timer/Counter1 Out-
put Compare A. The pin has to be configured as an output (DDB5 set (one)) to serve this function. The OC1A pin is
also the output pin for the PWM mode timer function.
PCINT13, Pin Change Interrupt Source 13: The PB5 pin can serve as an external interrupt source.
OC0A/PCINT12, Bit 4
OC0A, Output Compare Match A output: The PB4 pin can serve as an external output for the Timer/Counter0 Out-
put Compare A. The pin has to be configured as an output (DDB4 set (one)) to serve this function. The OC0A 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.
MISO/PCINT11 – Port B, Bit 3
MISO: Master Data input, Slave Data output pin for SPI. When the SPI is enabled as a Master, this pin is config-
ured as an input regardless of the setting of DDB3. When the SPI is enabled as a Slave, the data direction of this
pin is controlled by DDB3. When the pin is forced to be an input, the pull-up can still be controlled by the PORTB3
bit.
PCINT11, Pin Change Interrupt Source 11: The PB3 pin can serve as an external interrupt source.
Table 14-3.
Port B pins alternate functions.
Port pin
Alternate functions
PB7
OC2A/PCINT15 (Output Compare and PWM Output A for Timer/Counter2 or Pin Change Interrupt15).
PB6
OC1B/PCINT14 (Output Compare and PWM Output B for Timer/Counter1 or Pin Change Interrupt14).
PB5
OC1A/PCINT13 (Output Compare and PWM Output A for Timer/Counter1 or Pin Change Interrupt13).
PB4
OC0A/PCINT12 (Output Compare and PWM Output A for Timer/Counter0 or Pin Change Interrupt12).
PB3
MISO/PCINT11 (SPI Bus Master Input/Slave Output or Pin Change Interrupt11).
PB2
MOSI/PCINT10 (SPI Bus Master Output/Slave Input or Pin Change Interrupt10).
PB1
SCK/PCINT9 (SPI Bus Serial Clock or Pin Change Interrupt9).
PB0
SS/PCINT8 (SPI Slave Select input or Pin Change Interrupt8).