Electronic – Does the code on an ATTiny execute while it is being programmed by ISP

attinyispmicrocontroller

I'm using an ATTiny84 and I have both a switch and a pin header attached to the MOSI pin. I am reading the value of the switch in my program, and I'm using the pin header (along with headers to MISO, RESET, and SCK) to program the chip with my Arduino. I won't be pressing the switch while programming the chip.

When I start programming the chip, will the code already on my ATTiny restart execution, or will it wait until RESET is no longer held low? All I could find in the datasheet is that the pins "are tri-stated when a reset condition becomes active" which I don't understand.

Best Answer

The ATTiny, and every other IC I'm aware of, can only be programmed while it's held in the reset state. As such, any ICSP device must assert the RESET line for the entire duration of the programming process.

So no, your program will stop running before programming begins, since the programmer will hold reset low.