Electronic – arduino – Programming ATMega328 from arduino with separated power supply

arduinoopto-isolatorspi

I actually need to update the code on a project who use an ATMega328. I'm using an arduino as a SPI programmer.

So, I need TX/RX and RESET pins to program the external ATMega328.

My problem is, the actual ATMega328 run on an other power supply than the programmer. Is it a problem ? Should I use optocouplers to connect the two circuit for the programming ?

I can replace the power supply by the +5V/GND of the arduino, but I'm just wondering as this could be really easier for me.

Best Answer

As long as both the device and the programmer share grounds and use the same signaling levels, the device can be programmed directly.

If they share grounds but do not use the same signaling levels then you will need to use a level converter.

If they do not share grounds then you will need to use optocouplers.