How to BJT NPN switch 12v using 5v with common ground?
I wasn't able to find any separate "programming specification" document on the AVR, outside of the datasheets themselves. Looking as far back as the AT90S2313 (which I have a tube or two of, still), the RESET specification appears to just be used as an enable technique and no appreciable current is drawn from the pin. (This is different from some old Microchip PIC parts I used to work with, which lacked an internal charge pump for programming the devices.)

Since it appears, for these programming purposes anyway, that you do NOT need to supply \$5\:\text{V}\$ to the RESET pin, but only \$0\:\text{V}\$ and \$12\:\text{V}\$, you could get by with something perhaps this simple:







simulate this circuit &ndash; Schematic created using CircuitLab

When the I/O pin is HI, RESET will be close to \$0\:\text{V}\$. When the I/O pin is LO, RESET will be close to \$12\:\text{V}\$.

There doesn't appear to be any need for significant current so this circuit probably will work okay.

However, I do have a warning to include. You may want this circuit to come up with RESET grounded (\$Q_1\$ actively pulling down) if the I/O pin isn't connected or when the controlling MCU is still coming out of reset itself and its I/O pin is in a high impedance state prior to being ready to program a device. If I added a resistor to ground near the base of \$Q_1\$, this would have the opposite effect (probably not desired.) So this may be a problem that requires some added changes.

So, perhaps a little safer would be:







simulate this circuit

In this case, without any I/O active the BJT will be turned on, pulling down on RESET. And, if the I/O pin is an active output then you have normal control here.