Wrong input if USB powered.

Post your code & schematic, give us something to work from.