USBasp Mac'te ATmega328P kartlarımı görmüyor: "could not find USB device"
Yapay zekâ tarafından English dilinden çevrildi ·
RS-485 sensör kartlarımızı çıplak bir ATmega328P etrafında üretiyoruz; bu kartlar bir geçit (gateway) arkasındaki bir veri yolunda duruyor ve verileri Hermetry’ye bildiriyor. Programlama her zaman atölyedeki bir Linux bilgisayarda USBasp ile yapıldı. Saha onarımlarında Linux dizüstü bilgisayarı taşımamak için MacBook’umu (M2, macOS 14) kurmaya çalışıyorum.avrdude’u Homebrew ile kurdum. Her denemede:
$ 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
USBasp, bir USB-C – USB-A adaptörüne takılı. Aynı programlayıcı Linux’ta çalışıyor. macOS’te bir sürücüye ihtiyaç var mı? Çevrimiçi bulduğum her şey 2012’den kalma.
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.
Yapay zekâ tarafından English dilinden çevrildi ·
Linux makinemde kutudan çıktığı gibi çalışıyor, Mac’i hiç denemedim.
Works out of the box on my Linux machine, never tried a Mac.
Yapay zekâ tarafından English dilinden çevrildi ·
Arduino IDE ile gelen avrdude’u denediniz mi? Bazen Homebrew sürümü tuhaf davranabiliyor.
Have you tried the avrdude that comes with the Arduino IDE? Sometimes the Homebrew build is odd.
Yapay zekâ tarafından English dilinden çevrildi ·
Arduino IDE’nin avrdude aracında da aynı hata.
Same error with the Arduino IDE’s avrdude.
Yapay zekâ tarafından English dilinden çevrildi ·
Sistem Bilgisi’nde USB altında bile görünüyor mu?
Does it even show up in System Information under USB?
Yapay zekâ tarafından English dilinden çevrildi ·
Daniel’in sorusu doğru ilk adım. macOS’ta sürücü gerekmiyor; avrdude, USBasp ile libusb üzerinden konuşur, libusb de Homebrew ile birlikte kurulur. Sistem Bilgisi > USB bölümünde “USBasp” hiç görünmüyorsa sorun avrdude’da değil, adaptörde. Tesisimizde tam olarak bunu iki ucuz USB-C adaptörde yaşadım: USBasp, firmware’i USB’yi yazılımla simüle ettiği (bit-banging) düşük hızlı bir USB cihazı ve bazı USB-C adaptörler ile hub’lar bunları güvenilir şekilde algılamıyor. Adaptör ile USBasp arasına harici güçlü bir USB-A hub takınca sorun çözüldü; farklı bir (Apple) adaptör de işe yaradı.Cihaz bulunduktan sonra, yeni çiplerde muhtemelen karşılaşacağınız bir sonraki hata şu:
avrdude: warning: cannot set sck period. please check for usbasp firmware update.
avrdude: error: program enable: target does not answer (0x01)
Yeni bir 328P, dahili osilatörden 1 MHz ile çalışır ve varsayılan ISP saat hızı ona fazla hızlıdır. Saat hızını düşürün:
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
(Bu fuse değerleri harici 16 MHz kristal içindir; yazmadan önce sizinkini kontrol edin). “cannot set sck period” uyarısı eski USBasp firmware’inin mesajıdır, -B çalıştığı sürece zararsızdır; daha eski sürümlerde aynı işi yavaş saat jumper’ı yapar.
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.
Yapay zekâ tarafından English dilinden çevrildi ·
Eğer bir tane kullanıyorsanız 10’dan 6 pinli ISP adaptörünü de kontrol edin. Bir tanesinde MISO ve MOSI çapraz bağlıydı ve bu yalnızca bir kart türünde şans eseri çalışıyordu.
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.
Yapay zekâ tarafından English dilinden çevrildi ·
Sorun adaptördeymiş. Sistem Bilgisi, markasız USB-C dongle’ım üzerinden hiçbir şey göstermedi; güç beslemeli bir hub üzerinden bağlayınca “USBasp” görünüyor ve avrdude onu buluyor. Dün sahada dört kartı programladım; tsmith’in dediği gibi, yeni aldığım yedek karta tam olarak -B 32 gerekti. Diğerlerinde fuse ayarları zaten yapılmıştı. Linux dizüstü bilgisayarım artık atölyede kalıyor.
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.
- Bu konuyu yanıtlamak için giriş yapmış olmalısınız.
Sohbete katılın
Soru sormak ve yanıtlamak, yararlı gönderileri beğenmek ve sorununuzu çözen yanıtı işaretlemek için oturum açın. Her katkı puan ve seviye kazandırır.

