Turn Arduino into an ISP programmer

does someone know a method to change the speed with another (non-windows) tool? apparently avrdude has not the ability, or has it?

I think avrdude can do it, but that's about as much information as I have on the subject. Search the avrdude documentation for the -B (bitclock) command line option. Apparently this affects the ISP clock.

  • Ben

Hi all
Is there any update on this?
I need a programmer and am going to try it from the OS X envrons

Would appreciate any feedback from you brave noble people out there who have had success

/t

If you're looking to burn bootloaders, try Programmer2. I haven't had much luck getting my Mac to recognize it as a programmer because it seems to emulate an odd programmer and because avrdude won't recognize the FT232 interface unless you explicitly tell it where to look on the command line (so no burning from the IDE), but it can autonomously/semi-autonomously burn the 8/168 bootloaders stored in the program and set fuses and whatnot.

I've been playing with the code, and plan on releasing a version updated to add support for the atmega328, but it's taking some cajoling to fit all 3 bootloaders as well as the ISP emulation code in the 168's flash size. The original author seems to have made some strange programming decisions, and I'm having trouble figuring out what might break the ISP functions (which I can't really test) if I replace it with code that appears to do the same thing more efficiently.

Hi,
I think it should be OK to buy the AVRIspMK2. I don't use MaxOS but here
http://www.arduino.cc/playground/Code/OSXISPMKII
is an article about using this programmer on a Mac with libusb. All the problems about being slow seem to be related to the programmer being accessed through a serial-port.
This thing works fast on Linux and Windows, so I don't think it will fail on a Mac.
Eberhard

the avrispmkII works fine on OS X. You can set up an entry in boards.txt and program directly from the arduino IDE via standard upload procedure.

I don't recall if I had to build avrdude, or if the avrdude binary that comes with arduino works out of the box.

There were some speed issues involving the factory default settings of some avrispmkIIs. I think mine was one of those.

-j

so, how long should a USB AVRISPmkII take to burn a bootloader, e.g. ATmegaBOOT_168_ng.hex or ADABOOT_168.hex, with the Arduino 16 IDE Burn Bootloader? (the former is 5700 bytes, the latter is 4800.)

it's taking about 10 minutes on my G4 Mac 10.4. if this is not normal, what is the best way (on a Mac) to increase the ISP comm speed?

Hi,

so, how long should a USB AVRISPmkII take to burn a bootloader, e.g. ATmegaBOOT_168_ng.hex or ADABOOT_168.hex, with the Arduino 16 IDE Burn Bootloader? (the former is 5700 bytes, the latter is 4800.)

I only use the AVRIspMK2 on Linux and Windows and it doesn't take much longer than 15-20 seconds.
I don't think this has anything to do with the speed on a serial-port.
As far as I know AVRDude talks to the device using the usb-protocol directly, there is no Serial-Data-Over-USB-Emulation-Software involved. The timing on Linux/Windows must be possible on a Mac, too.

Eberhard

i've been trying to figure out the -B option to fix speed of AVRISPmkII. i used this command line and the speed did indeed improve dramatically, it only takes 10 seconds now, here it is in case it helps anyone else [assuming USB and atmega8]:

avrdude -p m8 -c avrispmkII -B 1 -Pusb

seems you have to specify -p (part) even though you're not doing anything with the part, not sure what you do if you have nothing to connect the programmer to.

i just chose 1 for -B value, not really sure what the proper value is, based on this:

-B bitclock
Specify the bit clock period for the JTAG interface or the ISP clock (JTAG ICE only). The value is a floating-point number in microseconds. The default value of the JTAG ICE results in about 1 microsecond bit clock period, suitable for target MCUs running at 4 MHz clock and above. Unlike certain parameters in the STK500, the JTAG ICE resets all its parameters to default values when the programming software signs off from the ICE, so for MCUs running at lower clock speeds, this parameter must be specified on the command-line.

I've noticed that in the new Arduino 0018, there is now an option to burn a bootloader using Arduino as ISP.

Does this use the same method as this thread describes, but all combined into the IDE?

I also noticed the Sketch you have to upload to the Arduino you will be using as the ISP.

If this is so, how do you select which bootloader will be burned? Is it based on which board you have selected in the Tools->Boards menu (like burning bootloaders with other methods)?

Thanks!

Didn't work for me, but I didn't try very hard.
Eberhard

Oh, cool! Didn't realize there was a Playground page for it yet!

If you don't mind my asking, what about it didn't work?

Hi,
Avrdude complained the chip I was about to program had the wrong signature.

But as I said, didn't investigate any further (lack of time and I already have hardware programmer).

Eberhard

Alrighty. I'm getting ready to try and reflash my RBBB ATmega328.

There's nothing wrong with it (other than it's the old bootloader), but I thought I'd try out ArduinoISP.

I'll post here what happens.

If this is so, how do you select which bootloader will be burned? Is it based on which board you have selected in the Tools->Boards menu (like burning bootloaders with other methods)?

I think it's a two step process. First you have to select the actual board type that you are going to load the bootloader burner sketch into. Once that sketch is loaded and running on the board you then have to wire the board to the chip or board you are going to burn a new bootloader into and then you have to select the board type that corresponds to the chip you are burning the bootloader into.

That make sense?

Lefty

Yeah that's what it says on the ArduinoISP page.

Hey, it worked!

I wired it up like it said in the example, and the bootloader burned fine, and my RBBB is now running the Blink sketch I just uploaded!

Great to know it works!

Great to know it works!

Yes, gives one a secure feeling knowing they can recover from a bricked bootloader. However I still wonder why bootloaders get corrupted in the first place when the lock bits are suppose to protect that part of the flash memory. I posted a question on this board a while back asking for theories on how bootloaders get screwed up, however not much feedback from the 'experts' here so it's all still a mystery. :wink:

Lefty

I suppose it's one of those things no one really gets, like parallel resistance in a circuit (or does someone understand how that works? I sure as heck don't) ;D.

I bought some 'mega644s off of eBay (20 bucks for 6 of 'em), and I'm planning on making some StripboardDuino644s :), but first I needed to know that I could burn the Sanguino bootloader.

what is the advantage of a 644