Go Down

Topic: Upload sketch using another Arduino (Read 1 time) previous topic - next topic

baligena

Is it possible to upload a sketch to another arduino using just an arduino?

marco_c

Yes it is. There is software in the IDE sketch list (or libraries list) call ArduinoISP. If you google this you will find lots of instructions on what to do, includng some YouTube videos.
Arduino libraries http://arduinocode.codeplex.com
Parola hardware & library http://parola.codeplex.com

CrossRoads

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

baligena

I'm actually trying to find a way to upload a sketch from arduino to another arduino chip.  Like have one arduino upload the blink sketch to another arduino chip (so it can blink too) without using the computer

spcomputing


I'm actually trying to find a way to upload a sketch from arduino to another arduino chip.  Like have one arduino upload the blink sketch to another arduino chip (so it can blink too) without using the computer


As CrossRoads pointed, the SD Card hex uploader would be the trick.

baligena

But is there a way to do it without an SD card?

retrolefty


But is there a way to do it without an SD card?


Well certainly there is a way if wants to bad enough. A sketch could be written that knows how to 'talk' the ICSP protocol to the standalone chip (like the arduino as ISP sketch) and have the sketch have the desired hex file data written to the flash memory at compile time for export to external device during run time.

I believe someone here wrote a bootloader writer sketch that includes the different bootloader hex file data in the sketch and transfers the proper data when it determines what kind of chip it's attached to. For burning boot-loaders, that was a real cleaver and useful application.

It's a somewhat limited and awkward method to program a chip, but perhaps it fills a real need in some situations?

Lefty

CrossRoads

See westfw's optiloader sketch
https://github.com/WestfW/
installs bootloader without needing  a PC

video of it in action in reply #7
http://arduino.cc/forum/index.php/topic,68183.0.html

Could be the starting point for uploading sketches vs bootloaders.
Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

marco_c

I am curious to know why you want to do this? Looking at creating a self replicating virus?
Arduino libraries http://arduinocode.codeplex.com
Parola hardware & library http://parola.codeplex.com

CrossRoads

Virus in an embedded microcontroller? Really?
Hardly self replicating when you have to go around and plug in ICSP cable to load it.
Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

marco_c

Yep. :)

It is a bit of a strange request.
Arduino libraries http://arduinocode.codeplex.com
Parola hardware & library http://parola.codeplex.com

CrossRoads

Not really - say you had a bunch of fielded systems that needed revising.
Grab your standalone battery powered programmer and re-load away.
I think having the file on SD card would be more practical, no need to re-burn to your upload tool all the time, just put a new file on the SD card and go.

Maybe put the collection of parts Nick Gammon has working on a little board.
http://www.gammon.com.au/forum/?id=11638

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Go Up