Using Arduino as isp is driving me mad

Platform = Ubuntu Linux 10.10

I've purchased an arduino board with the atmega328 on it. I want to use this as an ISP for an Atmega168 on a breadboard. I'm been over the pinouts 100 times it's hooked up right. I have used the arduino ide to upload the arduinoisp firmware to the arduino. success... So why is it that avrdude gives me the following error after issuing this command.

sudo avrdude -p usb -b 19200 -c avrisp -p m168 -U flash:w:main.hex

avrdude: stk500_recv(): programmer is not responding

Anything would be helpful, I've spent the last 10 hrs scouring the internet and turned up nothing usefull.

Are you running the 168 with a 16Mhz resonator or crystal ? It makes life an awful lot easier if you are........

The diagram I was using did not specify one nor did it come up thus far in my searches. What does that do for me, and could it cause this problem? Thank you in advance for your input.

The standard arduino bootloader works at 16Mhz, running the board on the internal oscillator at other speeds causes no end of problems in my experience. With a 16Mhz chip, burning a bootloader is trivial using the IDE iteslf. Using a second Arduino is even easier. Using the internal oscillator requires the fuses to be changed and even then you run into issues. There are so many tutorials on the internet now, its very confusing.

Stay away from the breadboad version without the crystal or pay heed to the last paragraph :

Using an Arduino board to program an ATmega. Because no external clock source is connected, the ATmega must be configured to use its internal clock.

Better still : http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1295516707

Uses the same setup at the official tutorial I posted but fixes the problems with the Optiboot bootloader as used on the Uno.

sadly I don't have the money for a second arduino. It's interesting that the frequency needs to match... it makes sense, it's just not prominent in the other help I found online. Thank you for your help. I cannot try this right now because I'm going to have to order some parts, however I think I may have screwed up the chip too so I think I'll order another one with the new parts. I'll post my findings in this thread something like a couple weeks from now when I have received the proper parts. Thanks again :slight_smile:

Which Arduino do you have?

arduino duemilanove I think. it's got a atmega328 on it.

Nice! will be a lot easier with this one to load the Bootloader :

  1. try the Bootloading with the Crystal and caps with one 10k resistor intact.
  2. If the first doesnot work use the BITBANG way ,will surely work.for that you can use the AVRDUDE GUI but it runs on windows also you can use the CUI AVRDUDE for reading and wrting the FUSES and the BOOTLOADER or any HEx file

Do you have connected a resistor (100R - 330R) from +5V to the RESET pin on the arduino board?
This seems to be necessary because it inhibits resets of the board.

And a fabric fresh attiny168 as target needs a crystal and two caps of approx 22pF two work
properly.

Hope this helps... :slight_smile:

Alex

Further I think, you should use:
sudo avrdude -P /dev/ttyUSBx -b 19200 -c arduino -p m168 -U flash:w:main.hex
where x=0,1,2...

The Arduino Duemilanove works very well as ISP for me.

Connecting the resistor to handle the reset isn't working in 90% of the cases ,However it is mandatory.

With regard to Pluggy's posts here....I'm a little confused. Does the Uno not work to put a bootloader on a 168 (say) mounted in a duemilanove? How about the other way around? You post a link to a thread about problems fixed with the Uno and the Optiboot bootloader. Sorry for my ignorance but what is that?

I too am an Ubuntu user, I discovered that problem some time ago after I installed some regular updates, the next thing I know was that I couldn't use my Arduino. I posted on the Ubuntu forums but couldn't find any answers.
The problem is not in the Arduino, as I had 2 on hand (duemilanove and UNO), none worked on Ubuntu but both worked on a Windows computer.

I too was driven mad but decided to use VirtualBox with my old copy of Windows installed on it to continue using my Arduino. Thats the only way I can use my Arduino now, but it is perfectly fine with me.

You need to use the closed source version of VirtualBox since it supports the use of the host's USB controllers.
http://www.virtualbox.org/wiki/Linux_Downloads