A way to detect if the arduino is booting?

Hello all,

I'm looking for a way to tell if an arduino is booting externally. The reason is that I have a bank, (12), shift registers attached to it, and when it gets reset or powered up the pins are in an unknown configuration which means the shift registers are too. I would like to turn off the whole bank of shift registers until the arduino has booted. My thought was that there may pin that is definitely high or low until it is booted and I would use that to trigger a one-shot to flip on the shift registers, or something like that ;).

I've been looking for anything that would work. I've been reading through the datasheet from Atmel, and there is this section that makes me think I can do something that would work:

During reset, all I/O Registers are set to their initial values, and the program starts execution from the Reset Vector. For ATmega168A/168PA/328/328P the instruction placed at the Reset Vector must be a JMP – Absolute Jump – instruction to the reset handling routine. For the ATmega 48A/48PA and ATmega88A/88PA, the instruction placed at the Reset Vector must be an RJMP – Relative Jump – instruction to the reset handling routine. If the program never enables an interrupt source, the Interrupt Vectors are not used, and regular program code can be placed at these locations. This is also the case if the Reset Vector is in the Application section while the Inter rupt Vectors are in the Boot section or vice versa (ATmega88A/88PA/168A/168PA/328/328P only). The circuit diagram in Figure 10-1 on page 48 shows the reset logic. Table 28-12 on page 323 defines the electrical parameters of the reset circuitry. The I/O ports of the AVR are immediately reset to their initial state when a reset source goes active. This does not require any clock source to be running. After all reset sources have gone inactive, a delay counter is invoked, stretching the internal reset. This allows the power to reach a stable level before normal operation starts. The time-out period of the delay counter is defined by the user through the SUT and CKSEL Fuses. The different selections for the delay period are presented in ”Clock Sources” on page 27.

The thing is, I can't make sense of how to use this to detect a reset externally. If anyone could shed some light on the matter I will do my happy dance.


I also had a couple of shift registers and they're random when the arduino is resetting. I didn't bother to find a way to fix (shift registers driving LEDs).

So what about a digital multiplexer? Say the multiplexer has two inputs, arduino pin x, and a capacitor with resistor in series. The lowest input pin of the multiplexer is hooked to the capacitor, next one is arduino pin x. With some calculation you can find a good estimate how big the caps and resistor should be to give you enough time to boot. Then the capacitor charges up making the multiplexer switch to the arduino pin x. Will this work? Got find a way to discharge capacitor when power is off, parallel resistor?

You can do this easily. When the Arduino is in reset all of its pins are “floating” which means you can pull them to a high or low level with a pullup/down resistor. Say your shift register reset is active-low, meaning it needs 0V to reset the shift register. Wire a 10k resistor from an Arduino pin to GND. Connect this pin to the shift register reset input.

When the Arduino is in reset, the 10k resistor will keep the signal low, thus resetting the shift register.

In your program, just set the pin high. That will take the shift register out of reset.

Check out our new shield: http://www.ruggedcircuits.com/html/gadget_shield.html

or you could just reset the registers after the arduino is booted (unless this is some sort of needs to be done in 7ns after power thing)

yea that is true, ie the 74x164, I am currently using 4 in a TTL experiment along with a 555 timer, and a hex counter (don't ask) so when you flip this all on it goes "nutty" and the SR's are in totally random states, so I just hold their resets down for a little while everything settles down and your good to go

which kinda rounds out my gray statement earlier

or you could just reset the registers after the arduino is booted (unless this is some sort of needs to be done in 7ns after power thing)

but its 1 extra wire heh

RuggedCircuits, that was exactly what I was looking for! I didn’t know that it was floating otherwise I would have thought of the pullup/pulldown resistor. It’s funny how much looking I did and couldn’t find that answer. In any case you totally rock. Thanks!