beautypg.com

Attiny2313 – Rainbow Electronics ATtiny2313 User Manual

Page 56

background image

56

ATtiny2313

2543A–AVR–08/03

• AIN1/PCINT1 – Port B, Bit 1

AIN1: Analog Comparator Negative input and ADC6: ADC input channel 6

.

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 or analog to digital converter.

PCINT1: Pin Change Interrupt Source 1. The PB1 pin can serve as an external interrupt
source.

• AIN0/PCINT0 – Port B, Bit 0

AIN0: Analog Comparator Positive input and ADC5: ADC input channel 5

.

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 or analog to digital
converter.

PCINT0: Pin Change Interrupt Source 0. The PB0 pin can serve as an external interrupt
source.

Table 27 and Table 28 relate the alternate functions of Port B to the overriding signals
shown in Figure 25 on page 52. SPI MSTR INPUT and SPI SLAVE OUTPUT constitute
the MISO signal, while MOSI is divided into SPI MSTR OUTPUT and SPI SLAVE
INPUT.

Table 27. Overriding Signals for Alternate Functions in PB7..PB4

Signal
Name

PB7/USCK/
SCL/PCINT7

PB6/DO/PCINT6

PB5/SDA/
DI/PCINT5

PB4/OC1B/
PCINT4

PUOE

0

0

0

0

PUOV

0

0

0

0

DDOE

USI_TWO_WIRE

0

USI_TWO_WIRE

0

DDOV

(USI_SCL_HOLD
+ PORTB7)•DDB7

0

(SDA + PORTB5)•
DDRB5

0

PVOE

USI_TWO_WIRE
• DDRB7

USI_THREE_WIRE

USI_TWO_WIRE
• DDRB5

OC1B_PVOE

PVOV

0

DO

0

0OC1B_PVOV

PTOE

USI_PTOE

0

0

0

DIEOE

(PCINT7•PCIE)
+USISIE

(PCINT6•PCIE)

(PCINT5•PCIE) +
USISIE

(PCINT4•PCIE)

DIEOV

1

1

1

1

DI

PCINT7 INPUT
USCK INPUT SCL
INPUT

PCINT6 INPUT

PCINT5 INPUT

SDA INPUT

DI INPUT

PCINT4 INPUT

AIO