Downloading a sketch to breadboard 328 using Arduino as ISP (Resolved)

I have: Windows 7-64, IDE 1.03, Arduino UNO
I have successfully used the ArduinoISP sketch to burn bootloaders on 328PUs on a breadboard.
I have tried to download sketches using ArduinoISP several times using the 10uf method from reset to 0V, with no success.

I have had some success downloading sketches using ArduinoISP using the following process:
In Boards.txt, I copied the original "uno section", modified it as seen below and changed the baud rate to 19200

##############################################################

uno1.name=Arduino Uno Breadboard
uno1.upload.protocol=arduino
uno1.upload.maximum_size=32256
uno1.upload.speed=19200
uno1.bootloader.low_fuses=0xff
uno1.bootloader.high_fuses=0xde
uno1.bootloader.extended_fuses=0x05
uno1.bootloader.path=optiboot
uno1.bootloader.file=optiboot_atmega328.hex
uno1.bootloader.unlock_bits=0x3F
uno1.bootloader.lock_bits=0x0F
uno1.build.mcu=atmega328p
uno1.build.f_cpu=16000000L
uno1.build.core=arduino
uno1.build.variant=standard

##############################################################

Note: the original line was "uno.upload.speed= 115200"
Process:

  1. Restart the IDE and upload the ISP sketch to the Arduino
  2. Select, Tools/Board/Arduino Uno Breadboard
  3. Load the "Blink" sketch or "other sketch"
  4. Upload the "Blink" sketch
  5. The bootloader does not respond since its baud rate is 115200 and the Board baud rate is 19200
  6. The ISP sketch takes over and "Blink" is written to the 328PU on the breadboard.
  7. The Blink sketch 328PU works OK.

The problem: if I try to load a new sketch to the breadboard 328PU I get this error:

avrdude: verification error, first mismatch at byte 0x010a
0x6a != 0x60
avrdude: verification error; content mismatch

My work around this is to re-burn the Bootloader to the breadboard 328PU and then do 3-7 above.

Would someone please explain the problem and suggest a solution to this situation?

Just to clarify, is your breadboard a 328-PU or a 328P-PU?

Burning a bootloader to a 328-PU requires modifying avrdude.conf to provide a M328 entry with correct signature, and a 328 entry in boards.txt pointing at the correct avrdude model and bootloader.

Once you've done that you can't actually upload to the board via Arduino as ISP (or serial) with the board type selected as 328. You have to upload set as the original 328P Arduino UNO.

When Uploading via Programmer, with Arduino as ISP selected as programmer, Onto a bread boarded uC I have never used any additional capacitors. I just take a jumper from Pin 10 on the Arduino to the Reset pin on the breadboarded uC. The reset on the breadboarded uC is pulled high normally with a 10k resistor. I believe you only need that 10uF cap on the target IF it's another Uno, not a bare uC.

You then connect 11 > 11, 12 > 12 and 13 >13

Make sure your board is now set as the Target board and hit Upload via Programmer OR hold Shift while you hit the Upload button.

I'm not sure what you are doing with the whole changing of baudrate thing as that is not required at all. It almost sounds like you are trying to disable the ISP board bootloader and then upload with the normal Upload option, rather than Upload via Programmer.

If your going to program via ISP then the bootloader was only burnt to set all the fuses up correctly. As soon as you do your first upload via ISP to the target uC the bootloader on that device will be overwritten.

Just to clarify, is your breadboard a 328-PU or a 328P-PU?

The breadboard controller is a ATMEGA328P-PU

Make sure your board is now set as the Target board and hit Upload via Programmer OR hold Shift while you hit the Upload button.

I completely missed this.
No need to change Boards.txt
I won't forget this one.

Everything works great!
Just to summarize, my breadboard has a 328P-PU has 22pF caps. a 16MHZ crystal, 10 to reset,11 > 11, 12 > 12 and 13 >13
heartbeat/error/program LEDS on pins 9/8/7.
T h a n k Y o u !

Hi

I have used the same connection to burn bootloader to SMD Atmega328p-au successfully but i am not able to load simple blink sketch using the below connection :

Uploading sketches to an ATmega on a breadboard.

I am getting error: "avrdude: stk500_getsync(): not in sync: resp=0x00"

Note : as instructed in tutorial(mentioned above) i have to connect RX and TX pin of Arduino uno to RX and TX pin of SMD MCU(of PCB). As i found on google that we should not use RX PIN of Arduino Uno but if i remove it then how will i upload the sketch?

Please help me out with that . how can i upload sketch to SMD (on PCB) MCU.

Thanks for your help!

Try this:
Connect Reset of Uno to Gnd on the power header. That takes the Uno processor out of the picture and frees up the USB/Serial chip to download elsewhere.
Connect Rx to Rx
Connect Tx to Tx
Connect Gnd to Gnd
Connect +5 to +5 if power is not provided otherwise.
Start the download. When the IDE shows "compiled xxx of 32xxx bytes" press reset on the SMD board.
The timing of when to press it can be easier to determine if Verbose outputs are selected under File:Preference.

"The timing of when to press it can be easier to determine if Verbose outputs are selected under File:Preference."

Hi
Thanks for your reply!
I am new to arduino programming could you please help me to find the exact meaning of Verbose output of preference file.

I opened the preference file but i didn't find any thing called verbose.
PLease find my preference file content:

board=nano328
browser.linux=mozilla
console=true
console.auto_clear=true
console.error.file=stderr.txt
console.length=500
console.lines=4
console.output.file=stdout.txt
editor.antialias=false
editor.caret.blink=true
editor.divider.size=2
editor.divider.size.windows=2
editor.external=false
editor.font=Monospaced,plain,12
editor.font.macosx=Monaco,plain,10
editor.indent=true
editor.invalid=false
editor.keys.alternative_cut_copy_paste=true
editor.keys.alternative_cut_copy_paste.macosx=false
editor.keys.home_and_end_travel_far=false
editor.keys.home_and_end_travel_far.macosx=true
editor.keys.shift_backspace_is_delete=true
editor.languages.current=
editor.tabs.expand=true
editor.tabs.size=2
editor.window.height.default=600
editor.window.height.min=290
editor.window.width.default=500
editor.window.width.min=400
export.applet.separate_jar_files=false
export.application.fullscreen=false
export.application.platform=true
export.application.platform.linux=true
export.application.platform.macosx=true
export.application.platform.windows=true
export.application.stop=true
export.delete_target_folder=true
last.screen.height=900
last.screen.width=1600
last.serial.location=-8,0,1612,876
last.sketch.count=0
last.sketch0.location=600,200,500,600,412
last.sketch0.path=C:\Program Files (x86)\Arduino\examples\ArduinoISP\ArduinoISP.ino
last.sketch1.location=-8,-8,1616,876,688
last.sketch1.path=C:\Program Files (x86)\Arduino\libraries\GSM_ARDUINO_telit\examples\GPRS\GPRS.pde
platform.auto_file_type_associations=false
preproc.color_datatype=true
preproc.enhanced_casting=true
preproc.imports.list=java.applet.,java.awt.Dimension,java.awt.Frame,java.awt.event.MouseEvent,java.awt.event.KeyEvent,java.awt.event.FocusEvent,java.awt.Image,java.io.,java.net.,java.text.,java.util.,java.util.zip.,java.util.regex.*
preproc.output_parse_tree=false
preproc.save_build_files=false
preproc.substitute_floats=true
preproc.substitute_unicode=true
preproc.web_colors=true
programmer=arduino:arduinoisp
run.display=1
run.options=
run.options.memory=false
run.options.memory.initial=64
run.options.memory.maximum=256
run.present.bgcolor=#666666
run.present.exclusive=false
run.present.exclusive.macosx=true
run.present.stop.color=#cccccc
run.window.bgcolor=#F0F0F0
serial.databits=8
serial.debug_rate=9600
serial.line_ending=1
serial.parity=N
serial.port=COM2
serial.stopbits=1
sketchbook.path=C:\Users\somnsing.ORADEV\Documents\Arduino
target=arduino
update.check=true
update.id=-5745813027459250967
update.last=1405191544480
upload.using=bootloader
upload.verify=true

Actually if i am trying to upload the sketch then synchronize(avrdude: stk500_getsync(): not in sync: resp=0x00") error come with compiled xxx of 32xxx bytes message.

Looking for your help!

Thanks

In the IDE, select File, then Preferences, then the checkboxes for Verbose outputs. Don't make changes in whatever file that is.

The error suggestst USB/Serial adapter is not responding. Are the drivers set up for it?

Simple and successful steps for burning bootloader nad upload sketch:

1>To burn bootloader:-
Follow the following link

Make it sure to connect the capacitor to reset

2>To upload sketch(TODIP OR SMD MCU Atmega328)
Follow the following link

Rig up the circuit as shown under the para:-
Uploading Using an Arduino Board

and it works

Thanks for your help!

Som