ATmega32U4 Programming

Go To Last Post
23 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi all,
I'm trying to program ATmega32U4 fresh(blank)chip with avrdude and USBasp, but not able to do it.

First of all this is the circuit I'm using

Is there anything wrong with the connections?
I have tried with Two 22pF capacitor and 16MHz crystal too but I'm getting the following error,

avrdude: error: programm enable: target doesn't answer. 1
avrdude: initialization failed, rc=-1
Double check connections and try again, or use -F to override
this check.

Does anyone know what this error for?
Thanks

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:

I'm trying to program ATmega32U4 fresh(blank)chip with avrdude and USBasp, but not able to do it.

If it's "fresh" why wouldn't you just use Flip on the PC to connect to the DFU that's already inside the 32U4?!?

(no point in messing up the bootloader using ISP)

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Thanks!

How to use FLIP? where to find more info?
awaiting swift responce!!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

What does Google say about "AVR Flip DFU"?

My Google gives this PDF as the top link: http://www.google.co.uk/url?sa=t...

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Yes
1. I have got that pdf (Datasheet)
2. I've downloaded Flip from Atmel's website
3. Connected MCU with Laptop via USB port but it doesn't detect as USB device nor asks for Driver!
4. Selected Communication medium in FLIP but got the message, "Could not open USB device"

:-(

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:

3. Connected MCU with Laptop via USB port but it doesn't detect as USB device nor asks for Driver!

You have got an 8MHz or 16MHz crystal attached to the chip haven't you?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

yes 16MHz, Vbus and Vcc are connected to USB +5V

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Do i need to install any extra Drivers?
What is this usbcan32.dll and vcand32.dll for?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:

Do i need to install any extra Drivers?
What is this usbcan32.dll and vcand32.dll for?

Any drivers for DFU will have been installed when you installed the Flip software.

When you plug the powered USB chip into the PC what does usbdeview.exe (free download if you haven't got it already) say about the enumeration of the AVR ?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

It doesn't detect... :-(

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Then all you can do is double check the wiring I guess. Is there any chance when you were trying to use ISP that you may have erased the chip? If so this will have lost DFU and may explain why the thing won't connect. Also, to use DFU you have to set up special hardware conditions involving HWB (amongst other thigns0 - have you done this - that's what triggers it to run the bootloader instead of the (currently non-existent) application code.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

its a blank chip..never got connected in ISP by avrdude so its unlikely that it has been erased!
I have HWB in not connected position, i've tried with HWB connected to ground with 100Ohm resistor also but no joy!
i'm just wondering if its a blank chip then how would it be detected by PC as USB device??

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

First of all i need to install Flip into the MCU then DFU is that correct?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:

First of all i need to install Flip into the MCU then DFU is that correct?

No. Flip is (Java) software you run on the PC and DFU is AVR software that should have come preloaded in that AVR.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Does the brand new chip come with DFU preloaded?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

how can i check/est if the chip has DFU or not?
and if it doesn't has then how can I install it?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

No reply ?? :-((
Has anyone tried programming a blank ATmega32u4 chip??
Plz help!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Clawson
I've bought ATmega32U4 chip from RS Compnents.
R u sure it always comes with DFU preloaded on it?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Yes I'm sure that all the USB chips apart from the 8K ones (sometimes) come with DFU loaded and the fuses set so they'll start clocking from an externally attached crystal.

(sorry for delay in reply but some of us have to sleep you know!)

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Not only did the OP cross post (now locked by Cliff) - I also assume he PMed more than me. Talk about nagging for special attention. Spoiled brat.

Cliff wrote:
If it's "fresh" why wouldn't you just use Flip on the PC to connect to the DFU that's already inside the 32U4?!?

Because it is a piece of crap software written by java programmers, e.g. that does not care to handle the exceptions that are thrown?

As of January 15, 2018, Site fix-up work has begun! Now do your part and report any bugs or deficiencies here

No guarantees, but if we don't report problems they won't get much of  a chance to be fixed! Details/discussions at link given just above.

 

"Some questions have no answers."[C Baird] "There comes a point where the spoon-feeding has to stop and the independent thinking has to start." [C Lawson] "There are always ways to disagree, without being disagreeable."[E Weddington] "Words represent concepts. Use the wrong words, communicate the wrong concept." [J Morin] "Persistence only goes so far if you set yourself up for failure." [Kartman]

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Well. I guess that means Johan, Cliff, David(me), ...

I am sure that the OP has got some very valid questions.
If she did a bit of googling, she would have a got a good start.

Subsequent questions would be useful to the rest of the forum. Seeking individual attention means that others get no benefit.

David.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:

If she did a bit of googling,

She might actually want to start with the datasheet and then perhaps move on to a document search at atmel.com - it seem that most people who buy Atmel USB chips are able to determine how to use them - unless they are psychic I'm guessing they get all they need from the PDFs

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Finally!
I got it working!
There were couple of traces broken on the PCB.

Thanks a lott everyone!
Especially Clawson for your endeavor efforts to reply me back and David for answering via PM.
@JohanEkdahl: Get a life mate!