
141
XMEGA A [MANUAL]
8077I–AVR–11/2012
This register can be used instead of a read-modify-write to set individual pins as input. Writing a one to a bit will clear the
corresponding bit in the DIR register. Reading this register will return the value of the DIR register.
13.13.4 DIRTGL – Data Direction Toggle register
Bit 7:0 – DIRTGL[7:0]: Port Data Direction Toggle
This register can be used instead of a read-modify-write to toggle the direction of individual pins. Writing a one to a bit will
toggle the corresponding bit in the DIR register. Reading this register will return the value of the DIR register.
13.13.5 OUT – Data Output Value register
Bit 7:0 – OUT[7:0]: Port Data Output value
This register sets the data output value for the individual pins of the port. If OUTn is written to one, pin n is driven high. If
OUTn is written to zero, pin n is driven low. For this setting to have any effect, the pin direction must be set as output.
13.13.6 OUTSET – Data Output Value Set register
Bit 7:0 – OUTSET[7:0]: Data Output Value Set
This register can be used instead of a read-modify-write to set the output value of individual pins to one. Writing a one to
a bit will set the corresponding bit in the OUT register. Reading this register will return the value in the OUT register.
13.13.7 OUTCLR – Data Output Value Clear register
Bit 7:0 – OUTCLR[7:0]: Data Output Value Clear
This register can be used instead of a read-modify-write to set the output value of individual pins to zero. Writing a one to
a bit will clear the corresponding bit in the OUT register. Reading this register will return the value in the OUT register.
Bit
765
432
10
+0x03
DIRTGL[7:0]
Read/Write
R/W
Initial Value
000
00
Bit
7
6
5
432
10
+0x04
OUT[7:0]
Read/Write
R/W
Initial Value
0
Bit
76543210
+0x05
OUTSET[7:0]
Read/Write
R/W
Initial Value
00000000
Bit
765
4321
0
+0x06
OUTCLR[7:0]
Read/Write
R/W
Initial Value
000
0000
0