element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • About Us
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Arduino
  • Products
  • More
Arduino
Arduino Forum Program an Arduino with another Arduino
  • Blog
  • Forum
  • Documents
  • Quiz
  • Events
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Arduino to participate - click to join for free!
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • State Suggested Answer
  • Replies 9 replies
  • Answers 7 answers
  • Subscribers 397 subscribers
  • Views 2004 views
  • Users 0 members are here
  • arduino
  • programmer
Related

Program an Arduino with another Arduino

rishi2628
rishi2628 over 8 years ago

image

 

Is there any way I can program an Arduino using another Arduino,without the need of any computer. I want to store the programming code in the EEPROM of the "Programmer Arduino" and using any interface like SPI, I2C or Serial, burn this code to the Second arduino. Is it possible and how can it be implemented ?

  • Sign in to reply
  • Cancel

Top Replies

  • mcb1
    mcb1 over 8 years ago in reply to clem57 +2 suggested
    clem57 That link is for programming the bootloader into a blank 328 chip. If I read the OP right, he wants to use an Arduino to replace the program contents. I'm sure there is a method of poking data onto…
  • rishi2628
    rishi2628 over 8 years ago +1 suggested
    Actually I was looking for a solution something like this :- https://www.youtube.com/watch?v=M-sFQNIXde8
  • hasan2015
    0 hasan2015 over 8 years ago

    Do simulation first by Protus8.

    Use SPI software.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • clem57
    0 clem57 over 8 years ago

    Here is a way How to program a AVR (arduino) with another arduino

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Reject Answer
    • Cancel
  • mcb1
    0 mcb1 over 8 years ago in reply to clem57

    clem57 That link is for programming the bootloader into a blank 328 chip.

     

     

    If I read the OP right, he wants to use an Arduino to replace the program contents.

    I'm sure there is a method of poking data onto the ram parts of an Arduino, but it's certainly beyond me.

     

    One thing I can offer is that the EEPROM doesn't have enough room to store that amount of data.

     

    rishi2628 is more than capable of using Google ....  just as I would .... image

     

     

    Mark

    • Cancel
    • Vote Up +2 Vote Down
    • Sign in to reply
    • Verify Answer
    • Reject Answer
    • Cancel
  • beacon_dave
    0 beacon_dave over 8 years ago in reply to mcb1

    Something more like uProg perhaps ?

    https://www.youtube.com/watch?v=tg67HWwBRlY

    µProg – tiny, fast, portable AVR programmer with SD – mdiy.pl

     

    Another interesting looking project is Phoenard which appears to be able to store and then recall multiple Arduino sketches without the laptop/IDE.

    https://www.youtube.com/watch?v=bAFTAbY9mdk

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Reject Answer
    • Cancel
  • balearicdynamics
    0 balearicdynamics over 8 years ago in reply to mcb1

    Clem you are right! By a certain point of view it is the way to program the bootloader and I have already done this in past in a lot of cases. I have used a UNO instead of a Mega but there are just the pins connection differences.

    This is also the way - not yet personally tested - to program directly a chip without the bootloader. I read something about in past but I was no longer able to find the link. Is a lack of my memory or this is a reasonable option?

     

    Enrico

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • Robert Peter Oakes
    0 Robert Peter Oakes over 8 years ago

    How to program using SPI like interface is all in the UserGuide for the chip

    http://www.atmel.com/images/Atmel-8271-8-bit-AVR-Microcontroller-ATmega48A-48PA-88A-88PA-168A-168PA-328-328P_datasheet_C…

    1. Write the sketch or modify existing one such that when powered on a d perhaps a button is pressed, it will try to start programming an attached ATMEGA328 (Using its pins 10, 11,12,13)

    now every time the programmer is powered on, it will wait for a button press and then execute the programed sequence to transfer the desired program to the target.

     

    You will have to program the target code as a binary file separately, convert it into a byte array in your code and on command, transfer this to the flash memory of the target ATMEGA.

     

    Obviously you will never be able to have a program as big as its flash as the source is stored in FLASH along with the code to program another. You could use an ATMEGA2560 to overcome this limitation

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Reject Answer
    • Cancel
  • rishi2628
    0 rishi2628 over 8 years ago

    Actually I was looking for a solution something like this :-

     

    https://www.youtube.com/watch?v=M-sFQNIXde8

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Verify Answer
    • Reject Answer
    • Cancel
  • Robert Peter Oakes
    0 Robert Peter Oakes over 8 years ago in reply to rishi2628

    Only supports one master and one slave at a time though, and also pretty much does what I described previously but using the serial port for programming

     

    zThe video that flows onto is slightly better though but is still limited to one slave and one master.

     

    Now if you can take the master to a site, im sure you could take a laptop instead.

     

    Typically you dont need the exact image on the master to be copied, only the target sketch (Which is basically described in the first video), this then inhibits anyone from copy a slave to another slave, only the master (The programmer) should be able to do this job,

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Reject Answer
    • Cancel
  • djfraz
    0 djfraz over 8 years ago

    Something I've been thinking of doing is taking the Arduino Serial Programmer and altering it to take input from a SD card instead of the serial pins. My intention for it was as a quick way to program a lot of Atmega328's at a time without using my computer.

     

    I did start working on it, I only managed to incorporate to sd card reading function into the sketch and had it output some text onto a LCD. Not sure if this is the sort of thing you were thinking of.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Reject Answer
    • Cancel
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube