English
Language : 

ATMEGA88PA_14 Datasheet, PDF (71/326 Pages) ATMEL Corporation – ATMEL 8-BIT MICROCONTROLLER
14.3.1 Alternate Functions of Port B
The Port B pins with alternate functions are shown in Table 14-3.
Table 14-3. Port B Pins Alternate Functions
Port Pin
Alternate Functions
XTAL2 (chip clock oscillator pin 2)
PB7
TOSC2 (timer oscillator pin 2)
PCINT7 (pin change interrupt 7)
XTAL1 (chip clock oscillator pin 1 or external clock input)
PB6
TOSC1 (timer oscillator pin 1)
PCINT6 (pin change interrupt 6)
PB5
SCK (SPI bus master clock input)
PCINT5 (pin change interrupt 5)
PB4
MISO (SPI bus master input/slave output)
PCINT4 (pin change interrupt 4)
MOSI (SPI bus master output/slave input)
PB3
OC2A (Timer/Counter2 output compare match A output)
PCINT3 (pin change interrupt 3)
SS (SPI bus master slave select)
PB2
OC1B (Timer/Counter1 output compare match B output)
PCINT2 (pin Change Interrupt 2)
PB1
OC1A (Timer/Counter1 Output Compare Match A Output)
PCINT1 (Pin change interrupt 1)
ICP1 (Timer/Counter1 input capture input)
PB0
CLKO (divided system clock output)
PCINT0 (pin change interrupt 0)
The alternate pin configuration is as follows:
• XTAL2/TOSC2/PCINT7 – Port B, Bit 7
XTAL2: chip clock oscillator pin 2. Used as clock pin for crystal oscillator or low-frequency crystal oscillator. When used as a
clock pin, the pin can not be used as an I/O pin.
TOSC2: Timer oscillator pin 2. Used only if internal calibrated RC oscillator is selected as chip clock source, and the
asynchronous timer is enabled by the correct setting in ASSR. When the AS2 bit in ASSR is set (one) and the EXCLK bit is
cleared (zero) to enable asynchronous clocking of Timer/Counter2 using the crystal oscillator, pin PB7 is disconnected from
the port, and becomes the inverting output of the oscillator amplifier. In this mode, a crystal oscillator is connected to this pin,
and the pin cannot be used as an I/O pin.
PCINT7: Pin change interrupt source 7. The PB7 pin can serve as an external interrupt source.
If PB7 is used as a clock pin, DDB7, PORTB7 and PINB7 will all read 0.
• XTAL1/TOSC1/PCINT6 – Port B, Bit 6
XTAL1: chip clock oscillator pin 1. Used for all chip clock sources except internal calibrated RC oscillator. When used as a
clock pin, the pin can not be used as an I/O pin.
TOSC1: Timer oscillator pin 1. Used only if internal calibrated RC oscillator is selected as chip clock source, and the
asynchronous timer is enabled by the correct setting in ASSR. When the AS2 bit in ASSR is set (one) to enable
asynchronous clocking of Timer/Counter2, pin PB6 is disconnected from the port, and becomes the input of the inverting
oscillator amplifier. In this mode, a crystal oscillator is connected to this pin, and the pin can not be used as an I/O pin.
PCINT6: Pin Change Interrupt source 6. The PB6 pin can serve as an external interrupt source.
If PB6 is used as a clock pin, DDB6, PORTB6 and PINB6 will all read 0.
ATmega48PA/88PA/168PA [DATASHEET]
71
9223F–AVR–04/14