What if I shorted the 5v with ground?
You are kidding, right!?! This better not happen! In the sense that things won’t work to your liking. The PC might likely disable the USB port as it senses an over-current, cutting off power going to the Arduino. Or worse, your nose will start to smell something. Either on the Arduino, or PC motherbord. Or your PC will reset itself.
!!! If you want to try stuff out without knowing what you are doing, then at least do it with a cheap add-on PCI USB card. It would be a shame to lose a onboard USB port.
But better, learn how the insides of your USB ports work! Thats why I gave the “USB in a nutshel” link. Study it! At least the parts about how the voltages on the lines are used. The 5 volt of the usb port is actively managed by the PC. And this 5 volt and GND is also used by the USB device to signal the host what sort of USB device it is. The datalines D+ and D- are pulled to certain levels using these voltages. So if there isn’t current going through the 5 volt line, then the device can’t signal what it is, and communication isn’t possible.
Battery into Vin:
By connecting the 5 volt (USB) battery pack to the Vin pin you’ll get regulator losses on the arduino 5 volt line. According to the schematic I linked earlier, there is no direct path from Vin to the 5 volt line on the micro. Vin can enter the 5 volt regulator through the body-diode of the T2 P-channel Mostfet (enhanced). Only if Vin is above the regulator output by the amount of the GateSource threshold (it’s gate is connected to the +5v trace) will the mosfet conduct and short the diode drop. So the 5 volt out of the USB battery pack going into Vin will always be reduced by the diode drop, and has to go through a starved 5 volt regulator. I don’t know how this regulator behaves under this condition. But it won’t hurt. Infact, it might even avoid the next problem, current flow back into the pc USB port. But Vin is also tied to ground via the resistor R9, so there is a small drain on the battery by 0.5 milliamp.
Connecting the USB batterypack directly to the 5 volt pin of the Arduino micro is unlikely to work either when the PC is running. The 5 volt from the PC USB port can go through the body diode of T1 (P-channel mosfet) into the +5volt of the Arduino bord. Since an unconnected Vin is pulled down to ground via 10 k resistor, the mosfet T1 (p-channel) conducts and shorts it’s body diode. But mosfets can have current flow bi-directionally. So, if the +5 volt from the Arduino (supplied by the battery pack) happens to be higher than the voltage of the PC USB port, then current flows into the PC. And that is a no-no according to USB rules. The PC may shut down the port, thinking there is a fault of some sort, and your communication with the Arduino will break down. Since you cannot predict when this happens, this makes for a unreliable solution.
Only if Vin is high enough to make the T1 P-mosfet be open (higher than Arduino +5 volt pin minus the GateSource threshold of P-mosfet T2) will this be prevented. This could be done by connecting Vin to the Arduino 5 volt. But then the pc will not be able to power the Arduino either ( and I suspect, be able to charge the batterypack thruough this connection). And also, the battery will be continuously drained again through the R9 resistor. Not good if the PC is in storage or something, or if battery life is an issue.
So, I don’t see a neat efficient solution to this. Not with the Arduino micro schematic as it is. You could try connecting the battery into the Vin line, and see how long it works.