Pages: [1] 2   Go Down
Author Topic: AtMega32L using Arduino UNO as ISP  (Read 1473 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 37
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

When I try to communicate to the microcontroller i get this error:
Code:
~/avrdude-5.11.1$ sudo avrdude -c avrisp -p atmega32 -P /dev/ttyACM0

avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.01s

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.

What may be the problem?
Logged

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

Could the problem be related to the fact that the ATMega32L isn't using any external clock?
Logged

the land of sun+snow
Offline Offline
Faraday Member
**
Karma: 159
Posts: 2916
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Are you trying to burn the bootloader into the 32 chip here? Did you first upload the ArduinoISP
sketch into the UNO chip? Did you then select the proper board when burning the bootloader?
Do you have all the proper connections between boards?
Logged

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

Thank you for your help. I've put a 120 Ohm resistor between the Arduino Reset and GND, but it needed a 10 uF capacitor instead of it. Now I see the heartbeat LED powered on.

Now I get this error:
Code:
sudo avrdude -c avrisp -p atmega32 -P /dev/ttyACM0
avrdude: stk500_getsync(): not in sync: resp=0xe0

avrdude done.  Thank you.

Logged

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

If I try to specify the baud rate I get this:
Code:
sudo avrdude -c avrisp -p atmega32 -b 19200 -P /dev/ttyACM0

avrdude: AVR device initialized and ready to accept instructions

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

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

Left Coast, CA (USA)
Offline Offline
Brattain Member
*****
Karma: 361
Posts: 17303
Measurement changes behavior
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Thank you for your help. I've put a 120 Ohm resistor between the Arduino Reset and GND, but it needed a 10 uF capacitor instead of it. Now I see the heartbeat LED powered on.

In the future if you want to use a resistor to defeat auto-reset it has to wire between +5V and reset, a capacitor wires from reset to ground as you found out. Either method works.

Funny thing is I've used arduinoISP sketch quite a bit recently on an older Duem board and have never had to defeat the auto-reset to have it function. It's a timing thing I know but I wonder what the variations are that make it required for some but not for others? Actually my Duem has the optiboot bootloader on it so it thinks it's a Uno board and has to be selected as such to upload to it.

Lefty
Logged

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

I suppose the problem is that Arduino cannot communicate to the ATMega because of the signature being 0. Could the lack of an external clock cause the problem?
Logged

Left Coast, CA (USA)
Offline Offline
Brattain Member
*****
Karma: 361
Posts: 17303
Measurement changes behavior
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I suppose the problem is that Arduino cannot communicate to the ATMega because of the signature being 0. Could the lack of an external clock cause the problem?

Yes, if the target chip has had it's fuse settings change in the past to work with an external clock source that would prevent it from working.

Lefty
Logged

the land of sun+snow
Offline Offline
Faraday Member
**
Karma: 159
Posts: 2916
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Thank you for your help. I've put a 120 Ohm resistor between the Arduino Reset and GND, but it needed a 10 uF capacitor instead of it. Now I see the heartbeat LED powered on.

Now I get this error:
Code:
sudo avrdude -c avrisp -p atmega32 -P /dev/ttyACM0
avrdude: stk500_getsync(): not in sync: resp=0xe0

avrdude done.  Thank you.
You didn't answer any of my questions. Besides those, which target board did you select?
Logged

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

Are you trying to burn the bootloader into the 32 chip here? Did you first upload the ArduinoISP
sketch into the UNO chip? Did you then select the proper board when burning the bootloader?
Do you have all the proper connections between boards?

I'm sorry I didn't answer before.
I've uploaded successfully the ArduinoISP sketch.
The connections are ok, I've checked many times.
What do you mean by saying "proper board"?
Logged

the land of sun+snow
Offline Offline
Faraday Member
**
Karma: 159
Posts: 2916
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I meant which target board did you select in the Arduino IDE? I don't see one specifically for
the 32L chip.
Logged

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

Since I am not uploading anything to the board, but I'm just trying to communicate to it, I haven't selected anything.
Logged

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

Yes, if the target chip has had it's fuse settings change in the past to work with an external clock source that would prevent it from working.

Lefty

I don't have any 16 MHz oscillator. Will I have any problems by using a different frequency (14 or 22)?
Logged

Left Coast, CA (USA)
Offline Offline
Brattain Member
*****
Karma: 361
Posts: 17303
Measurement changes behavior
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Yes, if the target chip has had it's fuse settings change in the past to work with an external clock source that would prevent it from working.

Lefty

I don't have any 16 MHz oscillator. Will I have any problems by using a different frequency (14 or 22)?

Not for just the purpose to burn a sketch or a bootloader onto the target. However the frequency does need to be correct for the bootloader to work with the arduino IDE as the baud rate will not be correct if not clocked at the speed the specific bootloader was created to work at.

Lefty
Logged

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

Not for just the purpose to burn a sketch or a bootloader onto the target. However the frequency does need to be correct for the bootloader to work with the arduino IDE as the baud rate will not be correct if not clocked at the speed the specific bootloader was created to work at.

Lefty


Do I have to use the two capacitors? If so, their capacitance has to be as said here (18 or 22 pF)?
Logged

Pages: [1] 2   Go Up
Jump to: