Author Topic: Atmega32u4 bootloading and drivers.  (Read 5696 times)

0 Members and 1 Guest are viewing this topic.

Offline ARGLaserTopic starter

  • Contributor
  • Posts: 32
  • Country: ca
Atmega32u4 bootloading and drivers.
« on: April 30, 2013, 03:38:54 am »
Hey Everyone,

I'm trying to integrate a bare Atmega32u4 chip into my own board instead of relying on an Arduino.

I've managed to bootload it using an Arduino as an ISP with the Leonardo bootloader, but when I plug it into USB it says unrecognized device and the Arduino drivers do not work.
Am I doing somthing wrong? I can't figure out why the drivers wont work since it bootloaded.  :-//

This is how I've got it hooked up:


I'm still new to AVR and I'm probably in over my head, but if someone could help me out that would be most appreciated :)
 

Offline TerminalJack505

  • Super Contributor
  • ***
  • Posts: 1310
  • Country: 00
Re: Atmega32u4 bootloading and drivers.
« Reply #1 on: April 30, 2013, 03:45:14 am »
Did you program the fuses with the proper values to enable the external crystal and disable the prescaler, etc?
 

Offline Harvs

  • Super Contributor
  • ***
  • Posts: 1202
  • Country: au
Re: Atmega32u4 bootloading and drivers.
« Reply #2 on: April 30, 2013, 03:46:34 am »
On whatever type of system you're on, retrieve the vid and pid for the device with it plugged in (Google will tell you how for your operating system.) then compare that to vid and pid of the ardiuno.
 

Offline ARGLaserTopic starter

  • Contributor
  • Posts: 32
  • Country: ca
Re: Atmega32u4 bootloading and drivers.
« Reply #3 on: April 30, 2013, 03:55:10 am »
I had no idea about fuses up until this point, how do I program them?

I just found this: http://www.ladyada.net/learn/avr/fuses.html but it doesn't explain how to set them.
 

Offline TerminalJack505

  • Super Contributor
  • ***
  • Posts: 1310
  • Country: 00
Re: Atmega32u4 bootloading and drivers.
« Reply #4 on: April 30, 2013, 04:16:40 am »
What I would do, so far as the fuses go, is use avrdude from the command line.  avrdude was installed as part of the Arduino IDE so you'll find it somewhere on your system.  You can use the terminal mode to see how the fuses are currently programmed.  It looks like "burn bootloader" from the Arduino IDE actually does program the fuses, though, so that may not be the problem.  It wouldn't hurt to double-check, however.

Are you sure you have the right pinout for the USB connector?  It looks like D+ and D- might be swapped.  D- is usually shown as pin 2 and D+ is pin 3.  Of course pin numbers are completely arbitrary so it may be fine.
 

Offline ARGLaserTopic starter

  • Contributor
  • Posts: 32
  • Country: ca
Re: Atmega32u4 bootloading and drivers.
« Reply #5 on: April 30, 2013, 04:53:53 am »
That solved my problems, the USB connector was indeed backwards! Many thanks to you TerminalJack!  :)
 

Offline TerminalJack505

  • Super Contributor
  • ***
  • Posts: 1310
  • Country: 00
Re: Atmega32u4 bootloading and drivers.
« Reply #6 on: April 30, 2013, 04:59:16 am »
 :-+
 

Offline bingo600

  • Super Contributor
  • ***
  • Posts: 1988
  • Country: dk
Re: Atmega32u4 bootloading and drivers.
« Reply #7 on: April 30, 2013, 04:59:25 am »
This one is rather nice
http://www.engbedded.com/fusecalc

Even tells the avrdude commandline (if you know the fuse settings)

/Cfo
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf