Pages: 1 [2] 3   Go Down
Author Topic: Guide: How to use an Arduino as an In System Programmer (ISP)  (Read 15005 times)
0 Members and 1 Guest are viewing this topic.
Denmark
Offline Offline
Sr. Member
****
Karma: 10
Posts: 287
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.


* PhotoAVRISP.jpg (138.19 KB, 1600x1200 - viewed 71 times.)
Logged

Denmark
Offline Offline
Sr. Member
****
Karma: 10
Posts: 287
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
Sr. Member
****
Karma: 10
Posts: 287
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
Sr. Member
****
Karma: 10
Posts: 287
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
Sr. Member
****
Karma: 10
Posts: 287
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

Global Moderator
Netherlands
Offline Offline
Shannon Member
*****
Karma: 224
Posts: 13915
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 -
(Please do not PM for private consultancy)

Denmark
Offline Offline
Sr. Member
****
Karma: 10
Posts: 287
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

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

Hi all!

I had the same problem - avrdude.exe: stk500_getsync(): not in sync: resp=0x00
If someone still need a solution, Try next: "avrdude -p m328p -P //./COM5 -c avrisp -b 19200"
It helps me. Good luck!
Logged

Offline Offline
Full Member
***
Karma: 0
Posts: 111
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

So I bought the Graphic LCD Serial Backpack (https://www.sparkfun.com/products/9352) and I'm trying to upload a updated firmware to add the needed flow control from http://serialglcd.sourceforge.net/ I have read through the comments and came across this forum. I also found a comment that the file being over sized and a solution here https://code.google.com/p/mega-isp/issues/detail?id=14&can=1 . It was also commented to use Mega ISP  http://playground.arduino.cc/Code/MegaISP

Where I'm stuck is step 5. I never used WinAVR. Can someone explain step 5. Which program is doing the compiling and which file is being compiled? I downloaded the serialGLCD1.62 files and there are a bunch of files inside.

"5) Compile the program to make a hex file, this can be done by typing "make all"  in a terminal while inside the folder (use "cd" and then the path to the folder - see step 11 for help)
You might have to change some setting for it to work. If there is already an hex file (as in my example) you can just skip this step"


So far I have the following filles
serialGLCD1.62
ArduinoISP-dev04b

And the following programs
Arduino programmer
WinAVR


Hardware I'm using
Graphic LCD 128x64 https://www.sparkfun.com/products/710
Graphic LCD Serial Backpack https://www.sparkfun.com/products/9352
Pocket AVR Programmer https://www.sparkfun.com/products/9825

Thanks in advance

P.S.
Should I follow this forum's tutorial or the sparkfun one here (https://learn.sparkfun.com/tutorials/serial-graphic-lcd-hookup/firmware-overview) ? Is one newer? Can the sparkfun be applied to any firmware?

P.S.S Has sparkfun actually updated the firmware from the original? Do i need to still update it?
« Last Edit: January 16, 2014, 12:53:00 am by Yigiter007 » Logged

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