New: the AI firewall watches the whole platform and explains each incident in plain words. See how it works

Reply To: USBasp on a Mac won’t see my ATmega328P boards: “could not find USB device”

Daniel’s question is the right first step. No driver is needed on macOS, avrdude talks to the USBasp through libusb, which Homebrew installs with it. If System Information > USB doesn’t list “USBasp” at all, it’s the adapter, not avrdude. I had exactly this with two cheap USB-C adapters at our plant: the USBasp is a low-speed USB device with the firmware bit-banging USB, and some USB-C adapters and hubs don’t enumerate those reliably. A powered USB-A hub between the adapter and the USBasp fixed it for me, so did a different (Apple) adapter.

Once it’s found, the next error you’ll probably meet on fresh chips is this:

avrdude: warning: cannot set sck period. please check for usbasp firmware update.
avrdude: error: program enable: target does not answer (0x01)

A new 328P runs at 1 MHz from the internal oscillator, and the default ISP clock is too fast for it. Slow it down:

avrdude -c usbasp -p m328p -B 32 -U lfuse:w:0xFF:m -U hfuse:w:0xDE:m -U efuse:w:0xFD:m
avrdude -c usbasp -p m328p -B 4  -U flash:w:rs485node.hex:i

(those fuses are for an external 16 MHz crystal, check yours before you write them). The “cannot set sck period” warning is the old USBasp firmware talking, harmless as long as -B works; on older ones the slow-clock jumper does the same.

Ground loops are my cardio.
Accepted solution♥ 1