Go Down

Topic: Upload Sketch using ISP - Is possible ? (Read 3260 times) previous topic - next topic

gnusso

Good Morning i've seen how to uploader a bootloader via isp on atmega,

but after a look research I didn't i see on the web how to upload a sketch via ISP,

this could be more comfortable, because will be not necessary unmount the CPU each time for test,

Could someone help me ?

How ever thanks in advance for help,

Regards,
gnux

retrolefty


Good Morning i've seen how to uploader a bootloader via isp on atmega,

but after a look research I didn't i see on the web how to upload a sketch via ISP,

this could be more comfortable, because will be not necessary unmount the CPU each time for test,

Could someone help me ?

How ever thanks in advance for help,

Regards,
gnux


The Arduino IDE now has an option under the main files options to load a sketch via a ISP programmer. You just first select the programmer you are going to use in the tools menu then load up your sketch and then select upload using programmer in the files menu. Works great, but keep in mind that this erases any bootloader that may have already been on the chip and you would need to reburn the bootloader if you ever wished to upload using the normal USB serial link.

Lefty

gnusso

Thanks for the info :-) for example I would like upload via isp using Arduino Uno connected via isp Arduino 2560 is possible ? where Arduino uno is connected to my computer ... so I'm using MAC OSX

So I've tried to upload a simple example and I've choose like Arduino: Arduino 2560 because is where i want to upload the sketch but I received this message:

Quote

avrdude: Yikes!  Invalid device signature.
        Double check connections and try again, or use -F to override
        this check.


Could you help kindly me ?

Thanks
Gnux

retrolefty


Thanks for the info :-) for example I would like upload via isp using Arduino Uno connected via isp Arduino 2560 is possible ? where Arduino uno is connected to my computer ... so I'm using MAC OSX

So I've tried to upload a simple example and I've choose like Arduino: Arduino 2560 because is where i want to upload the sketch but I received this message:

Quote

avrdude: Yikes!  Invalid device signature.
        Double check connections and try again, or use -F to override
        this check.


Could you help kindly me ?

Thanks
Gnux


Did you first load the arduinoISP sketch into the Uno and then select Arduino as ISP as the programmer type in the tools menu, and then properly wire the Uno to the mega board for ISP programming? There are quite a few steps and any misstep along the line can prevent success. There are step by step guides available if you search them out.

Lefty

gnusso

Ok but how can do if my sketch is greater than 32.256 bytes of course my arduino destination is arduino mega 2560 ... i need to use Arduino 2560 for both ?

could you tell me kindly where i can found an explanation ?

so is a little bit that I'm fighting with this issues ....


Thanks :-)
Gnux

KirAsh4


Ok but how can do if my sketch is greater than 32.256 bytes of course my arduino destination is arduino mega 2560 ... i need to use Arduino 2560 for both ?

You are not uploading the sketch to the Uno, so that specific size constraints does not apply.

As retro pointed out:
- Did you Select Uno as the target board?   (Tools -> Board)
- Did you select the correct serial port for the Uno board?   (Tools -> Serial Port)
- Did you upload the ArduinoISP sketch to your Uno?    (File -> Upload)
- Did you then wire the Mega up for ISP communications with the Uno?
- Did you then select "Arduino as ISP" as the programmer?   (Tools -> Programmer)
- Did you then select Mega as the target board?   (Tools -> Board)
- Did you then select "Upload using Programmer"?   (File -> Upload using Programmer)

Failing to do any of those steps will result in any number of failures.

o_lampe

This thread should be a sticky, especcially the last answer!
I was looking for a solution for my Pro Mini, but when I find the pins to connect the ISP to, I'm sure it will work.

Regarding the lost bootloader in the target device: do I have to take care of the fuses-settings?
Or it that done by the IDE?
It's not my fault when my Posts are full of Errors. This stupid autocorrection from my browser is set up for german grammar.

retrolefty


This thread should be a sticky, especcially the last answer!
I was looking for a solution for my Pro Mini, but when I find the pins to connect the ISP to, I'm sure it will work.

Regarding the lost bootloader in the target device: do I have to take care of the fuses-settings?
Or it that done by the IDE?


IF you burning the bootloader via the arduino IDE it takes care of setting the fuse bytes automatically using the fuse settings for the board selected defined in the arduino boards.txt core file.

Lefty

gnusso

Hi for the moment we can put the attention on From Arduino Uno Burn a Sketch VIa ISP on ATMEGA 328 PU ...

so right now I'm able to "BURN BOOT LOADER VIA ISP" Then I think that the cable it's ok.  Now I would like to Upload the Sketch also, below reported the message that I received:

Quote

/Applications/Arduino.app/Contents/Resources/Java/hardware/tools/avr/bin/avrdude -C/Applications/Arduino.app/Contents/Resources/Java/hardware/tools/avr/etc/avrdude.conf -v -v -v -v -patmega328p -cstk500v1 -P/dev/tty.usbmodem621 -b19200 -Uflash:w:/Users/gnusso/Desktop/hex/_20130114_ServerRicevitoreNew.cpp.hex:i

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

         System wide configuration file is "/Applications/Arduino.app/Contents/Resources/Java/hardware/tools/avr/etc/avrdude.conf"
         User configuration file is "/Users/gnusso/.avrduderc"
         User configuration file does not exist or is not a regular file, skipping

         Using Port                    : /dev/tty.usbmodem621
         Using Programmer              : stk500v1
         Overriding Baud Rate          : 19200
avrdude: Send: 0 [30]   [20]
avrdude: Send: 0 [30]   [20]
avrdude: Send: 0 [30]   [20]
avrdude: ser_recv(): programmer is not responding
avrdude: stk500_recv(): programmer is not responding

avrdude done.  Thank you.


Thanks Gnux

KirAsh4



Quote

/Applications/Arduino.app/Contents/Resources/Java/hardware/tools/avr/bin/avrdude -C/Applications/Arduino.app/Contents/Resources/Java/hardware/tools/avr/etc/avrdude.conf -v -v -v -v -patmega328p -cstk500v1 -P/dev/tty.usbmodem621 -b19200 -Uflash:w:/Users/gnusso/Desktop/hex/_20130114_ServerRicevitoreNew.cpp.hex:i



That tells me you did not follow the steps I laid out in an earlier post.  You did not change the board to the Mega for the upload.  You are still attempting to upload to the Uno, which will fail.

Please do yourself a favor and go back and reread my post and follow those steps one by one.  Don't skip any, don't think 'oh that one isn't important'.  Just follow directions.

warwound

Works great, but keep in mind that this erases any bootloader that may have already been on the chip and you would need to reburn the bootloader if you ever wished to upload using the normal USB serial link.


So that explains why i've never succeeded in uploading a sketch to my breadboard arduino using a USB to serial adaptor...

I've been burning the bootloader using a USBasp, then uploading a simple Blink sketch using 'Upload using Programmer' to test things are working - Blink works.
Then i proceed to try uploading with USB to serial adaptor and it's failed every time - always a 'resp=0x00' error message.

I've spent hours trying to get it to work.
Checking connections, changing adaptor drivers and settings and searching the internet for help and a solution.

I read this thread last night and have just reburned my 328P bootloader and successfully uploaded a sketch using the USB to serial adapter - obviously not using the USBasp to initially upload a test sketch.  :)

Martin.


KirAsh4


Works great, but keep in mind that this erases any bootloader that may have already been on the chip and you would need to reburn the bootloader if you ever wished to upload using the normal USB serial link.


So that explains why i've never succeeded in uploading a sketch to my breadboard arduino using a USB to serial adaptor...


Ayup.  Upload using Programmer will erase the bootloader.  Glad you figured it out.

gnusso

I will try to follow all the steps and then I'll let you know ...

Thanks
Gnux

Protoneer


As retro pointed out:
- Did you Select Uno as the target board?   (Tools -> Board)
- Did you select the correct serial port for the Uno board?   (Tools -> Serial Port)
- Did you upload the ArduinoISP sketch to your Uno?    (File -> Upload)
- Did you then wire the Mega up for ISP communications with the Uno?
- Did you then select "Arduino as ISP" as the programmer?   (Tools -> Programmer)
- Did you then select Mega as the target board?   (Tools -> Board)
- Did you then select "Upload using Programmer"?   (File -> Upload using Programmer)


thanks for the above info.

I managed to get it working once but now I can't get it going again.

I have two Arduino Duemilanove's that I am testing with and I connected the two via the ICSP pins. (Can I do it this way or is the wiring wrong?)

On the target chip I want to program. Do I first have to upload the bootloader before this will work? (How do I know if board has a bootloader installed?)
Delta 3D Printer with Auto Bed Leveling - http://www.kickstarter.com/projects/ttstam/openbeam-kossel-pro-a-new-type-of-3d-printer/posts
http://blog.Protoneer.co.nz

CrossRoads

Take a look at NickGammon's writeup, I think this will help you

http://www.gammon.com.au/forum/?id=11635
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

Go Up