Go Down

Topic: Turn Arduino into an ISP programmer (Read 25828 times) previous topic - next topic



A couple of weeks ago my AVR-ISP programmer died and this motivated me to try to turn an Arduino board into an ISP programmer.
I used software written by Guido Socher and adapted it to the arduino board

it's very alpha at the moment but this would allow people to program the bootloader to as many avr chips as they like for free....

check it out here http://tinker.it/now/2006/12/04/turn-arduino-into-an-avr-isp-programmer/

let me know if it works for you



nice one massimo. that's the one nicolas and i were talking to mellis about. glad you picked it up  ;)
did you manage to make it work on the 168? that's what we're really interested in.



yes dave forwarded me nicholas' email  me just after I got it working..

i was able to program the 168 but using avr studio... (thanks to parallels for mac..) but avr dude gives so many confusing error messages with it that it made me lose a week...

I was  in a small city in germany for 2 weeks when my programmer died and in one week i've built every possible programmer out there....

It needs more testing and I have to send a bottle of wine to Guido :)



I don't know much about programming but does this mean I can program a ATmega chip with a ICSP using a Arduino board? Also when is that Arduino Bluetooth board coming out?



I was using it to program the Bootloader on the BT boards.

the instructions are not super simple yet, i'm working on writing a better tutorial.

The board is in production now, I'll have an exact date this week. It took us a lot of time because making it easy to use is not so simple... now you can download the code via bluetooth which is quite cool :)



Dec 06, 2006, 11:12 pm Last Edit: Dec 06, 2006, 11:20 pm by nrolland Reason: 1
glad we're pretty much getting to the same result.
4 questions:
- i saw you set a 115.2 Kbaud rate on the uart, is that causing a problem with a 16Mhz crystal (according to p162 of m8 datasheet, that's a 3.5% error)?
- did you manage to flash the bootloader on m168 with the 16MHz crystal and avr studio?
- i saw in test.ccommand that you're using uisp to flash with stk500v2, did you manage to flash the m168 with uisp and stk500v2 on the 16Mhz crystal?
- are you planning to work on the bit bang (as it is better just to do it one time  ;) ) ?





some super fast replies

115.2k is what avr studio expects, to change that is a bit annoying so i left it like that and I can communicate with the board no prob
(if you connect with a terminal emulator you can see the programmer responding with a prompt to change the version number reported)

i can write to the chip but it's not 100% reliable yet

test.command is actually wrong because uisp doesn't support the stv500v2. I made another script that uses avrdude
something like this
avrdude -p m168 -b 115200 -c stk500v2 -P /dev/cu.usbserial-A4000QpS -e -U flash:w:bl.hex
but avrdude gives strange errors while handling the fuses.. i've wasted days of work because of that.....

I did compile the bitbang by recompiling libusb and the special version of uisp that guido made but i never actually tested it
because i thought that getting the arduino board to be an ISP itself was more interesting
also the bitbanging is slow (as stated on the website)

from here to a completely robust solution there is still work to do... but for now it was good enough for me. now I have to concentrate on the BT and Ethernet boards :)



the place where to change the port in load.command is "dserial=$PORT", right? i just put a number instead of $PORT, right?
to launch load.command with windows xp do i use the command prompt?
thanks and regards.
are you sure about the reset pin on 10? isn't it 1 instead?


Has anyone accomplished this on Mac OS X?

I've got the boards hooked up correctly and the stk500 firmware uploaded correctly to the first Arduino. However when I run the burn command (after the correct (I believe)) modifications I got a constant Device Not Responding type of message.. Actually I think it's Programmer Not Responding.

I don't know if that's because the icsp isn't working or if there is an incompatibility between the stk500 firmware and mac os x?

I would really like to get a atmega168 burned w/ the 168 flavor arduino bootloader... The extra space would be very welcome. However, like I said... it's just not working.

Any insight or anybody being successful at this would be great to hear. It seems clear, but something just isn't meshing.

I've also tried avrdude 5.2 as per a suggestion I found online - as it was supposed to be more compatible w/ os x.. but no dice there either.

Anyway, thanks for any help rendered, I appreciate it.



I had the same non-result as you - I did get the programmer firmware downloaded, but any time I tried to use it as a programmer I got a "programmer not responding" message.  Mac OS X 10.4.8 PPC.

I did talk to the programmer via rs232 and it seemed to go to some sort of prompt when I hit return, but it never really did anything.  It looks like this happened when I tried to program with it, judging by the way the TX and RX LEDs blinked.



hmm... Frustrating. I have a project I'd like to pursue that includes both i2c and an LCD which fills the atmega8 just by including libraries.. ergh.

Was the reason for not being able to burn bootloaders w/ the arduino board a monetary or technical decision?



You may need to remove the built-in LED connected to pin 13 that's on the Arduino board you're using a programmer.  I think it interferes with the SPI lines that are used for programming.  The next revision of the Arduino board should fix this problem.


I had already worked around the LED problem (I moved a resistor instead of removing the LED).  Besides that, I was taking that data off the ICSP header instead of the standard arduino outputs.



What software are you using on the computer?  The Arduino environment won't work with it, as it uses uisp which only support stk500, not stk500v2 which is used by the firmware.  We should be switching to avrdude soon, which supports stk500v2.  In the meantime, you'll need to use it from the command line, along the lines Massimo suggested.


I was using avrdude at the command line.  I failed to take notes, so I'm about to try the whole thing over on my desktop machine (was working on the laptop before) and may even switch to an arduino serial that I built if the NG fails.

My errors were avrdude telling me the programmer wasn't responding, so I don't think the NG hardware was the issue.  I suspect that I don't have an appropriate avrdude.conf entry, but I can't remember what made me think that (it was late at night, and like I said I failed to take notes).


Go Up