I am currently powering a generic (non-Sparkfun) pro micro from a DC buck regulator, giving the RAW pin about 6.49V. The buck regulator is powered by a cheap benchtop PSU. In this situation VCC to GND reads about 5.038V
If I power the board just from USB, VCC to GND reads about 4.875V
When programming and debugging my sketch, I connect the MCU to my PC via USB. When I do this, I assume the board is powered by the RAW pin and not the USB connection, but I thought I would ask here.
In this situation is there power flowing from VCC on the MCU to the USB port on my computer?
Is GND on the MCU connected to GND from the USB connector?
What are best practices for programming via USB from a PC while testing being powered by external power? I'm trying to use an external ADC and do voltage sensing with it, so I'm concerned about the ground reference for the MCU and ADC.
Set that buck regulator to 5V and you can connect it straight to the 5V pin.
Probably, yes. The device will use the higher voltage of the two inputs.
No - see schematic on how the two are connected. There's a diode in the USB 5V line.
Of course. Without no programming etc.
Use a proper, isolated power supply. Not one where there's a direct connection between the outputs and one of the incoming mains wires (yes, they exist - cheap eBay ones are high risk for such issues). Actually ideal is a 5V power supply like an old mobile phone charger. No external regulators needed, connect it straight to the 5V pin.