[ 258.365595] usb 2-1.6: new low-speed USB device number 7 using ehci-pci
[ 258.483526] usb 2-1.6: New USB device found, idVendor=16c0, idProduct=05dc
[ 258.483529] usb 2-1.6: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[ 258.483532] usb 2-1.6: Product: USBasp
[ 258.483534] usb 2-1.6: Manufacturer: [url=http://www.fischl.de]www.fischl.de[/url]
This looks very similar to your output so looks promising. Interestingly, I had a look on fischl.de and found that the last firmware is dated 2011? Is that definitely the latest firmware? If so, then it seems quite possible that this programmer could have that firmware, but that does seem a long time without an update?
Yes, that looks good. And yes, I don't think USBASP had a major update in years, it is a mature project. Also the programming protocol it uses is very old, AVRs that use this started to be sold from the early 90s. The more modern chips use different protocols, that's why e.g. the XMegas and some ATTiny's don't work.
I have an adapter such as the one you linked coming with the new programmer I ordered. When it arrives I will test it out with this older programmer as well. If it works then I will get another one. In the meantime, I have a handful of Dupont leads somewhere which I could probably use to hook this one up to an Arduino. I know I will need to be careful to get them in the correct order! The adapter would, of course, make this a lot easier.
Well, normally it is fairly safe, in the worst case it just won't work. Only take care to not connect the Vcc line to a wrong place, that's about the only thing that could damage something.
I also understand that these programmers have no real protection and it is easy to blow them up so if this older one works it would give me a spare. I take your point about the limitations when it comes to ATMega2560 and XMega chips. If I move on to working with such microcontrollers (BTW, I didn't know they ARM versions), then I will look at suitable programmers at that time. Being able to program the Uno and Nano will suffice for now.
The USBASP website (
https://www.fischl.de/usbasp/) shows the schematic too, that's pretty typical with the clones too. Only some add an extra 3.3V regulator for the Vcc to permit their use with 3.3V targets. But there are no buffers or overcurrent/overvoltage protection, nor ESD protection, only a bare ATmega MCU. I didn't manage to fry one yet but it is certainly not "idiot-proof".
And just to be clear - I meant that there are Arduinos that use ARM MCUs from Atmel/Microchip, such as Arduino Due (uses AT91SAM3X8E instead of ATMega) or the Genuino Zero (ATSAMD21G18), not that ATMega2560 or XMega chips are ARMs (they aren't).
I found I had to set up a udev rule file before the Arduino could communicate with the programmer, but once that was done and the programmer to "USBasp" in the Arduino IDE, I'm now at the state where Upload Using Programmer in the IDE is no longer complaining about not finding a programmer but actually tries to do something. The next step is to connect a microcontroller and attempt to program it. However, before I do that, I still have some unanswered questions. I understand that uploading a sketch this way overwrites the bootloader. This is what I will ultimately want to do, but for now, how does one put a boot loader back? Is it as simple as Tools | Burn Bootloader? What about fuses? Where do I configure these? Am I correct in presuming that once Burn bootloader has been done then Sketch | Upload will work as usual? These are some points I need to research first when I'm feeling less tired!
Normally uploading using a programmer shouldn't overwrite the bootloader - if the bootloader was correctly programmed, it is protected by the fuse bits. Those would need to be cleared first in order to let you reprogram that part of the flash. When you do "Burn Bootloader" from the IDE, it will set the fuses correctly for you. The configuration is in the boards.txt file.
Alternatively, you can always flash the bootloader by hand, for example Sparkfun has this tutorial:
https://learn.sparkfun.com/tutorials/installing-an-arduino-bootloader/allJust make sure to modify any commands to match your programmer type and when messing with the fuses make sure to verify everything twice otherwise you could "brick" the target MCU - for example disable ISP programming, enable DebugWire (which disables the /RESET line and thus programming) or enable external clock source when you don't have external oscillator present. All of these would lock you out and will require a parallel, high voltage programmer to reset.