I made the standard breadboard Arduino. An ATMega328 with a 16Mhz crystal and a LED on pin 13. I used the standard Uno optiboot bootloader from my Arduino IDE install. I'm currently using a no name Chinese CP2102 based USB to UART bridge.
The problem I have is that uploads from the IDE are unreliable. More often than not the upload will fail with "avrdude: stk500_recv(): programmer is not responding". But the thing is that it does actually work occasionally. I added a reset switch and of course if I hit that just before the upload it works every time. I do have a 0.18uF capacitor between the DTR pin on the CP2102 dongle and the chip reset pin.
Any ideas as to what the problem might be? I assume it's some sort of timing issue. I have the ability to recompile optiboot if needed but I'm not sure what to tweak. Attached is a picture of the setup. Any ideas welcome.
Paul__B:
You forgot the 10k pull-up on the reset pin.
Sorry, should have mentioned that. With a 10K between RST and the positive rail on the board I have the same problem. But worse, the reset button method won't work. But I'm reading Nick Gammon's article on all this and will report back if I get it working.
Following Nick's build worked. The addition of decoupling caps and the 10k resistor did the trick. So many breadboard recipes skip the caps and the pullup. I wonder how many frustrated people gave up.
Thanks again!
Edit: I had a 20Mhz crystal lying around and after building a 20Mhz bootloader that works well too.
Especially with higher frequency things these days, there are two kinds of people - those that have learned to put lots of bypass caps around on their boards and those that will learn it after spending many hours debugging flaky boards. They are often left out in quick diagrams, but if you look at any well designed board, you will find bypass caps sprinkled around. Not sure if they are still made, but some years back, you could buy DIP sockets that had the bypass caps built into the socket (assuming pwr/gnd were pins 1/14 or 1/16 for example)
Still available! I'm impressed. Yep, showing my age - first electronics was pre-transistors with vacuum tubes .. those things that got hot and had high voltages on them (that tended to discourage the casual observer from poking their fingers around inside equipment!)