Alternate functions of port b, Table 29 r, Atmega128(l) – Rainbow Electronics ATmega128L User Manual
Page 69

69
ATmega128(L)
2467B–09/01
Alternate Functions of Port B
The Port B pins with alternate functions are shown in
Note:
1. OC1C not applicable in ATmega103 compatibility mode.
The alternate pin configuration is as follows:
• OC2/OC1C, Bit 7
OC2, Output Compare match output: The PB7 pin can serve as an external output for
the Timer/Counter2 output compare. The pin has to be configured as an output (DDB7
set “one”) to serve this function. The OC2 pin is also the output pin for the PWM mode
timer function.
OC1C, Output Compare matchC output: The PB7 pin can serve as an external output
for the Timer/Counter1 output compareC. 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.
Table 29. Overriding Signals for Alternate Functions in PA3..PA0
Signal
Name
PA3/AD3
PA2/AD2
PA1/AD1
PA0/AD0
PUOE
SRE
SRE
SRE
SRE
PUOV
~(WR | ADA) •
PORTA3 • PUD
~(WR | ADA) •
PORTA2 • PUD
~(WR | ADA) •
PORTA1 • PUD
~(WR | ADA) •
PORTA0 • PUD
DDOE
SRE
SRE
SRE
SRE
DDOV
WR | ADA
WR | ADA
WR | ADA
WR | ADA
PVOE
SRE
SRE
SRE
SRE
PVOV
A3 • ADA | D3
OUTPUT • WR
A2• ADA | D2
OUTPUT • WR
A1 • ADA | D1
OUTPUT • WR
A0 • ADA | D0
OUTPUT • WR
DIEOE
0
0
0
0
DIEOV
0
0
0
0
DI
D3 INPUT
D2 INPUT
D1 INPUT
D0 INPUT
AIO
–
–
–
–
Table 30. Port B Pins Alternate Functions
Port Pin
Alternate Functions
PB7
OC2/OC1C
(Output Compare and PWM Output for Timer/Counter2 or Output
Compare and PWM Output C for Timer/Counter1)
PB6
OC1B (Output Compare and PWM Output B for Timer/Counter1)
PB5
OC1A (Output Compare and PWM Output A for Timer/Counter1)
PB4
OC0 (Output Compare and PWM Output for Timer/Counter0)
PB3
MISO (SPI Bus Master Input/Slave Output)
PB2
MOSI (SPI Bus Master Output/Slave Input)
PB1
SCK (SPI Bus Serial Clock)
PB0
SS (SPI Slave Select input)