Programming an UNO with another UNO

Hi all.

I'm sure this will have been covered a thousand times, and I have looked for it, but for the life of me I can't find it anywhere so apologies if I'm the thousandth person to ask the same thing.

I'm aware that to use a virgin chip I have to burn the bootloader first and I can do that no problem using Arduino as ISP ... in fact I do it so often that I've made a ZIF shield specifically for the purpose because I got fed up of bending legs every time I remove the processor from a standard socket.

Normally I then put that chip into a board that has USB functionality and I upload the actual sketch using AVRDUDE. I now have a new project that doesn't require any external communication so it seems a bit wasteful putting USB functionality onto the board just to upload the sketch and then never use it again.

What would be ideal is if I could upload the sketch immediately after burning the bootloader through the same ICSP connection.

Is that possible and if so could some kind soul point me in the right direction?

Any assistance would be highly appreciated.

Thanks in advance !

The Arduino IDE has the option under Sketch > Upload Using Programmer to upload a sketch via ICSP, if you set the preferences to verbose output you can see which avrdude commands it uses.

Note that this will remove the bootloader in the process, although the memory allocation for the bootloader will still be there - if you want to use all the memory for the sketch either modify the boards.txt file or use MCUdude's MiniCore with the bootloader option set to "no bootloader".

Hi David,

Thank you so much for your reply, I'll give it a go!

Out of interest, does that mean I don't actually need to burn the bootloader first or do I still need it even if it is subsequently removed? The program is tiny (the board only has 1 dig in and 3 dig outs) so I'm not worried about space requirements.

Thank you again,

Gareth

You do need to burn the bootloader at least once, in order to set the fuses. In the case of MiniCore with the "No Bootloader" option, only the fuses are set, and no bootloader is loaded. If you are experienced with using avrdude, then you should be able to do the same.

It works perfectly, thank you for your help !

Gareth

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.