Hi
if I have a device which is powered by an internal voltage source and that has an AVR (1284p in that case)@5V + a CH340@5V for USB/UART conversion, how do I properly connect the 5V lines?
If I connect the AVR to the 5V of the USB port and the CH340, the AVR will get voltage through USB, which I don't want. The device has a mains switch and should stay turned off, even with a USB cable connected to it.
If I connect the AVR to the internal voltage source and the CH340 to the USB 5V+ and the device is powered off, the CH340 will receive power from USB while the AVR is turned off and probably drive the RX/TX UART lines high which could light up the AVR through the RX/TX lines.
If I connect the AVR and the CH340 to the internal voltage source, and if the device is powered off, the CH340 may see voltage coming in from the PC through the D+/D- lines of the USB port, although VCC being 0V.
I'd like to be able to leave the USB cable connected to the device all the time without powering anything parasitically through data lines.
Is there an easy, proper way to do this or would I just do the last option and ignore the D+/D- lines?
Thanks!