Problem uploading with USBasp

So I'm trying to upload a simple code that blinks a led on and off every second, to an ATMega328PU, using usbAsp. I managed to get the USBasp driver working, but now I'm running into something else. Here's the error I get when trying to use the "Upload using programmer" button in the Arduino IDE:

Arduino: 1.8.9 (Windows Store 1.8.21.0) (Windows 10), Board: "Arduino/Genuino Uno"

Build options changed, rebuilding all
Sketch uses 930 bytes (2%) of program storage space. Maximum is 32256 bytes.
Global variables use 9 bytes (0%) of dynamic memory, leaving 2039 bytes for local variables. Maximum is 2048 bytes.
avrdude: warning: cannot set sck period. please check for usbasp firmware update.
avrdude: error: program enable: target doesn't answer. 1 
avrdude: initialization failed, rc=-1
         Double check connections and try again, or use -F to override
         this check.

the selected serial port 
 does not exist or your board is not connected

You see, I'm getting a "device not found" error when the usbasp is disconnected, so something else must be to blame. Any help would be much appreciated.

Do this:

  • Download Zadig: http://zadig.akeo.ie/. Note that Zadig is recommended on the official USBasp page: USBasp - USB programmer for Atmel AVR controllers - fischl.de.
  • Plug in your USBasp
  • Start Zadig
  • From the dropdown menu, select USBasp. If it doesn't show up on the menu, then select Options > List all devices and check again.
  • Click the up or down arrows next to the Driver selection box on the right side until you see libusbK.
  • Click the "Replace Driver" button.
  • After it finishes you can close Zadig.