As I was programming a device's flash with a USB bus pirate, I was curious about how this was possible from an electrical perspective. The target device was powered from a separate power adapter than my computer.
In high school, I was always told that you shouldn't connect circuits together that have different power supplies. I was also told not to have two digital circuits trying to drive a bus line to different logic levels.
Even though I knew this, I didn't think twice when connecting:
- two computers together with a serial cable
- a computer with an Ethernet switch
- a computer to a laser printer with a parallel cable
- a laptop to a separate monitor with a USB-C cable
In the above cases, I suspected that there was some magic that solved this.
So, is there some simple and inexpensive magic for things like JTAG or device programming? How did the devices in the above list achieve this?