![](http://datasheet.mmic.net.cn/30000/MC80C52XXX-20-883_datasheet_2371978/MC80C52XXX-20-883_78.png)
78
2513L–AVR–03/2013
ATmega162/V
Alternate Functions of
Port D
The Port D pins with alternate functions are shown in
Table 38.The alternate pin configuration is as follows:
RD – Port D, Bit 7
RD is the external data memory read control strobe.
WR – Port D, Bit 6
WR is the external data memory write control strobe.
TOSC2/OC1A – Port D, Bit 5
TOSC2, Timer Oscillator pin 2: When the AS2 bit in ASSR is set (one) to enable asynchronous
clocking of Timer/Counter2, pin PD5 is disconnected from the port, and becomes the inverting
output of the Oscillator amplifier. In this mode, a crystal Oscillator is connected to this pin, and
the pin can not be used as an I/O pin.
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. The OC1A pin is also the output pin for the PWM mode timer function.
Table 38. Port D Pins Alternate Functions
Port Pin
Alternate Function
PD7
RD (Read strobe to external memory)
PD6
WR (Write strobe to external memory)
PD5
TOSC2 (Timer Oscillator Pin 2)
OC1A (Timer/Counter1 Output Compare A Match Output)
PD4
TOSC1 (Timer Oscillator Pin 1)
XCK0 (USART0 External Clock Input/Output)
OC3A (Timer/Counter3 Output Compare A Match Output)
PD3
INT1 (External Interrupt 1 Input)
ICP3 (Timer/Counter3 Input Capture Pin)
PD2
INT0 (External Interrupt 0 Input)
XCK1 (USART1 External Clock Input/Output)
PD1
TXD0 (USART0 Output Pin)
PD0
RXD0 (USART0 Input Pin)