I downloaded ArduinoISP to my Uno so I could program an attiny44 from the Arduino IDE (version 1.8.9). After trying just about every sensible Programmer, I switched to using avrdude (Version 6.3-20171130) from the command line.
I found that I had to use -c stk500v1 and -b19200 (or -c avrisp and -b19200) to get ArduinoISP to successfully communicate with the attiny44.
There were no Programmers in the Arduino IDE that used those particular settings for avrdude. So, what Programmer should be selected in the IDE when using ArduinoISP as a programmer? Is there a baud rate setting missing in the programmers.txt file for ArudinoISP?
agprimatic:
So, what Programmer should be selected in the IDE when using ArduinoISP as a programmer?
Tools > Programmer > Arduino as ISP
It's quite confusing that the sketch name is ArduinoISP and there is a Tools > Programmer > ArduinoISP as well as a Tools > Programmer > ArduinoISP.org, neither of which has anything to do with the ArduinoISP sketch. Luckily, there are a ton of tutorials available all over the Internet on this topic.
agprimatic:
There were no Programmers in the Arduino IDE that used those particular settings for avrdude.
Arduino recently changed the Arduino as ISP programmer to use the arduino protocol instead of stk500v1. The reason for that change is to allow native USB boards like the Leonardo and Micro to be used as Arduino as ISP programmers. The side effect of that change was that it made it more likely that non-native USB boards like your Uno would require a 10 uF capacitor to be connected between the reset and ground pins in order to work as an Arduino as ISP. This may be the explanation why you had difficulty using your Arduino as ISP via the Arduino IDE.
That protocol change has since been reverted and a new "Arduino as ISP (ATmega32U4)" programmer added to avoid this inconvenience but there has not been a new release of Arduino AVR Boards since that time.
Thank you. The 10uF capacitor between reset and ground worked.
But, I'm still curious as to why -c avrisp worked without the 10uF capacitor and -c arduino did not. Maybe it's worth providing a way to set the programmer baud rate from the IDE without modifying programmers.txt?
It would be nice if we didn't have to add any components to the Uno just to get it to act like a programmer.
agprimatic:
Thank you. The 10uF capacitor between reset and ground worked.
You're welcome. I'm glad to hear it's working now.
agprimatic:
I'm still curious as to why -c avrisp worked without the 10uF capacitor and -c arduino did not.
The DTR pin of the USB to TTL serial adapter chip on your Uno is connected to the reset pin of the ATmega328P via a 0.1 uF capacitor. When the DTR pin is asserted, this circuit causes the ATmega328P to reset. That reset is needed to activate the bootloader on the ATmega328P so that you can upload a sketch. The old Arduino boards didn't have this auto reset circuit and so you needed to manually press the reset button at just the right time during every upload. The arduino protocol is designed for this auto reset behavior.
When using an Uno as an Arduino as ISP, if the auto reset circuit causes the Uno to reset this will make it not work properly because the bootloader will be running instead of the ArduinoISP program. The solution is to disable the auto reset circuit with the 10 uF capacitor.
agprimatic:
Maybe it's worth providing a way to set the programmer baud rate from the IDE without modifying programmers.txt?
This has absolutely nothing to do with baud rate. The baud rate is 19200. If you added a programmer baud rate menu to the Arduino IDE it would just cause a ton of problems.
agprimatic:
It would be nice if we didn't have to add any components to the Uno just to get it to act like a programmer.
As I already said, the change that required you to use the 10 uF capacitor has already been reverted for the next release of Arduino AVR Boards:
Some people have actually reported needing the capacitor even with the stk500v1 protocol. Some don't need it even with the arduino protocol. So it's a bit of a complicated situation. It never hurts to use the capacitor (though you have to remember to remove it before trying to upload a sketch to the programmer board again), but on the other hand many Arduino users are not going to happen to have a 10 uF capacitor on hand so it is nice to be able to do without. I think the Arduino as ISP documentation could be improved to explain the capacitor better.