USBasp on a Mac won’t see my ATmega328P boards: “could not find USB device”
We build small RS-485 sensor boards around a bare ATmega328P; they sit on a bus behind a gateway that reports them to Hermetry. Programming has always been done on a Linux box in the workshop with a USBasp. I’m trying to set up my MacBook (M2, macOS 14) for field fixes so I don’t have to carry the Linux laptop.
Installed avrdude via Homebrew. Every attempt:
$ avrdude -c usbasp -p m328p -U flash:w:rs485node.hex:i
avrdude: error: could not find USB device with vid=0x16c0 pid=0x5dc vendor='www.fischl.de' product='USBasp'
avrdude: error: unable to open programmer usbasp on port usb
The USBasp is plugged into a USB-C to USB-A adapter. Same programmer works on Linux. Do I need a driver on macOS? Everything I find online is from 2012.
Works out of the box on my Linux machine, never tried a Mac.
Have you tried the avrdude that comes with the Arduino IDE? Sometimes the Homebrew build is odd.
Same error with the Arduino IDE’s avrdude.
Does it even show up in System Information under USB?
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.
And check the 10-to-6 pin ISP adapter if you use one. I’ve had one with MISO and MOSI crossed that worked only by luck on one board type.
Adapter it was. System Information showed nothing through my no-name USB-C dongle; through a powered hub it shows “USBasp” and avrdude finds it. Flashed four boards in the field yesterday, the brand-new spare board needed -B 32 exactly like tsmith said. Fuses were already set on the others. Linux laptop stays in the workshop now.
- You must be logged in to reply to this topic.
Join the conversation
Sign in to ask and answer, like helpful posts and mark the reply that solved your problem. Every contribution earns points and levels.

