Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

atmega32 16PU, using usbtiny programmer -- avrdude: initialization fail, rc= -1

Status
Not open for further replies.

KFChoong

Newbie level 4
Newbie level 4
Joined
Apr 13, 2010
Messages
5
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Visit site
Activity points
1,347
Hi Sir,

I am a newbie in micro-controller programming and so much like to learn up this technology.
I am programming a ATMEGA32 16PU micro-controller with usbtiny programmer ( AVR Pocket programmer by sparkfun), using winavr software from scourforge and also its appropriate driver. However, i encounter the following error :

C:\>avrdude -c usbtiny -p m32

avrdude: initialization failed, rc=-1
Double check connections and try again, or use -F to override
this check.


avrdude done. Thank you.


C:\>


I have check the wire connections and it is all correct.

I also try other commands, but all with errors in the initialization, signature,


C:\>avrdude -c usbtiny -p m32

avrdude: initialization failed, rc=-1
Double check connections and try again, or use -F to override
this check.


avrdude done. Thank you.


C:\>


C:\>avrdude -c usbtiny -p m32 -F -v

avrdude: Version 5.5, compiled on Apr 7 2008 at 17:09:42
Copyright (c) 2000-2005 Brian Dean, https://www.bdmicro.com/

System wide configuration file is "C:\WinAVR-20080430\bin\avrdude.conf"

Using Port : lpt1
Using Programmer : usbtiny
AVR Part : ATMEGA32
Chip Erase delay : 9000 us
PAGEL : PD7
BS2 : PA0
RESET disposition : dedicated
RETRY pulse : SCK
serial program mode : yes
parallel program mode : yes
Timeout : 200
StabDelay : 100
CmdexeDelay : 25
SyncLoops : 32
ByteDelay : 0
PollIndex : 3
PollValue : 0x53
Memory Detail :

Block Poll Page Polled
Memory Type Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack
----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
eeprom 4 10 64 0 no 1024 4 0 9000 9000 0xff 0xff
flash 33 6 64 0 yes 32768 128 256 4500 4500 0xff 0xff
lfuse 0 0 0 0 no 1 0 0 2000 2000 0x00 0x00
hfuse 0 0 0 0 no 1 0 0 2000 2000 0x00 0x00
lock 0 0 0 0 no 1 0 0 2000 2000 0x00 0x00
signature 0 0 0 0 no 3 0 0 0 0 0x00 0x00
calibration 0 0 0 0 no 4 0 0 0 0 0x00 0x00

Programmer Type : USBtiny
Description : USBtiny simple USB programmer, https://www.ladyada.net/make/usbtinyisp/
avrdude: programmer operation not supported

avrdude: Using SCK period of 10 usec
avrdude: initialization failed, rc=-1
avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.02s

avrdude: Device signature = 0x000000
avrdude: Yikes! Invalid device signature.
avrdude: Expected signature for ATMEGA32 is 1E 95 02
avrdude: safemode: lfuse reads as 0
avrdude: safemode: hfuse reads as 0

avrdude: safemode: lfuse reads as 0
avrdude: safemode: hfuse reads as 0
avrdude: safemode: Fuses OK

avrdude done. Thank you.


C:\>


Would you please help me ?


Thank you very much.

Best Regards,
KFCh :)
 

There is a front end http://avr8-burn-o-mat.aaabbb.de/avr8_burn_o_mat_avrdude_gui_en.html that can make access easier.

I'm not sure what is the problem in your case, have you reprogrammed that microcontroller before?
Any chance that you have written wrong fuse settings?

Hi Alexan_e,

Many thanks for helping me. With your method, I have successfully program the ATMEGA32 using tinyusb as shown below. You are the best !

C:\WinAVR-20080430\bin\avrdude.exe -C C:\WinAVR-20080430\bin\avrdude.conf -p m32 -P usb -c usbtiny -U flash:w:C:\Documents and Settings\MUSIC\Desktop\LEDon\main.hex:a

avrdude.exe: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.02s

avrdude.exe: Device signature = 0x1e9502
avrdude.exe: NOTE: FLASH memory has been specified, an erase cycle will be performed
To disable this feature, specify the -D option.
avrdude.exe: erasing chip
avrdude.exe: reading input file "C:\Documents and Settings\MUSIC\Desktop\LEDon\main.hex"
avrdude.exe: input file C:\Documents and Settings\MUSIC\Desktop\LEDon\main.hex auto detected as Intel Hex
avrdude.exe: writing flash (158 bytes):

Writing | ################################################## | 100% 0.11s

avrdude.exe: 158 bytes of flash written
avrdude.exe: verifying flash memory against C:\Documents and Settings\MUSIC\Desktop\LEDon\main.hex:
avrdude.exe: load data flash data from input file C:\Documents and Settings\MUSIC\Desktop\LEDon\main.hex:
avrdude.exe: input file C:\Documents and Settings\MUSIC\Desktop\LEDon\main.hex auto detected as Intel Hex
avrdude.exe: input file C:\Documents and Settings\MUSIC\Desktop\LEDon\main.hex contains 158 bytes
avrdude.exe: reading on-chip flash data:

Reading | ################################################## | 100% 0.08s

avrdude.exe: verifying ...
avrdude.exe: 158 bytes of flash verified

avrdude.exe done. Thank you.



Once again, Thank you very much for your help.


Cheers !
KFCh :-D
 

Attachments

  • flash successfully written.JPG
    flash successfully written.JPG
    145.3 KB · Views: 175

Great, I use the application too for AVRs, the only problem with burn-o-mat is that it can't read/write the security fuses (if needed), doesn't include many new devices (but you can add them if you wish) and can't read the calibration bytes (for internal RC adjustment).
For these you have to use the command line.
 

Great, I use the application too for AVRs, the only problem with burn-o-mat is that it can't read/write the security fuses (if needed), doesn't include many new devices (but you can add them if you wish) and can't read the calibration bytes (for internal RC adjustment).
For these you have to use the command line.

Hi Alexan_e,

Thank you for the information. I just started to use it now and not using those features at the moment ,., but will need it in future. You are excellent :-D

Cheers!

KFCh
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top