Check your Device Manager.
If there are objects appearing and disappearing when you connect the USB cable then the problem is software related. Uninstall and reinstall with the latest Full Software Solution on http://support.hp.com should do the trick.
If Device Manager does not make any updates as you plug and unplug the USB cable then the problem is hardware related. Check the USB ports, cable and replace them as necessary. Make sure you are directly connecting the USB cable to the computer and not any kind of USB hub or docking station either.