
80
AT90S/LS4433
1042G–AVR–09/02
Port D Port D is an 8-bit bi-directional I/O port with internal pull-up resistors.
Three I/O memory address locations are allocated for Port D, one each for the Data
Register – PORTD, $12($32), Data Direction Register – DDRD, $11($31), and the Port
D Input Pins – PIND, $10($30). The Port D Input Pins address is read only, while the
Data Register and the Data Direction Register are read/write.
The Port D output buffers can sink 20 mA. As inputs, Port D pins that are externally
pulled low will source current if the pull-up resistors are activated.
Some Port D pins have alternate functions as shown in Table 26.
Port D Data Register – PORTD
Port D Data Direction Register
– DDRD
Port D Input Pins Address –
PIND
The Port D Input Pins address (PIND) is not a register; this address enables access to
the physical value on each Port D pin. When reading PORTD, the Port D Data Latch is
read, and when reading PIND, the logical values present on the pins are read.
Table 26. Port D Pin Alternate Functions
Port Pin Alternate Function
PD0 RXD (UART Input Line)
PD1 TXD (UART Output Line)
PD2 INT0 (External Interrupt 0 Input)
PD3 INT1 (External Interrupt 1 Input)
PD4 T0 (Timer/Counter 0 External Counter Input)
PD5 T1 (Timer/Counter 1 External Counter Input)
PD6 AIN0 (Analog Comparator Positive Input)
PD7 AIN1 (Analog Comparator Negative Input)
Bit 76543210
$12 ($32)
PORTD7 PORTD6 PORTD5 PORTD4 PORTD3 PORTD2 PORTD1 PORTD0 PORTD
Read/Write R/W R/W R/W R/W R/W R/W R/W R/W
InitialValue00000000
Bit 76543210
$11 ($31) DDD7 DDD6 DDD5 DDD4 DDD3 DDD2 DDD1 DDD0 DDRD
Read/Write R/W R/W R/W R/W R/W R/W R/W R/W
InitialValue00000000
Bit 76543210
$10 ($30) PIND7 PIND6 PIND5 PIND4 PIND3 PIND2 PIND1 PIND0 PIND
Read/Write R R R RRRRR
Initial Value N/A N/A N/A N/A N/A N/A N/A N/A
Kommentare zu diesen Handbüchern