[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [avr-chat] mega32 with usbtiny
From: |
Erik Christiansen |
Subject: |
Re: [avr-chat] mega32 with usbtiny |
Date: |
Mon, 23 May 2016 18:24:27 +1000 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
On 23.05.16 09:53, Kimson Muriungi wrote:
> Hey guys. I recently bought an atmega32, which i tried initializing with
> the usbtiny programmer ... avrdude -c usbtiny -p m32... but all it keeps
> saying is avrdude: initialization failed rc-1. I've counter-checked the
> connections almost 1000 times now but nothing seems to be the problem with
> the wiring. I also added an external crystal oscillator of 16MHz alongside
> 2 22pf ceramic capacitors to ground and still nothing. Besides, I also
> connected all GND pins to ground and also powered the AVCC in vain. I
> thought maybe the chip was faulty, so I bought another one. However,
> nothing changed. This is really bad. Some help please. Maybe there's
> something i ain't doing right? I also tried powering the chip seperately
> hoping that maybe the usbtiny wasn't supplying enough power but that wasn't
> the issue. The rest of the micro-controllers that i purchased alongside,
> are working perfectly (attiny13a, atmega328p attiny 2313)...Please help.
You've addressed several of the causes of failure which come to mind, but
the following may help:
Adding the 16MHz crystal will not help while the default CKSEL fuse
bits are still at the default 0001 = Internal RC Oscillator @ 1MHz.
The avrdude manpage description for the -B option reveals that the
default bitclock rate is unsuitable for chip clockrates below 4 MHz, so
you'll need to add something like "-B 20" to your command line.
That is probably the problem, but if not, does adding one or more "-v"
to the avrdude command line yield any additional clues?
If you try with "-F -v", do you get a bunch of output, including hfuse
and lfuse values? If so, what are they? (If it's still not OK)
Have you measured the supply voltage between Vcc and GND?
(Even a little $12 multimeter can be quite good, and indispensable.)
Did you remove the "export" jumper on the usbtiny before connecting the
external supply? It is easy to damage a programmer by forgetting that.
Safest is to export power, and measure voltage if in doubt about
loading.
Good luck with your chips.
Erik