Go Down

Topic: Uploading a sketch without a computer (Read 640 times) previous topic - next topic

godo

Hello all,
I have the following setup:
- Arduino Mega with custom shield (normal bootloader)
- Development board with a PIC microcontroller and a sketch as hex-file ("PIC-board") in the memory
- three pins (USART + GPIO) of the PIC are connected to RX0, TX0 and Reset of the Mega
- Master computer connected to the PIC-Board
What I need to do is the following:
- The master sends a hex-file to the PIC-board.
- The PIC board acts as if it was a host computer and uploads the sketch to the Mega.
I think it is mostly a question of timing and checking the answers of the Mega-board, and a gifted programmer would probably know where to look for what in the source code of the IDE. Unfortunately, I am not, so I don't. I also do not have to program the necessary code on the PIC-board, but I am supposed to find information about it. If anyone could direct me into the proper direction, I would greatly appreciate it.
Thanks a lot,
Sebastian

PS: the setup is fixed. No other connections possible.

PaulS

Quote
and a gifted programmer would probably know where to look for what in the source code of the IDE.
The IDE does not upload the code. It executes a command (avrdude) to do that. There are plenty of places on the internet that document the process of using avrdude to upload a sketch. You will need to make your NOT AN ARDUINO do what avrdude does. How to make your NOT AN ARDUINO do that is NOT AN ARDUINO issue.
The art of getting good answers lies in asking good questions.

kowalski

@godo

I believe that the below topic will give you the help you need.

https://forum.arduino.cc/index.php?topic=505195.0

Cheers!

godo

Right, avrdude! Of course, thank you very much, PaulS!
Also thank you, kowalski, I will take a look at it.
Cheers
Sebastian

Go Up