I recently got a few ATmega328P chips from DigiKey; I was having issues burning the bootloader to them using the "Arduino as ISP" feature, as described here (http://arduino.cc/en/Tutorial/ArduinoToBreadboard) with the "minimal" setup (no crystal). I then found several posts where people had issues with this setup, but it worked fine when they used the external crystal with it. So, I got some crystals and capacitors, and I'm no further than I was before. I have it setup as shown in the previous link, but I keep getting errors:
If I try to use the Arduino IDE to burn the bootloader, pressing the "reset" button on the Arduino immediately before clicking the "w/ Arduino as ISP" option, I get:
avrdude: Expected signature for ATMEGA328P is 1E 95 0F
Double check chip, or use -F to override this check.
If I don't press the "reset" button immediately beforehand, I get this error:
avrdude: stk500_recv(): programmer is not responding
I've tried to use AVRdude manually/from the terminal, and I can't get past the same "programmer is not responding" error message. (I am not familiar with AVRdude, though, so this part may be user error.) I'm running Ubuntu 11.04, but using the Arduino IDE downloaded/unzipped from the Arduino website. I'm using the AVRdude from the repositories, because the one that shipped with the IDE doesn't have the "arduino" programmer type.
Any ideas on what I should do/how this works would be appreciated. Thanks.
madworm:
People seem willing to spend large sums on arduino starter kits, but have a hard time to get the absolute essentials.
I try to be frugal... I paid about $30 for my Arduino, and that was two years ago. I never got a "starter kit", because they were/are so expensive. I figured I should use what I have, because it is capable of it, but have run into issues, hence my post on this forum.
Well, yes and no. On the one hand, many people are doing a lot of struggling with ArduinoISP, in ways that they MIGHT not if they had a real programmer. On the second hand, most of the problems seem to be with the 'breadboard' configurations, which you would still need even WITH many "real" programmers. Most of the cheap programmers are "ISP" programmers, which means they need the same somewhat-working base circuitry and connections to the new chip as ArduinoISP. The Arduino Sketch works "fine" for some people; difficulties seem to be mostly related to wiring (and the auto-reset issues. (Of course, if you have an ISP programmer and an Arduino, you can use the Arduino board as your "known good" base system.)
$18 (includes a blank m328p): Standalone AVR ISP Programmer Shield Kit - includes blank chip! : ID 462 : Adafruit Industries, Unique & fun DIY electronics and kits : This is probably the most promising candidate, if you're mostly interested in turning bare 28pin AVRs into Arduino-bootloader-equipped chips (not so much, if you wanted to program other chips.) It solves the breadboard problem by including a ZIF socket. It solves the crystal problems by providing clock to the target. I like the general concept of a "kit" formed by throwing some components and jumpers onto a proto shield. And it's cheap.
If I try to use the Arduino IDE to burn the bootloader, pressing the "reset" button on the Arduino immediately before clicking the "w/ Arduino as ISP" option, I get:
Do NOT press the reset button. The goal is to DISABLE (auto-)reset not help it along.
computer_freak_8:
I've tried to use AVRdude manually/from the terminal, and I can't get past the same "programmer is not responding" error message. (I am not familiar with AVRdude, though, so this part may be user error.) I'm running Ubuntu 11.04, but using the Arduino IDE downloaded/unzipped from the Arduino website. I'm using the AVRdude from the repositories, because the one that shipped with the IDE doesn't have the "arduino" programmer type.
Any ideas on what I should do/how this works would be appreciated. Thanks.
Which Arduino are you using? If it has the auto-reset feature, have you disabled auto-reset when you run arduinoisp?
You don't need a version of avrdude that supports ardinoisp specifically, because arduinoisp uses the stk500 protocol. So you can use the stk500 or avrisp programmer options. However, I found that I do need to set the baud rate in the avrdude command line.
I think this is what I'm trying to do - basically turn my new ATmega328P chips into a drop-in replacements for my current ATmega168P.
dc42:
Which Arduino are you using? If it has the auto-reset feature, have you disabled auto-reset when you run arduinoisp?
You don't need a version of avrdude that supports ardinoisp specifically, because arduinoisp uses the stk500 protocol. So you can use the stk500 or avrisp programmer options. However, I found that I do need to set the baud rate in the avrdude command line.
I am using the Arduino Duemilanove, with its (stock) 168 chip. Trying to install the bootloader on a 328 chip on a breadboard.
I tried it both with and without auto-reset (by adding resistors in series, totaling 120 ohms, between "+5V" and "Reset"). It doesn't seem to have any effect.
Also, what should my baud rate be? Should I be using the "avrdude" included with the Arduino-22 software, or should I use the one provided by the Ubuntu repositories?
I tried it both with and without auto-reset (by adding resistors in series, totaling 120 ohms, between "+5V" and "Reset"). It doesn't seem to have any effect.
Put the resistors in place. Try to upload an empty sketch to the board. Does that work?
The 120 ohm resistor seems to usually work for FTDI boards and the capacitor seems to usually work for 8U2 boards. Some folks have reported the other way around works. A few folks have had to cut the auto-reset trace.
Well... they should've added a jumper/switch for auto-reset, when that was requested. But noooo... that would only 'confuse' people. Now we have this resistor/capacitor MESS.
try editing the preferences for arduino located in /home/username/.arduino/preferences.txt and add upload.verbose=true - that will give you more info about the whole process
also i have successfully used the duemilanove board, with an 120 ohm resistor between reset and 5V, as an isp programmer and for the baud rate i was using 19200 anything higher than that would give me an error
On my Uno, either a 10uF capacitor from reset to ground or a 100 ohm resistor from reset to +5v works. Under Windows at least, you can use the version of avrdude installed with Arduino-0022, but you need to set the baud rate. There is an example avrdude line that works (for setting fuses at least) in my miscsolutions blog at Wordpress.
Without being connected to the other breadboard components? Just the Arduino with the resistors? If this is what you mean, then no; I compiled the "bare minimum" sketch, and tried to upload it with the resistors in place. I got the following error(s):
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_recv(): programmer is not responding
putyn:
try editing the preferences for arduino located in /home/username/.arduino/preferences.txt and add upload.verbose=true - that will give you more info about the whole process
Nice! Thanks for the tip.
putyn:
also i have successfully used the duemilanove board, with an 120 ohm resistor between reset and 5V, as an isp programmer and for the baud rate i was using 19200 anything higher than that would give me an error
Ah, okay. I'm working on re-connecting the breadboard, now that I have very verbose output.
--Edit--
Another (related) question: Is the reason for the unreliability/buggy-ness of the breadboard/ArduinoISP setup simply the lack of good electrical contact? Or is there something else different (such as the schematic used) with the ArduinoISP "shields" and the breadboard method?
Is the reason for the unreliability/buggy-ness of the breadboard/ArduinoISP setup simply the lack of good electrical contact?
Could be. Very long wires (say, over a meter) can sometimes cause problems.
Or is there something else different (such as the schematic used) with the ArduinoISP "shields" and the breadboard method?
There is nothing special about the ArduinoISP shields regarding the connections. The connections are always the same: MOSI to MOSI; MISO to MISO; SCK to SCK; GND to GND; 5V to 5V.
I see that link shown very clearly on the Matt Richardson youtube vid How-To: Shrinkify Your Arduino Projects.
At the MIT link they have the hardware support for the Tiny45 and 85 to show up on Tools->Board.
Question is where to find support for all the other AVR's? I don't know where to find it and I looked all over.
Even with that, would you be able to burn the bootloader?