
60
ATmega16(L)
2466B–09/01
Alternate Functions of Port D The Port D pins with alternate functions are shown in Table 31.
The alternate pin configuration is as follows:
• 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. 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.
• OC1A - Port D, Bit 5
OC1A, Output Compare matchA output: The PD5 pin can serve as an external output
for the Timer/Counter1 output compareA. 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.
• OC1B - Port D, Bit 4
OC1B, Output Compare matchB output: The PD4 pin can serve as an external output
for the Timer/Counter1 output compareB. The pin has to be configured as an output
(DDD4 set (one)) to serve 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.
• INT0 - Port D, Bit 2
INT0, External Interrupt source 0: The PD2 pin can serve as an external interrupt
source.
• TXD - Port D, Bit 1
TXD, Transmit Data (Data output pin for the USART). When the USART transmitter is
enabled, this pin is configured as an output regardless of the value of DDD1.
• RXD - Port D, Bit 0
RXD, Receive Data (Data input pin for the USART). When the USART receiver is
enabled this pin is configured as an input regardless of the value of DDD0. When the
Table 31. Port D Pins Alternate Functions
Port Pin Alternate Function
PD7 OC2 (Timer/Counter2 Output Compare Match Output)
PD6 ICP (Timer/Counter1 Input Capture Pin)
PD5 OC1A (Timer/Counter1 Output CompareA Match Output)
PD4 OC1B (Timer/Counter1 Output CompareB Match Output)
PD3 INT1 (External Interrupt 1 Input)
PD2 INT0 (External Interrupt 0 Input)
PD1 TXD (USART Output Pin)
PD0 RXD (USART Input Pin)
Komentarze do niniejszej Instrukcji