atmega323l ATMEL Corporation, atmega323l Datasheet - Page 152

no-image

atmega323l

Manufacturer Part Number
atmega323l
Description
Atmega323 8-bit Avr Microcontroller With 32k Bytes Of In-system Programmable Flash
Manufacturer
ATMEL Corporation
Datasheet
Port D As General Digital I/O
Alternate Functions of Port D
152
ATmega323(L)
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), the pin has to be configured as an output pin, or the PUD bit has to be
set. The Port D pins are tri-stated when a reset condition becomes active, even if the
clock is not running.
Table 54. DDDn Effects 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 Captur e 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.
• OC1A – Port D, Bit 5
OC1A, Output Compare Match A output: The PD5 pin can serve as an external output
for the Timer/Counter1 Output Compare A. The pin has to be configured as an output
(DDD5 set (one)) to serve this function. See the timer description on how to enable this
function. The OC1A pin is also the output pin for the PWM mode timer function.
• OC1B – Port D, Bit 4
OC1B, Output Compare Match B output: The PD4 pin can serve as an external output
for the Timer/Counter1 Output Compare B. The pin has to be configured as an output
(DDD4 set (one)) to serve this function. See the timer description on how to enable this
function. The OC1B pin is also the output pin for the PWM mode timer function.
• 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.
DDDn
0
0
0
1
1
n: 7,6…0, pin number.
PORTDn
0
1
1
0
1
(in SFIOR)
PUD
X
0
1
X
X
Output
Output
Input
Input
Input
I/O
Pull Up
Yes
No
No
No
No
Comment
Tri-state (Hi-Z)
Tri-state (Hi-Z)
PDn will Source Current if Ext. Pulled
Low.
Push-pull Zero Output
Push-pull One Output
1457G–AVR–09/03

Related parts for atmega323l