ATmega640/1280/1281/2560/2561
Table 38. Overriding Signals for Alternate Functions in PA3..PA0
Signal
Name
PA3/AD3
PA2/AD2
PA1/AD1
PA0/AD0
PUOE
PUOV
SRE
SRE
SRE
SRE
~(WR | ADA) •
PORTA3 • PUD
~(WR | ADA) •
PORTA2 • PUD
~(WR | ADA) •
PORTA1 • PUD
~(WR | ADA) •
PORTA0 • PUD
DDOE
DDOV
PVOE
PVOV
SRE
SRE
SRE
SRE
WR | ADA
SRE
WR | ADA
SRE
WR | ADA
SRE
WR | ADA
SRE
A3 • ADA | D3
OUTPUT • WR
A2• ADA | D2
OUTPUT • WR
A1 • ADA | D1
OUTPUT • WR
A0 • ADA | D0
OUTPUT • WR
DIEOE
DIEOV
DI
0
0
0
0
0
0
0
0
D3 INPUT
–
D2 INPUT
–
D1 INPUT
–
D0 INPUT
–
AIO
Alternate Functions of Port B The Port B pins with alternate functions are shown in Table 39.
Table 39. Port B Pins Alternate Functions
Port Pin Alternate Functions
OC0A/OC1C/PCINT7 (Output Compare and PWM Output A for Timer/Counter0,
Output Compare and PWM Output C for Timer/Counter1 or Pin Change Interrupt 7)
PB7
PB6
PB5
PB4
OC1B/PCINT6 (Output Compare and PWM Output B for Timer/Counter1 or Pin
Change Interrupt 6)
OC1A/PCINT5 (Output Compare and PWM Output A for Timer/Counter1 or Pin
Change Interrupt 5)
OC2A/PCINT4 (Output Compare and PWM Output A for Timer/Counter2 or Pin
Change Interrupt 4)
PB3
PB2
PB1
PB0
MISO/PCINT3 (SPI Bus Master Input/Slave Output or Pin Change Interrupt 3)
MOSI/PCINT2 (SPI Bus Master Output/Slave Input or Pin Change Interrupt 2)
SCK/PCINT1 (SPI Bus Serial Clock or Pin Change Interrupt 1)
SS/PCINT0 (SPI Slave Select input or Pin Change Interrupt 0)
The alternate pin configuration is as follows:
• OC0A/OC1C/PCINT7, Bit 7
OC0A, Output Compare Match A output: The PB7 pin can serve as an external output
for the Timer/Counter0 Output Compare. The pin has to be configured as an output
(DDB7 set “one”) to serve this function. The OC0A pin is also the output pin for the PWM
mode timer function.
OC1C, Output Compare Match C output: The PB7 pin can serve as an external output
for the Timer/Counter1 Output Compare C. The pin has to be configured as an output
(DDB7 set (one)) to serve this function. The OC1C pin is also the output pin for the
PWM mode timer function.
89
2549A–AVR–03/05