Pages: [1]   Go Down
Author Topic: Using Arduino as isp is driving me mad  (Read 8169 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 4
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.

Logged

Lancashire, UK
Offline Offline
Edison Member
*
Karma: 9
Posts: 1991
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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


Offline Offline
Newbie
*
Karma: 0
Posts: 4
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Lancashire, UK
Offline Offline
Edison Member
*
Karma: 9
Posts: 1991
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.

http://arduino.cc/en/Tutorial/ArduinoISP

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

 
Quote
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.
Logged


Lancashire, UK
Offline Offline
Edison Member
*
Karma: 9
Posts: 1991
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged


Offline Offline
Newbie
*
Karma: 0
Posts: 4
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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 smiley
Logged

ਪੰਜਾਬ
Offline Offline
Edison Member
*
Karma: 12
Posts: 1616
Another year! Alone! :(
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Which Arduino do you have?
Logged

"Real Men can Accomplish  Anything"
-  Website  
- skype : nishants5  

ਫ਼ਤੇਹ ਕਰੂਂ !

Offline Offline
Newbie
*
Karma: 0
Posts: 4
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

ਪੰਜਾਬ
Offline Offline
Edison Member
*
Karma: 12
Posts: 1616
Another year! Alone! :(
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

"Real Men can Accomplish  Anything"
-  Website  
- skype : nishants5  

ਫ਼ਤੇਹ ਕਰੂਂ !

Offline Offline
Newbie
*
Karma: 0
Posts: 22
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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...  smiley

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.
« Last Edit: February 04, 2011, 09:31:32 am by _alx_ » Logged

ਪੰਜਾਬ
Offline Offline
Edison Member
*
Karma: 12
Posts: 1616
Another year! Alone! :(
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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

"Real Men can Accomplish  Anything"
-  Website  
- skype : nishants5  

ਫ਼ਤੇਹ ਕਰੂਂ !

0
Offline Offline
Newbie
*
Karma: 0
Posts: 15
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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? 
Logged

Offline Offline
Jr. Member
**
Karma: 2
Posts: 75
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

« Last Edit: February 04, 2011, 11:44:24 pm by physics-dude » Logged

Pages: [1]   Go Up
Jump to: