Port e, Port e data register - porte, Port e data direction register - ddre – Rainbow Electronics ATmega103L User Manual
Page 87: Port e input pins address - pine

ATmega603/103
87
Port E
Port E is an 8-bit bi-directional I/O port with internal pull-up resistors.
Three I/O memory address locations are allocated for the Port E, one each for the Data Register - PORTE, $03($23), Data
Direction Register - DDRE, $02($22) and the Port E Input Pins - PINE, $01($21). The Port E Input Pins address is read
only, while the Data Register and the Data Direction Register are read/write.
The Port E output buffers can sink 20 mA. As inputs, Port E pins that are externally pulled low will source current if the pull-
up resistors are activated.
All Port E pins have alternate functions as shown in the following table:
When the pins are used for the alternate function the DDRE and PORTE register has to be set according to the alternate
function description.
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, and 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.
Table 34. Port E Pins Alternate Functions
Port Pin
Alternate Function
PE0
PDI/RXD (Programming Data Input or UART Receive Pin)
PE1
PDO/TXD (Programming Data Output or UART Transmit Pin)
PE2
AC+ (Analog Comparator Positive Input)
PE3
AC- (Analog Comparator Negative Input)
PE4
INT4 (External Interrupt4 Input)
PE5
INT5 (External Interrupt5 Input)
PE6
INT6 (External Interrupt6 Input)
PE7
INT7 (External Interrupt7 Input)
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
Hi-Z
Hi-Z
Hi-Z
Hi-Z
Hi-Z
Hi-Z
Hi-Z
Hi-Z