it may be just a faulty cable, some low quality cables have faulty connectors that do not make contact correctly in all the pins. If you gently move the cable next to the connectors in either side (pc and phone), do you loose connectivity or windows plays the "plugged/unplugged" sound? If it does, the cable is not connecting well, so it may be defective.
Have you tried using another cable? borrow one that you know works in other machine, and try it. If it does, obviously the problem is the cable, if it does not, the problem may be either your machines connector (the usb port), or the motherboard.
Does other devices with other cables work fine in that USB port? That's another way to find the culprit.