Skip to content

ATMEL Xmega - General I/O

Published On:
Sep 15, 2011
Last Updated:
Sep 15, 2011

Controlling A Port

The Xmega has hardware registries that speeds up controlling ports by skipping the read-execute-write cycle. The following example shows ways of controlling a port pin.

PORTB.DIRSET = (1 << 3);
PORTB.OUTSET = (1 << 3);
PORTB.OUTTGL = (1 << 3);