I just succeeded in programming an ATtiny13 using the ArduinoISP sketch and core13 files! Yay!!
But I noticed that the Tiny started running its program rightaway after being programmed, while still being attached to the Arduino.
Isn't this dangerous? What would happen if one pin on the Arduino output LOW and one of the Tiny output HIGH at the same time, while being connected to each other? Wouldn't it cause a short, possibly destroying both chips?
So I went and looked at the code for ArduinoISP. I noticed that it pulls all four connected pins to INPUT right at the end of programming mode (line 270) and that's good. (Maybe RESET could have been left HIGH, so as not to leave the slave board reset pin floating?)
But it seems to me at the beginning of programming mode it's not as careful (line 257):
pinMode(RESET, OUTPUT);
digitalWrite(RESET, HIGH);
pinMode(SCK, OUTPUT);
digitalWrite(SCK, LOW);
delay(50);
digitalWrite(RESET, LOW);
If I'm reading this right, there is a time frame of 50 ms where the SCK pin is in OUTPUT LOW, but RESET is still HIGH (which I believe means not to reset). So if the Tiny program, for whatever reason, was outputting HIGH on its general purpose pin 2, which happens to be SCK too, wouldn't the boards make a short circuit?