How can we alter a single pin of ATxMEGA128?
The ATxmega has special function registers to make setting and clearing pins very easy:

#define PIN_NUM             4            // mask for the specific pin (in this case 
#define PIN_MASK        (1 &lt;&lt; PIN_NUM)   // pin 4) in the PORT


if(FSR_output1)                              //If output from FSR circuit
{
    PORTC.OUTSET = PIN_MASK;               //SET sensor enable high
}
else
{
    PORTC.OUTCLR = PIN_MASK;              //SET sensor enable low
}


These registers make it so you don't need to deal with read-modify-write cycles for the IO lines. The IO port state is automatically ORed with whatever is written to OUTSET, and a write to OUTCLR is inverted, and ANDed with the inverted value. As such, you can do single-instruction operations to control pin state. It's a very nice tool, and one of the nice things about the xmega parts.



Note that there are also the complementary PORTx.DIRSET and PORTx.DIRCLR resisters, as well as PORTx.OUTTGL/PORTx.DIRTGL, which toggles the pins that correspond to each binary 1 written to the register.