beautypg.com

Alternate functions of port e, Atmega161(l) – Rainbow Electronics ATmega161L User Manual

Page 107

background image

107

ATmega161(L)

1228C–AVR–08/02

Note:

1. n: 2,1,0, pin number.

Alternate Functions of Port E

The alternate pin configuration is as follows:

• OC1B

Port E, Bit 2

OC1B, Output compare match output: The PE2 pin can serve as an external output
when the Timer/Counter1 compare matches. The PE2 pin has to be configured as an
output (DDE2 set [one]) to serve this function. See “Timer/Counter1” on page 49 for fur-
ther details. The OC1B pin is also the output pin for the PWM mode timer function.

• ALE

Port E, Bit 1

ALE: When the External Memory is enabled, the PE1 pin serves as the Dress Latch
Enable. Note that enabling of External Memory will override both the direction and port
value. See “Interface to External Memory” on page 84 for a detailed description.

• ICP/INT2

Port E, Bit 0

ICP, Input Capture pin: The PE0 pin can serve as the Input Capture source for
Timer/Counter 1. See page 54 for a detailed description.

INT2, External Interrupt source 2: The PE0 pin can serve as an external interrupt source
to the MCU. See “Extended MCU Control Register – EMCUCR” on page 36 for further
details.

Table 36. DDEn Bits on Port E Pins

(1)

DDEn

PORTEn

I/O

Pull-up

Comment

0

0

Input

No

Tri-state (high-Z)

0

1

Input

Yes

PEn will source current if ext. pulled low.

1

0

Output

No

Push-pull Zero Output

1

1

Output

No

Push-pull One Output