Pages: [1]   Go Down
Author Topic: ArduinoISP [closed]  (Read 1145 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Jr. Member
**
Karma: 1
Posts: 67
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hello. I am trying to program a new atmega238 chip.

I've got an Arduino Decimilia board and and an Arduino mega. I replaced the decimilia's chip with the new atmega328, written the program ArduinoISP from the examples. I selected "Arduino as ISP" in programmer, and selected Arduino Duemilanove with Atmega328 as board.

The connections are like in the tutorial: http://arduino.cc/en/Tutorial/ArduinoISP

When I lounchs "burn bootloader" from the menu, the response is

avrdude: stk500_recv(): programmer is not responding

I tried this from Linux and From Windows. To use the arduino as programmer under Linux I added a 10uF capacitor between reset and gnd pin to avoid resetting when the port is openned.

May be the Arduino ISP program does not work correctly in a the Arduino Mega (Atmega 1280)? Any ideas on how to find the problem?

Edit: I connected the heartbeat led and it does not blink. Then, I decided to use the decimilia as programmer, but connecting the new chip in a breadboard.

With the decimilia the heartbeat does blink OK. But When I try to burn the bootloader I receive this error:

avrdude: Yikes!  Invalid device signature.
         Double check connections and try again, or use -F to override
         this check.
« Last Edit: January 22, 2012, 07:06:58 am by anv » Logged

Global Moderator
Dallas
Offline Offline
Shannon Member
*****
Karma: 176
Posts: 12285
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
To use the arduino as programmer under Linux I added a 10uF capacitor between reset and gnd pin to avoid resetting when the port is openned.

Immediately after uploading the ArduinoISP sketch?
Logged

0
Offline Offline
Jr. Member
**
Karma: 1
Posts: 67
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
To use the arduino as programmer under Linux I added a 10uF capacitor between reset and gnd pin to avoid resetting when the port is openned.

Immediately after uploading the ArduinoISP sketch?


I write the program as usual. Then I add the capacitor and from this moment, the chip cannot be reset. If I try to upload a new program without unplug the capacitor, the writting fails.
Logged

Global Moderator
Dallas
Offline Offline
Shannon Member
*****
Karma: 176
Posts: 12285
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
May be the Arduino ISP program does not work correctly in a the Arduino Mega (Atmega 1280)?

That is a possibility.  Try the latest version from here...
http://code.google.com/p/mega-isp/
Logged

0
Offline Offline
Jr. Member
**
Karma: 1
Posts: 67
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
May be the Arduino ISP program does not work correctly in a the Arduino Mega (Atmega 1280)?

That is a possibility.  Try the latest version from here...
http://code.google.com/p/mega-isp/


Can't compile this program (arduino 1.0)

The error is this:

In file included from /usr/lib/arduino/hardware/arduino/cores/arduino/Arduino.h:212,
                 from ArduinoISP.cpp:56:
/usr/lib/arduino/hardware/arduino/variants/mega/pins_arduino.h:36: error: expected unqualified-id before numeric constant
/usr/lib/arduino/hardware/arduino/variants/mega/pins_arduino.h:37: error: expected unqualified-id before numeric constant
/usr/lib/arduino/hardware/arduino/variants/mega/pins_arduino.h:38: error: expected unqualified-id before numeric constant


Edit: resolved the problem: Arduino 1.0 defines the names for SCK, MOSI, MISO, etc. I replaced the constants on the program and it compiled ok but with the same result.

Calling avrisp in command-line, the response is this:


# /usr/lib/arduino/hardware/tools/avrdude -C/usr/lib/arduino/hardware/tools/avrdude.conf  -patmega328p -carduino -P/dev/ttyUSB0 -b19200 -Uflash:w:/usr/lib/arduino/hardware/arduino/bootloaders/atmega/ATmegaBOOT_168_atmega328.hex:i -Ulock:w:0x0F:m

avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.04s

avrdude: Device signature = 0x000000
avrdude: Yikes!  Invalid device signature.
         Double check connections and try again, or use -F to override
         this check.


avrdude done.  Thank you.
« Last Edit: January 21, 2012, 05:29:45 pm by anv » Logged

Pittsburgh, PA, USA
Offline Offline
Faraday Member
**
Karma: 58
Posts: 3978
I learn a bit every time I visit the forum.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I checked that tutorial link and see

Quote
NOTE: Currently, you cannot use an Arduino Uno as an ISP programmer because the optiboot bootloader does not support this sketch. A revision for this is in progress.

Is this optiboot bootloader on the ATmega on the board being used as ISP?

Maybe my UNO is older than that, 0022 was the current IDE when I got it.



Logged

Examples can be found in your IDE.

Global Moderator
Dallas
Offline Offline
Shannon Member
*****
Karma: 176
Posts: 12285
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
avrdude: Device signature = 0x000000

Usually an indication that the target is not powered, the wiring between the programmer and the target is not correct, or that the target is not correctly clocked.

How are you powering the Decimilia?  Do you have GND connected between the Decimilia and the Mega?
Logged

0
Offline Offline
Jr. Member
**
Karma: 1
Posts: 67
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
avrdude: Device signature = 0x000000

Usually an indication that the target is not powered, the wiring between the programmer and the target is not correct, or that the target is not correctly clocked.

How are you powering the Decimilia?  Do you have GND connected between the Decimilia and the Mega?


The heartbeat blinks, the I think the gnd is connected.

Logged

0
Offline Offline
Jr. Member
**
Karma: 1
Posts: 67
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Semi solved the problem.

The problem was a bad crystal. The arduino ide programmed the fuses to use crystal oscilator, but the crystal was broken. I replaced it and it started detecting the chip, but the write process aborts. I tried also with a 8Mhz crystal-less setup with exactly the same result.

# /usr/lib/arduino/hardware/tools/avrdude -C/usr/lib/arduino/hardware/tools/avrdude.conf  -patmega328p -cstk500v1 -P/dev/ttyUSB0 -b19200 -Uflash:w:/usr/lib/arduino/hardware/arduino/bootloaders/atmega/ATmegaBOOT_168_atmega328.hex:i -Ulock:w:0x0F:m

avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.12s

avrdude: Device signature = 0x1e950f
avrdude: NOTE: FLASH memory has been specified, an erase cycle will be performed
         To disable this feature, specify the -D option.
avrdude: erasing chip
avrdude: reading input file "/usr/lib/arduino/hardware/arduino/bootloaders/atmega/ATmegaBOOT_168_atmega328.hex"
avrdude: writing flash (32670 bytes):

Writing | ###############################################    | 94% 0.01savrdude: stk500_recv(): programmer is not responding


I think it is better to start a new thread with this issue.
Logged

Pages: [1]   Go Up
Jump to: