at90ls8535-8mi ATMEL Corporation, at90ls8535-8mi Datasheet - Page 87

no-image

at90ls8535-8mi

Manufacturer Part Number
at90ls8535-8mi
Description
8-bit Microcontroller With 8k Bytes In-system Programmable Flash
Manufacturer
ATMEL Corporation
Datasheet
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
1041H–11/01
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 PDn is set (one) when configured as an input pin, the
MOS pull-up resistor is activated. To switch the pull-up resistor off, the PDn 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.
Table 34. DDDn Bits on Port D Pins
Note:
• OC2 – Port D, Bit 7
OC2, Timer/Counter2 output compare match output: The PD7 pin can serve as an
external output for the Timer/Counter2 output compare. The pin has to be configured as
an output (DDD7 set [one]) to serve this function. See the timer description on how to
enable this function. The OC2 pin is also the output pin for the PWM mode timer
function.
• ICP – Port D, Bit 6
ICP – Input Capture Pin: The PD6 pin can act as an input capture pin for
Timer/Counter1. The pin has to be configured as an input (DDD6 cleared [zero]) to
serve this function. See the timer description on how to enable this function.
Bit
$12 ($32)
Read/Write
Initial Value
Bit
$11 ($31)
Read/Write
Initial Value
Bit
$10 ($30)
Read/Write
Initial Value
DDDn
0
0
1
1
n: 7,6…0, pin number.
PORTDn
PORTD7
PIND7
DDD7
R/W
R/W
N/A
R
7
0
7
0
7
0
1
0
1
PORTD6
PIND6
DDD6
R/W
R/W
N/A
R
6
0
6
0
6
Output
Output
Input
Input
I/O
PORTD5
PIND5
DDD5
R/W
R/W
N/A
R
5
0
5
0
5
Pull-up
Yes
No
No
No
PORTD4
PIND4
DDD4
R/W
R/W
N/A
R
4
0
4
0
4
Comment
Tri-state (high-Z)
PDn will source current if ext. pulled low
Push-pull Zero Output
Push-pull One Output
PORTD3
PIND3
DDD3
R/W
R/W
N/A
R
3
0
3
0
3
PORTD2
PIND2
DDD2
R/W
R/W
N/A
R
2
0
2
0
2
AT90S/LS8535
PORTD1
PIND1
DDD1
R/W
R/W
N/A
R
1
0
1
0
1
PORTD0
PIND0
DDD0
R/W
R/W
N/A
R
0
0
0
0
0
PORTD
DDRD
PIND
87

Related parts for at90ls8535-8mi