blank atmega16u2 need firmware to enumerate usb

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

Hello all,

i have 2 circuit boards with the 16u2 cpu. I used a usbTiny device connected to the cpu's SPI interface to do 1)full chip erase, 2)unlock the lock bits, 3)program the LOW, HIGH, and EXTENDED fuse bits with different values. 4)Verified the new values. Did this on both boards.

then i took one of the boards and connected direct to computer USB, verified with Device Manager, ran Arduino IDE, and programmed the chip with an Arduino bootloader. success.

But the second board will not enumerate on the computer USB. Dunno why but now i guess i need to program the chip again by SPI with the Microchip USB firmware. But i can't find that firmware.

Anybody know where to get it?

thanx, mike

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

ATmega16U2 - 8-bit AVR Microcontrollers

[Documents tab, bottom]

Software Libraries/Firmware

[megaAVR USB DFU bootloaders]

"Dare to be naïve." - Buckminster Fuller

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

well the firmware that they have available doesn't seem to include the firmware for the 16u2.

the download file includes 4 different .hex files:

 at90usb128-bl-usb-1_0_1.hex

 at90usb162-bl-usb-1_0_1.hex

 at90usb64-bl-usb-1_0_1.hex

 at90usb82-bl-usb-1_0_1.hex

these are different chips with no word about which (if any) will work for the 16u2.

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

mikewax wrote:
i have 2 circuit boards with the 16u2 cpu.

 

Are the two boards identical?

Are the two boards homemade or purchased fully assembled?

 

Since you have an ISP programmer, why not download a

"blink a LED" test program and see if it works.  Have the program

blink the LED once per second and time the blinks.  This will verify

that the cpu clock is running at the frequency that you think it is.

 

Once that works, you can explore why the USB didn't enumerate

for that board.

 

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

yes they are two of the same that i designed, ordered from OshPark and i assembled them.

Same fuse values and Xtal frequency.

And yes i'll do that tomorrow and see.....

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

One of the documents referenced on gchapman's link in #2.

 

http://ww1.microchip.com/downloads/en/Appnotes/doc8224.pdf

 

Title:       AVR530: Migrating from AT90USB162/82 to ATmega16U2/8U2

Name:    AN_8224

Date:      12/10/2016

The ATmega16U2/8U2 is a functionally identical, drop-in replacement for the AT90USB162/82.  

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

well ok i programmed it with the ISP to blink every 60 seconds and it was spot on, then when i connected it to USB it did enumerate. Don't know why but it works now. i'll never know what was wrong.

thanx

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

...... oh .... i missed it

thanx i would not have found it.