I am writing code on Arduino mega. My current code is working fine. However, I'm not using all the pins.
My question is:
- I have the hex file for my code and I can purchase a Mega2560 MCU. Is there any way to upload the hex file to it and how?
- What are the circuits I would need to to build?
- Eagle files of the Arduino mega are available here. Is this circuit more than enough?
-
The Arduino circuit is overkill for production use.Ignacio Vazquez-Abrams– Ignacio Vazquez-Abrams2014年05月20日 04:50:35 +00:00Commented May 20, 2014 at 4:50
-
@IgnacioVazquez-Abrams I didnt understand what you are sayingAMPS– AMPS2014年05月20日 04:52:02 +00:00Commented May 20, 2014 at 4:52
-
Last time I checked, the chip on the Mega was SMD only; that's hard to solder, and would be difficult to load a bootloader on the chip soldered to some PCBs.Anonymous Penguin– Anonymous Penguin2014年05月20日 21:13:46 +00:00Commented May 20, 2014 at 21:13
-
1@AMPS - I've rolled-back your recent edit on this question because it substantially changed the content (including going from a 2560 to a 328, which is a different chip entirely). Editing your question to clarify it is OK, but changing it entirely (especially after there is already an answer) is not OK.Peter Bloomfield– Peter Bloomfield2014年05月22日 09:47:01 +00:00Commented May 22, 2014 at 9:47
-
1@but i found that if i post question eqicalent of that all saying replicate question. So i am changing here itself. Yes i accept fact IC are change.AMPS– AMPS2014年05月22日 10:06:29 +00:00Commented May 22, 2014 at 10:06
1 Answer 1
If you buy an empty mega2560 IC. It won't contains any bootloader. That means that you need an extra circuit, a programmer, to upload your HEX file into your MCU. "When to use the bootloader" questions link
But, if you buy your mega2560 from an Arduino provider, you should be able to order the MCU with the arduino booloader already programmed. Then a simple serial link from your PC to your MCU will suffice to program the MCU with your Arduino sketch using the Arduino environment. You could clone the serial part that you have on the Eagle files of the original Arduino to do this.
In summary:
- Programming an empty chip requires a programmer
- Programming a chip that has a booloader requires either a programmer, or a simple serial link.
You may also use another Arduino with the suited sketch as a programmer and use it for programming another empty MCU. There are examples of this on the web.
-
There is Device avr pocket programmer if i use device and ISP . Is it possible to upload boot loader.AMPS– AMPS2014年05月20日 10:11:44 +00:00Commented May 20, 2014 at 10:11
-
@AMPS yeah that should work.sachleen– sachleen2014年05月20日 17:05:37 +00:00Commented May 20, 2014 at 17:05
-
@AMPS - if you already have an Arduino of some sort, you don't need to buy another board just for programming bootloaders. Some of those little programmers are based on software USB with diodes to approximate the USB electrical spec.Chris Stratton– Chris Stratton2014年05月21日 14:08:56 +00:00Commented May 21, 2014 at 14:08
-
@ChrisStratton How to dothis??AMPS– AMPS2014年05月22日 10:07:15 +00:00Commented May 22, 2014 at 10:07
-
If you already have an arduino you don't need another ISP programmer but you'll be able to use your arduino with bootloader to burn a bootloader on a clean chip. Just follow the steps on this site. arduino.cc/en/Tutorial/ArduinoISPHandoko– Handoko2014年05月22日 17:07:12 +00:00Commented May 22, 2014 at 17:07