Is it possible to use and Arduino Uno board to program an Atmega328P?
I have an idea... I would like to use Eeproms to store sketchs in hex format, read them from the Arduino and then send them to a secondary Atmega that would be mounted on a separate card. And then pass the control of the whole system to the Atmega on the external board, putting the Atmega on the Arduino in sleep mode.
My will is to use 24lc512 eeproms to store a maximum of 2 sketches per chip. This is because I would use the Atmega328, that has 32K of internal RAM. I don't know if I will use all this amount of memory or not: the project should be start as a learning project.
So right now it's important to know if an Arduino by itself can program another Atmega.
Thanks for the link but... I read that project currently doesn't support the Arduino Uno because its bootloader isn't compatible with the sketch used to program the other Atmega.
P.S.:
and that code seems just to write the bootloader. I would like to write a sketch instead.
Thanks for the link but... I read that project currently doesn't support the Arduino Uno because its bootloader isn't compatible with the sketch used to program the other Atmega.
Bummer.
P.S.: and that code seems just to write the bootloader. I would like to write a sketch instead.
If it works to burn a bootloader it will work to burn anything including a Sketch.
Ok, that's not what I was thinking....
I try to explain again my idea, for a system that is slightly different
So, I would like to build a system in which the program to execute is passed by the user with an Eeprom that should be inserted in an empty socket on a secondary card.
On the secondary card there should be an Atmega(328) used to program the Atmega on my Arduino Uno. So:
the user inserts an Eeprom
the external Atmega reads the code and re-program the Atmega on the Uno
after that, Arduino keeps the control and starts the sketch
So, is it possible to connect two Atmega and use one of them to re-program the other?
Allora... io vorrei realizzare un sistema in cui il programma da eseguire lo sceglie l'utente e lo passa al sistema su Eeprom. Installata la Eeprom, vorrei realizzare un modo per caricare lo sketch nell'Atmega dell'Arduino. Ecco allora che avevo pensato all'uso di un secondo Atmega che fungesse da programmatore del primo. L'Atmega "programmatore" risiederebbe su una scheda esterna, sulla quale ci sarebbe anche lo zoccolo dove l'utente installa l'Eeprom con lo sketch da eseguire. L'Atmega programmatore leggerebbe lo sketch e lo copierebbe nella Flash dell'Atmega dell'Arduino per poi passare il controllo a questo mC.
Ora viene il primo problema: la programmazione di un Atmega si può fare da un altro Atmega semplicemente collegando i pin preposti allo scopo dei 2 mC?
I think the problem is that the Arduino ISP uses the SPI lines to program the target. These same lines are used to communicate with the EEPROM chip. If this is the case, I suspect you could bit-bang either the ISP part or the EEPROM part. Hopefully, someone with more experience than I will be able to give you a more definitive answer.