[SOLVED] Arduino powers all pins at start-up

Alright so I've got an Arduino Uno driving an LCD, couple of LED's and a solid state relay. When I initially plug in the Arduino (external power supply through barrel jack input) it seems to provide power to all pins while the board initializes. this results in a flash of the LED's and worse a quick jolt of power through the relay before the Arduino begins to process and handle everything as it should. Is there any way to initialize an Arduino say with all of the pins low rather than high?

Cheers, Andrew

What is your void setup() configuration?
Did you setup all pins low as this digitalWrite(pin,LOW); ?

If this doesn’t work this may be either the bootloader or arduino core configuration.

Although I haven't set all pins low as you suggest however I have that currently for the pin for one of the LED's and it still flashes on initially.

void setup() {
  pinMode(8, OUTPUT);
  digitalWrite(8, LOW);
  RFID.begin(9600);
  lcd.begin(16, 2);
  lcd.clear(); 
}

My understanding is that all pins are supposed to be set as inputs on reset or power up. Should not have to digitalWrite() pins low until after you have configured them as output with pinMode()

pegwatcher: My understanding is that all pins are supposed to be set as inputs on reset or power up. Should not have to digitalWrite() pins low until after you have configured them as output with pinMode()

That's correct.

Writing them in "setup()" will make no difference because setup() won't run until the bootloader has finished waiting (which can be a couple of seconds())

Best you can do is put pulldown resistors on all pins you absolutely must have low while reset is going on.

I just put a 1K pulldown resistor onto one of the LED pins and the problem persists. I then removed the

  pinMode(8, OUTPUT);
  digitalWrite(8, LOW);

from the setup routine in-case I was over-writing the initial input setting however now the LED starts on and stays on as is why I first wrote the statement…

Alright well I've found the culprit for the one LED, that was my oversight. This did the job:

SoftwareSerial RFID(7,8);

I setup pin 8 as my arbitrary TX pin because I figured that I didn't need to send any data over that serial connection however I later used the pin for the LED. I've since set the TX to pin 1 as normal and that has fixed that. Next up the flashing relay.

And in that case another oversight of mine. In an effort to preserve maximum PWM pins for later use I hooked up my relay to pin 13 and I guess the onboard LED flashes on startup so that was triggering my relay as well. Thanks for everyone's input!