Where is the information what is the minimum-required circuitry to program any AVR via ICSP?
Sometimes I see schematics that show just the chip and the six wires for the ICSP header (RESET, VCC, GND, MISO, MOSI, and SCK).
Other times, I see some passive components connected to some of the pins.
So why is it different some times? How do people know when to use extra components when wiring up the chip for programming? Do the datasheet for these MPU's provide the details?
1 Answer 1
I have a page about a minimal board. The minimal circuit is the chip itself, and a couple of decoupling capacitors. A pull-up on /RESET is advisable (however the processor has a weak pull-up on it).
The six wires you mention are required for ICSP programming. An example from my page is:
That is using an Arduino as an ICSP programmer.
I think most designers would mandate the decoupling capacitors. You may get away without the pull-up on /RESET but probably at the expense of reliability.
The wires changed colour between the two photos because my earlier board (shown second) had the capacitors further away from the chip pins than they should have been. They really should be next to the chip for maximum effectiveness.
Note that, depending on the fuses, you may need to supply an external clock. In my case I did it like this:
The default chip fuses (from the manufacturer) does not require a crystal.
-
1All good advice, but it might be worth mentioning that if the target AVR has its fuses set to expect an external clock, you need to provide one.microtherion– microtherion2016年12月18日 22:56:05 +00:00Commented Dec 18, 2016 at 22:56
-
@Nick Gammon Great post! Does the wiring of the circuitry generally hold up for all AVR's? Or are more complex AVR's (such as ATmega32U4) going to require different circuitry?Max Jacob– Max Jacob2016年12月18日 23:29:08 +00:00Commented Dec 18, 2016 at 23:29
-
1All 8 bit AVRs I know of work with this protocol, except for the 4/5/9/10 6-pin variety.microtherion– microtherion2016年12月18日 23:30:23 +00:00Commented Dec 18, 2016 at 23:30
-
1I added a bit more about the external clock. As for the other AVRs, I have programmed the ATmega32U4 and the ATtiny chips in a similar way (the actual wiring varies, of course). Ditto for the larger chips (Atmega1280, Atmega2560 etc.).2016年12月19日 04:07:20 +00:00Commented Dec 19, 2016 at 4:07
-
This post was very useful thanks. I did my own diagram for use with a Pololu AVR programmer. flickr.com/photos/qu1j0t3/49712305953/in/datepostedqu1j0t3– qu1j0t32020年03月29日 16:32:54 +00:00Commented Mar 29, 2020 at 16:32