beautypg.com

Alternate functions of port b, D table 24 r, Atmega16(l) – Rainbow Electronics ATmega64L User Manual

Page 55

background image

55

ATmega16(L)

2466B–09/01

Alternate Functions of Port B

The Port B pins with alternate functions are shown in Table 25.

The alternate pin configuration is as follows:

• SCK - 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 SPI is enabled as a master, the data direction of this pin is controlled by
DDB7. When the pin is forced by the SPI to be an input, the pull-up can still be con-
trolled by the PORTB7 bit.

• MISO - 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 by the SPI to be an input, the pull-up can still be con-
trolled by the PORTB6 bit.

Table 24. Overriding Signals for Alternate Functions in PA3..PA0

Signal Name

PA3/ADC3

PA2/ADC2

PA1/ADC1

PA0/ADC0

PUOE

0

0

0

0

PUOV

0

0

0

0

DDOE

0

0

0

0

DDOV

0

0

0

0

PVOE

0

0

0

0

PVOV

0

0

0

0

DIEOE

0

0

0

0

DIEOV

0

0

0

0

DI

AIO

ADC3 INPUT

ADC2 INPUT

ADC1 INPUT

ADC0 INPUT

Table 25. Port B Pins Alternate Functions

Port Pin

Alternate Functions

PB7

SCK (SPI Bus Serial Clock)

PB6

MISO (SPI Bus Master Input/Slave Output)

PB5

MOSI (SPI Bus Master Output/Slave Input)

PB4

SS (SPI Slave Select Input)

PB3

AIN1 (Analog Comparator Negative Input)

OC0 (Timer/Counter0 Output Compare Match Output)

PB2

AIN0 (Analog Comparator Positive Input)

INT2 (External Interrupt 2 Input)

PB1

T1 (Timer/Counter 1 External Counter Input)

PB0

T0 (Timer/Counter 0 External Counter Input)

XCK (USART External Clock Input/Output)