Problem with power supply (via USB)

Hi everyone,
I have wired problem with board MEGA 2560. For instance when I upload some example program or even my own program to the processor it starts work for few, maybe dozen seconds a then program stops, the L diode flash constantly and RX diode is blinking about 10 seconds and after that program starts again for a while.. And this sequence is being repeated for infinity.. I don't know what's going on. For example when the device works like I mentioned above and I change COM (for example from COM1 to COM2) in device manager it works ok. But when I remove the USB cable and put it again the problem comes back.. What do you think about that?

Other may scoff at me, but I am a believer in staying off of the first four com ports. Pointing devices (i.e. touchpad, mouse) can still use legacy ports (1,2) and in the old legacy format com ports 3,4 are just extensions of 1,2.

Anyhow, try moving your Mega2560 to Com5 in the Device Manger, Ports, Properties->Port Settings->Advanced...