4
\$\begingroup\$

I usually use my Arduino as an ISP programmer.

Let's say I want to program the blink LED code to my ATmega328 with the bootloader already in it.

Can I just program it in the classical way and pull out the chip from the Arduino? Is there any problem doing like this? It sounds easier and quicker.

(I'm talking only about ATmega328 with the bootloader already in it, not ATtiny or other ATmega chips.)

\$\endgroup\$

4 Answers 4

3
\$\begingroup\$

Short answer: Yes you can.

Longer answer, mostly stating the obvious for those who might need it:

  • Evidently one would need an Arduino with a DIP socket and DIP ATmega microcontrollers - while the classic Uno and several other Arduino boards have this, some of the newer ones are SMD-only.
  • This won't work with a fresh ATmega MCU, i.e. one without the bootloader - this is of course already addressed in the question
  • The microcontroller ICs can be sensitive - both to manhandling while pulling the IC out (pins break), and possible ESD damage if the pins are not handled with care. The ATmega family is pretty hardy though, so ESD is not as big a risk
  • If this method of programming is to be done for a bunch of MCUs, it would be better to use a breadboard or ZIF socket, rather than the socket on the Arduino
\$\endgroup\$
3
\$\begingroup\$

Can I just program it in the classical way and pull out the chip from the arduino ?

Sure you can, you place the chip (that already has a bootloader) to the arduino board, program it and then you can pull it out and place it on a breadboard (connecting the supplies and crystal) and it will work fine.

To put it another way, you can get any empty chip like mega88/168, place it on a breadboard, program it once with the arduino bootloader (using an ISP serial programmer) and after that you can use the bootloaded functionality to program the chip on the breadboard.

\$\endgroup\$
7
  • \$\begingroup\$ That's not exactly the problem (or I don't get your answer). I'm not talking about programming the IC on a breadboard but putting the IC I want to program "on" the arduino. \$\endgroup\$ Commented Jan 5, 2014 at 17:17
  • \$\begingroup\$ @EmmanuelIstace That will not work, the bootloader is in the actual chip so if you use an empty one there is no bootloader \$\endgroup\$
    – alexan_e
    Commented Jan 5, 2014 at 17:27
  • \$\begingroup\$ I mentioned in the question that the chip I'm using are actually pre-programmed with the bootloader. \$\endgroup\$ Commented Jan 5, 2014 at 17:31
  • 1
    \$\begingroup\$ @EmmanuelIstace Then my original reply applies. You can program the chip on the arduino board and then pull it out, place it on a breadboard and use it to execute the code. \$\endgroup\$
    – alexan_e
    Commented Jan 5, 2014 at 17:33
  • \$\begingroup\$ Ah yeah, sorry, I re-read it and I don't get your answer the first time. (English's not my native language) I thought you were talking about programming it from the breadboard and then putting it on the arduino. Thanks for the answer ! \$\endgroup\$ Commented Jan 5, 2014 at 17:39
0
\$\begingroup\$

Apart from wearing out the socket, there is no "problem" with using that tactic.

In fact, there are several "roll-your-own" Arduino projects which utilizes other ATMega chips besides those commonly used in commercially available Arduino boards.

Build Your Own Arduino Compatible Board

How to roll your own programmable Arduino/AVR board

Building an Arduino on a Breadboard

\$\endgroup\$
0
\$\begingroup\$

You can also use an FTDI cable or FTDI breakout board (2 examples linked) so you can program your chip right on the breadboard or in-circuit. Including four more header pins (for Vcc, Gnd, RxD, TxD) on your board makes it quick to connect the FTDI cable.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.