Loading...
Pages: 1 [2]   Go Down
Author Topic: Guide: How to use an Arduino as an In System Programmer (ISP)  (Read 7878 times)
0 Members and 1 Guest are viewing this topic.
Denmark
Offline Offline
Full Member
***
Karma: 7
Posts: 246
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Hmm, that's weird.
Are you sure you have connected everything to the atmega8? Like all ground connections, VCC and a crystal (if you are using that).

Regards
Lauszus
Logged

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

Hello.
I tried to replace the card with another Arduino Mega 2560 and also the ATmega8 chip.
I'm using version 0.23 of the IDE.
AVRDUDE used is provided with the IDE.
I also added the crystal.

But the result is always the same.

You can see photo of the installation.
Logged

Denmark
Offline Offline
Full Member
***
Karma: 7
Posts: 246
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi,

You should install avrdude separately and not use the one bundled with the Arduino software - I have seen other people having problems with the bundled one as well.

I recommend downloading either WinAVR: http://winavr.sourceforge.net/ if you are running Windows or CrossPack: http://www.obdev.at/products/crosspack/index.html if you use MAC OS X. As they include all you will ever need like: a compiler (avr-gcc), programmer (avrdude), and debugger (avr-gdb) plus more.
You can also just download avrdude seperatly: http://savannah.nongnu.org/projects/avrdude, but I can't see the point, as WinAVR and CrossPack is just way faster to get installed.

Hope that did the trick smiley

Regards
Lauszus
« Last Edit: February 22, 2012, 09:55:24 am by Lauszus » Logged

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

Thank you very much, but:
I downloaded WinAVR, type 'avrdude -p m8 -P com4 -c avrisp -b 19200' in C:\WinAVR-20100110\bin directory, and result is:
avrdude.exe: stk500_program_enable(): protocol error, expect=0x14, resp=0x50
avrdude.exe: initialization failed, rc=-1
             Double check connections and try again, or use -F to override
             this check.

avrdude.exe: stk500_disable(): protocol error, expect=0x14, resp=0x51


I downloaded avrdude-5.11-Patch7610-win32, but the result is the same.

The problem could be the  bootloader?

Enrico.
Logged

Denmark
Offline Offline
Full Member
***
Karma: 7
Posts: 246
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Hmm, are you sure that you have connected it the right way? See this post for more info: http://www.ladyada.net/make/usbtinyisp/help.html
Also take a look at this old thread, where people are discussing some of the errors you get: http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1248528012/all

Regards
Lauszus
Logged

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

Hello.
I found a oscilloscope and checked Arduino pins (10,11,12,13):
they don't move when I type 'avrdude -p m8 -P com4 -c avrisp -b 19200'.

What it means?

Enrico.
Logged

Denmark
Offline Offline
Full Member
***
Karma: 7
Posts: 246
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Are you sure com4 is the correct port? Also try to use "-c arduino" instead if "-c avrisp".

Regards
Lauszus
Logged

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

Hi Lauszus, com4 is correct, IDE Serial Port is com4 (upload ArduinoISP Sketch) and when type "avrdude -p m8 -P com4 -c avrisp -b 19200" RX and TX leds in Arduino Mega 2560 blinking.

I used "-c arduino" instead of "-c avrisp", avrdude return:
avrdude.exe: stk500_getsync(): not in sync: resp=0x00

But with "-c arduino" instead of "-c avrisp" pin 13 (SCK) goes high for about 300 ms.

Regards.
Enrico.
Logged

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

Hi Lauszus,
After many attempts I tried to use Arduino UNO.
At the first shot it's worked.

I thank you for your support, I don't know why Mega 2560 doesn't work.

Enrico.
Logged

Denmark
Offline Offline
Full Member
***
Karma: 7
Posts: 246
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi,
Nice smiley Glad I could help.

Regards
Lauszus
Logged

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

hi lauzsuz,
i have questions:
1) can i have program my at89s52 with tis isp concept
2) where i find avrdude program (or we program our chip over arduino)
3)how we connect our chip to arduino uno?
Logged

Netherlands
Online Online
Tesla Member
***
Karma: 86
Posts: 9354
In theory there is no difference between theory and practice, however in practice there are many...
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
where i find avrdude program (or we program our chip over arduino)

It is in the Arduino distribution, on my PC - C:\Program Files (x86)\arduino-0022\hardware\tools\avr\bin -
Logged

Rob Tillaart

Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -

Denmark
Offline Offline
Full Member
***
Karma: 7
Posts: 246
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

@mahk
Quote
1) can i have program my at89s52 with tis isp concept
It seems like a lot of people have tried to port it, but it's still not supported in avrdude, so I don't think it will be that easy.
Here is a example of a old post I found: http://old.nabble.com/How-to-add-AT89S52-to-avrdude-support-list--td24198268.html

Quote
2) where i find avrdude program (or we program our chip over arduino)
It's much easier to just download WinAVR (http://winavr.sourceforge.net/) or CrossPack (http://www.obdev.at/products/crosspack/index.html) as you will also get the newest version of avrdude.

Quote
3)how we connect our chip to arduino uno?
Check the datasheet for your chip and connect MOSI, MISO and SCK to pin 11 (MOSI), 12 (MISO) and 13 (SCK) on your Arduino. Then connect pin 10 (Slave select or just SS) on your Arduino to the reset pin of your chip.

Regards
Lauszus
Logged

Pages: 1 [2]   Go Up
Print
 
Jump to: