Hi.
I am designing a shield that has a second MCU on it. How can I upload a sketch to the second MCU using an Arduino+Arduino IDE without removing its MCU? (Basically using the Arduino as Programmer.)
Example: I have a Arduino Uno SMD that I want to use to program the second MCU.
I have already manged to burn a bootloader to the second MCU by using Nick Gammon's sketch that you run on the Arduino and then
burn the bootloader to the second MCU. Gammon Forum : Electronics : Microprocessors : Atmega bootloader programmer (Amazing stuff by the way!!!)
I don't mind if the sketch get flushed to both MCU's (I tried wiring up the RX/TX from the Arduino to the Second MCU and uploading but that
also didn't work )
Nick also has a nice tutorial on how to use an Arduino to upload a HEX file to another MCU but you need a SDCard to store the HEX.
Is there a reason that two ATMega328 MCU can't be programmed in parallel?
any clues or ideas?
Protoneer:
Is there a reason that two ATMega328 MCU can't be programmed in parallel?
Yes, because the programing process is a two-way conversation and when both MCUs try to answer at the same time there is confusion.
If you want to use the bootloader you can connect a jumper from Reset to GND on the unit you DON'T want to program. Of course that only works if the two units have separate Reset circuits.
If you have an ISP device and separate ICSP headers for both processors you can use Upload Using Programmer to upload sketches. You can get a USBasp programmer for under $4.
johnwasser:
If you have an ISP device and separate ICSP headers for both processors you can use Upload Using Programmer to upload sketches. You can get a USBasp programmer for under $4.
Sorry I am still consuming the information....
Am I correct in saying that you can load the ArduinoISP sketch onto an Arduino board, connect it to a ATMEGA328 MCU and upload another sketch to the ATMEGA328 from the Arduini IDE ->File-> Upload Use Programmer (After setting the programmer to ArduinoISP) menu?
Right... I just figured it out.
You can use an Arduino with ArduinoISP on it to program a second MCU via the ICSP pins.
The bit that was throwing me of was that you have to burn the bootloader each time before using File->Upload Using Programmer.
From what I understand ArduinoISP will over write the bootloader like a real ISP. But I get the idea it needs the bootloader to actually write to the MCU.
(Hence the need to write the boot loader to the second MCU before sending the actual sketch)
This also removes the need to remove the MCU from the Arduino that is doing the programming.
Here are some of the links that put me on the right path...
http://letsmakerobots.com/node/35649