Go Down

Topic: AtMega32L using Arduino UNO as ISP (Read 1 time) previous topic - next topic

cancelliere

When I try to communicate to the microcontroller i get this error:
Code: [Select]
~/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?

cancelliere

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

oric_dan

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?

cancelliere

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: [Select]
sudo avrdude -c avrisp -p atmega32 -P /dev/ttyACM0
avrdude: stk500_getsync(): not in sync: resp=0xe0

avrdude done.  Thank you.


cancelliere

If I try to specify the baud rate I get this:
Code: [Select]
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.

retrolefty

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

cancelliere

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?

retrolefty


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

oric_dan


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: [Select]
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?

cancelliere


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

oric_dan

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

cancelliere

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

cancelliere


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

retrolefty



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

cancelliere


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

Go Up