Pages: 1 [2]   Go Down
Author Topic: Mega2560 as ISP for Breadboard Atmega328 Issue  (Read 1555 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 13
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Well I added the resistors in line with the MOSI & MISO but I do not have anything connected to the SPI(SS) so did you mean the SCK?  I also added the .1uf capacitor between AVCC & AGND and VCC & GND.  I will attached 1 picture of the wiring and will post a second after this.  To let you double check my steps:

Select Arduino2560 board in software
Disconnect 47uf capacitor
Upload ArduinoISP version 04m3
Upload is successful

Connect 47uf capacitor from mega2560's reset to GND
Change board to Atmega328 on breadboard
Change programmer to Arduino as ISP
Burn bootloader which is successful
last few lines
Code:
# | 100% 29.35s

avrdude: verifying ...
avrdude: 32652 bytes of flash verified
avrdude: reading input file "0x0F"
avrdude: writing lock (1 bytes):

Writing | avrdude: Send: V [56] X [58] . [00] . [00] . [00]   [20]
avrdude: Recv: . [14]
avrdude: Recv: . [ff]
avrdude: Recv: . [10]
avrdude: Send: V [56] . [ac] . [e0] . [00] . [cf]   [20]
avrdude: Recv: . [14]
avrdude: Recv: . [00]
avrdude: Recv: . [10]
avrdude: Send: V [56] X [58] . [00] . [00] . [00]   [20]
avrdude: Recv: . [14]
avrdude: Recv: . [cf]
avrdude: Recv: . [10]
################################################## | 100% 0.06s

avrdude: 1 bytes of lock written
avrdude: verifying lock memory against 0x0F:
avrdude: load data lock data from input file 0x0F:
avrdude: input file 0x0F contains 1 bytes
avrdude: reading on-chip lock data:

Reading | avrdude: Send: V [56] X [58] . [00] . [00] . [00]   [20]
avrdude: Recv: . [14]
avrdude: Recv: . [cf]
avrdude: Recv: . [10]
################################################## | 100% 0.02s

avrdude: verifying ...
avrdude: 1 bytes of lock verified
avrdude: Send: Q [51]   [20]
avrdude: Recv: . [14]
avrdude: Recv: . [10]

avrdude done.  Thank you.

Open Blink example sketch (leaving all board & programmer configuration the same)
Upload blink sketch to target which is still returning

Code:
Binary sketch size: 1,108 bytes (of a 30,720 byte maximum)
C:\Program Files (x86)\Arduino\hardware/tools/avr/bin/avrdude -CC:\Program Files (x86)\Arduino\hardware/tools/avr/etc/avrdude.conf -v -v -v -v -patmega328p -cstk500v1 -P\\.\COM4 -b57600 -D -Uflash:w:C:\Users\Russel\AppData\Local\Temp\build8591332783275075762.tmp\Blink.cpp.hex:i

avrdude: Version 5.11, compiled on Sep  2 2011 at 19:38:36
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
         Copyright (c) 2007-2009 Joerg Wunsch

         System wide configuration file is "C:\Program Files (x86)\Arduino\hardware/tools/avr/etc/avrdude.conf"

         Using Port                    : \\.\COM4
         Using Programmer              : stk500v1
         Overriding Baud Rate          : 57600
avrdude: Send: 0 [30]   [20]
avrdude: Send: 0 [30]   [20]
avrdude: Send: 0 [30]   [20]
avrdude: Recv:
avrdude: stk500_getsync(): not in sync: resp=0x00

avrdude done.  Thank you.







* atmega2560_isp_ atmega328P_2.jpg (3091.64 KB, 4128x2322 - viewed 35 times.)
Logged

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

Here is the second picture.  I appreciate all of your help on this and hopefully you'll see what I am missing.

Thanks


* atmega2560_isp_ atmega328P_1.jpg (4051.46 KB, 4128x2322 - viewed 28 times.)
Logged

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

just an update..... I tried adding the 16 mhz crystal across pins 9 & 10 with a 22pf capacitor from GND to 9 and a second from GND to 10.  The crystal was after the capacitors (closest to the chip.  I chose the  Arduino Duemilanove w/ Atmega328 as the board and ArduinoISP as programmer (this was after the mega2560 was uploaded with ArduinoISP)  It returned the same results.  The bootloader was successful and the sketch upload return avrdude: stk500_getsync(): not in sync: resp=0x00.
Logged

Global Moderator
Dallas
Offline Offline
Shannon Member
*****
Karma: 197
Posts: 12743
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Code:
         Overriding Baud Rate          : 57600

Oops.  Wrong baud rate.  It should be 19200.
Logged

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

I just noticed that...  I saw the bootlaoder at 19200 and I started looking.  do I need to change that in the preferences.txt file then or is there an easier way?
Logged

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

I opened my preferences.txt file and there is no serial.download_rate in the one under users or under the one your not supposed to modify under program files.  Is there supposed to be or was I reading an old FAQ?
Logged

Global Moderator
Dallas
Offline Offline
Shannon Member
*****
Karma: 197
Posts: 12743
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset


boards.txt
Logged

Global Moderator
Dallas
Offline Offline
Shannon Member
*****
Karma: 197
Posts: 12743
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset


@Robin2 has the fix here...
http://forum.arduino.cc/index.php?topic=199394.msg1471286#msg1471286
Logged

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

Success is always sweet.  Commenting both of these lines in the boards.txt file did allow me to burn the bootloader and upload the sketch and continue to upload sketches.

Code:
atmega328bb.upload.protocol=stk500
and
Code:
atmega328bb.upload.speed=57600

 I really appreciate your help.
Logged

Global Moderator
Dallas
Offline Offline
Shannon Member
*****
Karma: 197
Posts: 12743
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset


You are welcome.  I'm glad you have it working.
Logged

Pages: 1 [2]   Go Up
Jump to: