void setup()
{
 // Serial.begin(9600);
 int i;
 for (i=0; i < 8; i++)
   pinMode(i,OUTPUT);
}

/*
without volatile approx 60 usec /256 but some glitches
volatile unsigned char j 150 usec for 256 loops
with arduino loop (without goto) ~ 300usec/256
*/

int i=0;
volatile unsigned int j=0;
void loop()
{
  x:
  PORTD=j;
  j++;
  //if (255 < j) j = 0;
//  goto x;
 }
