Pages: [1]   Go Down
Author Topic: Bootloading/Programming external ATMEGA328 with SMD Arduino?  (Read 1097 times)
0 Members and 1 Guest are viewing this topic.
South Carolina, USA
Offline Offline
Newbie
*
Karma: 0
Posts: 11
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I managed to accidently order an arduino with a surface mount chip. Is it still possible to program/bootload an external atmega328 chip with this arduino? From what I've read it should bootload fine, however, to program it required removing the chip from the arduino itself.
Logged

Left Coast, CA (USA)
Offline Offline
Brattain Member
*****
Karma: 361
Posts: 17301
Measurement changes behavior
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I managed to accidently order an arduino with a surface mount chip. Is it still possible to program/bootload an external atmega328 chip with this arduino? From what I've read it should bootload fine, however, to program it required removing the chip from the arduino itself.

No, there is no need to remove the chip from the arduino board, just load and run the arduino as ISP sketch. Then wire to your standalone target chip. You will most likely have to disable the auto-reset function using a resistor or cap trick.

Lefty

Logged

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 545
Posts: 27361
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

You should still have access to +5,Gnd, Reset, SCK, MISO, MOSI pins so you can load a bootloader, yes?

And +5, Gnd, Reset, Rx, Tx for downloading a sketch?

So you shouldn't have to remove anything.

Run the Optiloader sketch on the working Arduino program the other one, see the video at the end of this thread:
http://arduino.cc/forum/index.php/topic,68183.0.html
https://github.com/WestfW/OptiLoader
Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Anchorage, AK
Offline Offline
Edison Member
*
Karma: 42
Posts: 1176
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

The reason you would have to remove the (master) chip is if you wanted to use your Arduino board's USB-to-serial adapter to upload sketches onto the slave.  With the master chip still on-board, you would be sending the sketch to two devices at once, which is not technically a problem -- except then both would try to reply on the same serial line, which IS a problem.

So, if you program the sketches via ICSP as well, no problem.  Likewise if you instead take your freshly-bootloader'ed slave chip and connect it to a standalone USB-to-serial adapter (FTDI cable or breakout board).  All is not lost.
Logged

South Carolina, USA
Offline Offline
Newbie
*
Karma: 0
Posts: 11
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

So, still working to get this process working. I am attempting to program it now, and am assuming the bootloader is working correctly. However, since I have not successfully gotten a program to load, I don't really have a sure fired way of knowing whether it has or not (at least, i don't think.) Here is the wiring I am using while trying to PROGRAM the sketch.

http://dl.dropbox.com/u/3695731/Images/Arduino/IMG_20120326_130755.jpg

And here is the error code the Arduino IDE throws when I try to load it.
http://gyazo.com/8ff2fd570468f3dabaab7c7b0abdb2f7.png

I was loading the blink sketch, nothing special. I had it set to board>Arduino Duemilanove w/ ATmega328.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 31
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

It looks like you're not keeping the smd mcu in reset mode and like some else said it interferes with the communication with the dip mcu - this is an advice received in these forums.
Logged

South Carolina, USA
Offline Offline
Newbie
*
Karma: 0
Posts: 11
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

How do you go about keeping the arduino mcu in reset mode?
Logged

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 545
Posts: 27361
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Connect the Reset pin to Gnd.
Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Offline Offline
Newbie
*
Karma: 0
Posts: 40
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

As others have pointed out, if you put a jumper from the reset header to ground you will hold the onboard SMT atmega in reset limbo which will allow you to use the USB to Serial portion of the Arduino on another chip.
Logged

Pages: [1]   Go Up
Jump to: