94
ATmega103(L)
0945G–09/01
Port E Data Register – PORTE
Port E Data Direction Register
– DDRE
Port E Input Pins Address –
PINE
The Port E Input Pins address (PINE) is not a register; this address enables access to
the physical value on each Port E pin. When reading PORTE, the Port E Data Latch is
read and when reading PINE, the logical values present on the pins are read.
Port E as General Digital I/O
PEn, general I/O pin: The DDEn bit in the DDRE register selects the direction of this pin.
If DDEn is set (one), PEn is configured as an output pin. If DDEn is cleared (zero), PEn
is configured as an input pin. If PEn is set (one) when configured as an input pin, the
MOS pull-up resistor is activated. To switch the pull-up resistor off, the PEn has to be
cleared (zero) or the pin has to be configured as an output pin.The port pins are tri-
stated when a reset condition becomes active, even if the clock is not running.
Note:
n: 7,6...0, pin number
Alternate Functions of Port E
The alternate pin functions of Port E are:
• PDI/RXD – Port E, Bit 0
PDI, Serial Programming Data Input. During Serial Program downloading, this pin is
used as data input line for the ATmega103(L).
RXD, UART Receive Pin. Receive Data (Data input pin for the UART). When the UART
receiver is enabled, this pin is configured as an input regardless of the value of DDRD0.
When the UART forces this pin to be an input, a logical “1” in PORTD0 will turn on the
internal pull-up.
• PDO/TXD – Port E, Bit 1
PDO, Serial Programming Data Output. During Serial Program downloading, this pin is
used as data output line for the ATmega103(L).
TXD, UART Transmit Pin.
Bit
7
6
5
4
3
2
1
0
$03 ($23)
PORTE7
PORTE6
PORTE5
PORTE4
PORTE3
PORTE2
PORTE1
PORTE0
PORTE
Read/Write
R/W
R/W
R/W
R/W
R/W
R/W
R/W
R/W
Initial Value
0
0
0
0
0
0
0
0
Bit
7
6
5
4
3
2
1
0
$02 ($22)
DDE7
DDE6
DDE5
DDE4
DDE3
DDE2
DDE1
DDE0
DDRE
Read/Write
R/W
R/W
R/W
R/W
R/W
R/W
R/W
R/W
Initial Value
0
0
0
0
0
0
0
0
Bit
7
6
5
4
3
2
1
0
$01 ($21)
PINE7
PINE6
PINE5
PINE4
PINE3
PINE2
PINE1
PINE0
PINE
Read/Write
R
R
R
R
R
R
R
R
Initial Value
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
Table 34.
DDEn Bits on Port E Pins
DDEn
PORTEn
I/O
Pull-up
Comment
0
0
Input
No
Tri-state (high-Z)
0
1
Input
Yes
PDn will source current if ext. pulled low.
1
0
Output
No
Push-pull Zero Output
1
1
Output
No
Push-pull One Output