
136
XMEGA A [MANUAL]
8077I–AVR–11/2012
13.3.4 Wired-AND
In the wired-AND configuration, the pin will be driven low when the corresponding bits in the OUT and DIR registers are
written to zero. When the OUT register is set to one, the pin is released allowing the pin to be pulled high with the internal
or an external pull-resistor. If internal pull-up is used, this is also active if the pin is set as input.
Figure 13-7. Output configuration - Wired-AND with optional pull-up.
13.4
Reading the Pin Value
Independent of the pin data direction, the pin value can be read from the IN register, as shown in
Figure 13-1 on page133. If the digital input is disabled, the pin value cannot be read. The IN register bit and the preceding flip-flop constitute
a synchronizer. The synchronizer introduces a delay on the internal signal line.
Figure 13-8 on page 136 shows a timing
diagram of the synchronization when reading an externally applied pin value. The maximum and minimum propagation
delays are denoted as tpd,max and tpd,min, respectively.
Figure 13-8. Synchronization when reading a pin value.
13.5
Input Sense Configuration
Input sensing is used to detect an edge or level on the I/O pin input. The different sense configurations that are available
for each pin are detection of a rising edge, falling edge, or any edge or detection of a low level. High level can be
detected by using the inverted input configuration. Input sensing can be used to trigger interrupt requests (IREQ) or
events when there is a change on the pin.
INn
OUTn
Pn
PERIPHERAL CLK
INSTRUCTIONS
SYNCHRONIZER FLIPFLOP
IN
r17
xxx
lds r17, PORTx+IN
tpd, max
tpd, min
0x00
0xFF