user11571: I tried to flash my ATmega328P-PU not over the Arduino but over a self-made programming board and an USBasp. The problem is, I made the board a while ago and didn't mark which direction the 10-pin connector has to go.
My question is, can I fry the ATmega if I connect the 10-pin connector the wrong way around? Also, can this harm the USBasp in any way?
Connecting it the wrong way around would give me the following connections:
USBasp  ---  ATmega

MOSI    -|
NC      -|-  GND
RST     -|
SCK     -|

MISO    ---  Vcc
Vcc     ---  MISO

         |-  MOSI
GND     -|-  NC
         |-  RST
         |-  SCK


user4143: No, connecting it backwards shouldn't do any damage, it just won't work.  The clue is in these two connections:
NC      -|-  GND
GND     -|-  NC

With it backwards the ground connection doesn't go anywhere.  Without that ground connection there's no circuit.  With no circuit, no current flows.
The only possible danger is to the protection diodes in the IO pins when you try and operate the programmer.  The lack of a ground connection could cause some current to flow the wrong way through the circuit (in through the ATMega's MISO pin and out through the MCU's Vcc pin) through the ESD protection diode.  That could cause damage to that diode and maybe the rest of the MISO pin's logic, but it's not that likely since the currents involved would be somewhat limited by the route the power then takes through the MISO pin of the programmer.

11571: <p>I tried to flash my ATmega328P-PU not over the Arduino but over a self-made programming board and an USBasp. The problem is, I made the board a while ago and didn't mark which direction the 10-pin connector has to go.</p>

<p>My question is, can I fry the ATmega if I connect the 10-pin connector the wrong way around? Also, can this harm the USBasp in any way?</p>

<p>Connecting it the wrong way around would give me the following connections:</p>

<pre><code>USBasp  ---  ATmega

MOSI    -|
NC      -|-  GND
RST     -|
SCK     -|

MISO    ---  Vcc
Vcc     ---  MISO

         |-  MOSI
GND     -|-  NC
         |-  RST
         |-  SCK
</code></pre>
 4143: <p>No, connecting it backwards shouldn't do any damage, it just won't work.  The clue is in these two connections:</p>

<pre><code>NC      -|-  GND
GND     -|-  NC
</code></pre>

<p>With it backwards the ground connection doesn't go anywhere.  Without that ground connection there's no circuit.  With no circuit, no current flows.</p>

<p>The only possible danger is to the protection diodes in the IO pins when you try and operate the programmer.  The lack of a ground connection could cause some current to flow the wrong way through the circuit (in through the ATMega's MISO pin and out through the MCU's Vcc pin) through the ESD protection diode.  That could cause damage to that diode and maybe the rest of the MISO pin's logic, but it's not that likely since the currents involved would be somewhat limited by the route the power then takes through the MISO pin of the programmer.</p>
