Alternate Functions Of Port D - Atmel AVR AT90S2313 Manual

8-bit avr microcontroller with 2k bytes of in-system programmable flash
Hide thumbs Also See for AVR AT90S2313:
Table of Contents

Advertisement

Port D Data Register – PORTD
Port D Data Direction Register
– DDRD
Port D Input Pins Address –
PIND
Port D as General Digital I/O

Alternate Functions of Port D

AT90S2313
58
Bit
7
6
$12 ($32)
PORTD6
Read/Write
R
R/W
Initial value
0
0
Bit
7
6
$11 ($31)
DDD6
Read/Write
R
R/W
Initial value
0
0
Bit
7
6
$10 ($30)
PIND6
Read/Write
R
R
Initial value
0
N/A
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.
PDn, general I/O pin: The DDDn bit in the DDRD register selects the direction of this pin.
If DDDn is set (one), PDn is configured as an output pin. If DDDn is cleared (zero), PDn
is configured as an input pin. If PORTDn is set (one) when configured as an input pin,
the MOS pull-up resistor is activated. To switch the pull-up resistor off, the PORTDn has
to be cleared (zero) or the pin has to be configured as an output pin. The Port D pins are
tri-stated when a reset condition becomes active, even if the clock is not active.
Table 20. DDDn Bits on Port D Pins
DDDn
PORTDn
0
0
0
1
1
0
Output
1
1
Output
Note:
n: 6...0, pin number.
The alternate functions of Port D are:
• ICP – Port D, Bit 6
Timer/Counter1 Input Capture pin. See the Timer/Counter1 description for further
details.
• T1 – Port D, Bit 5
T1, Timer 1 clock source. See the Timer description for further details.
• T0 – Port D, Bit 4
T0, Timer/Counter0 clock source. See the Timer description for further details.
• INT1 – Port D, Bit 3
INT1, External Interrupt Source 1. The PD3 pin can serve as an external interrupt
source to the MCU. See the interrupt description for further details and how to enable
the source.
5
4
3
PORTD5
PORTD4
PORTD3
R/W
R/W
R/W
0
0
0
5
4
3
DDD5
DDD4
DDD3
R/W
R/W
R/W
0
0
0
5
4
3
PIND5
PIND4
PIND3
R
R
R
N/A
N/A
N/A
I/O
Pull-up
Comment
Input
No
Tri-state (High-Z)
Input
Yes
PDn will source current if ext. pulled low
No
Push-pull Zero Output
No
Push-pull One Output
2
1
0
PORTD2
PORTD1
PORTD0
R/W
R/W
R/W
0
0
0
2
1
0
DDD2
DDD1
DDD0
R/W
R/W
R/W
0
0
0
2
1
0
PIND2
PIND1
PIND0
R
R
R
N/A
N/A
N/A
0839G–08/01
PORTD
DDRD
PIND

Advertisement

Table of Contents
loading

Table of Contents