
64
8246B–AVR–09/11
ATtiny2313A/4313
Port B, Bit 0 – AIN0/PCINT0
AIN0: Analog Comparator 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.
PCINT0: Pin Change Interrupt Source 0. The PB0 pin can serve as an external interrupt
source for pin change interrupt 0.
Port B, Bit 1 – AIN1/PCINT1
AIN1: Analog Comparator 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.
PCINT1: Pin Change Interrupt Source 1. The PB1 pin can serve as an external interrupt
source for pin change interrupt 0.
Port B, Bit 2 – OC0A/PCINT2
OC0A: Output Compare Match A output. The PB2 pin can serve as an external output for the
Timer/Counter0 Output Compare A. The pin has to be configured as an output (DDB2 set
(one)) to serve this function. The OC0A pin is also the output pin for the PWM mode timer
function.
PCINT2: Pin Change Interrupt Source 2. The PB2 pin can serve as an external interrupt
source for pin change interrupt 0.
Port B, Bit 3 – OC1A/PCINT3
OC1A: Output Compare Match A output: The PB3 pin can serve as an external output for the
Timer/Counter1 Output Compare A. The pin has to be configured as an output (DDB3 set
(one)) to serve this function. The OC1A pin is also the output pin for the PWM mode timer
function.
PCINT3: Pin Change Interrupt Source 3: The PB3 pin can serve as an external interrupt
source for pin change interrupt 0.
Port B, Bit 4 – OC1B/PCINT4
OC1B: Output Compare Match B output: The PB4 pin can serve as an external output for the
Timer/Counter1 Output Compare B. The pin has to be configured as an output (DDB4 set
PB4
OC1B:
Timer/Counter1 Compare Match B Output
PCINT4: Pin Change Interrupt 0, Source 4
PB5
DI:
USI Data Input (Three Wire Mode)
SDA:
USI Data Input (Two Wire Mode)
PCINT5: Pin Change Interrupt 0, Source 5
PB6
DO:
USI Data Output (Three Wire Mode)
PCINT6: Pin Change Interrupt 0, Source 6
PB7
USCK:
USI Clock (Three Wire Mode)
SCL :
USI Clock (Two Wire Mode)
PCINT7: Pin Change Interrupt 0, Source 7
Table 10-5.
Port B Pins Alternate Functions
Port Pin
Alternate Function