Localized Brownouts in micro-controller reasons
With an ATMega328, you can write the following:

void setup()
{
 DDRD = 0xff;
}

void loop() {
 PORTD = 0xff;
 delay(1000);
 PORTD = 0x00;
 delay(1000);
}


where PORTD refers to pins 0-7 as an 8-bit word from low to high. DDRD sets the pinmode for PORTD, where 0 is input and 1 is output.