Hio,

teste doch mal
Code:
for (j=0; j < 8; j++) {
      if ((data & (unsigned char)(0x01U<<j)) == 0) {
         //mask the j-th bit and set or clear it
         AT91F_PIO_SetOutput(arm_porta, (unsigned char)(0x01U << j));
      } else {
         AT91F_PIO_ClearOutput(arm_porta, (unsigned char)(0x01U << j));
      }
Evtl. macht der Compiler bei der Optimierung was falsch?

LG
Martin