I'm working on PCB design that will typically be battery powered. However, the device needs to be programmed and thus will be plugged into a computer occasionally.
I'm running into the problem of switching between a battery supply and a PC power supply, and specifically making sure I won't be applying power from both sources at the same time.
Is the general method to use relay logic to switch between power supplies? I assume I could design something that disconnects the battery supply when the device is connected to the PC. However, I assume this is a common problem and am curious if there are other methods for addressing this.