AVR USB on Atmega88

General discussions about V-USB, our firmware-only implementation of a low speed USB device on Atmel's AVR microcontrollers
Post Reply
ArtemRu
Posts: 2
Joined: Sun Dec 14, 2008 1:28 pm
Location: Moscow, Russia
Contact:

AVR USB on Atmega88

Post by ArtemRu » Sun Dec 14, 2008 1:33 pm

hello! I am trying to port my usb dance pad to Atmega88

http://www.avrfreaks.net/index.php?modu ... em_id=1675

Fixed timer names in the code and just replaces atmega8 with atemega88 on the pcb expecting it to work.

I am using atmega88-20 at 16Mhz

The weird thin is that AVR USB does not work. Windows says "device is not recognized". I have found some messages about it on google and here but never found a single solution.

Does AVR USB work with atmega88 at all?

I have disabled UART and external T0 line at the beginning of my code to avoid any interference. It did not help.

I replaces atmega88 with atmega8 and programmed with the atmega8 code version - everything works. So, it is not the schematic, it is something related to atmega88 features.

Grendel
Rank 4
Rank 4
Posts: 167
Joined: Sat Dec 16, 2006 9:53 pm
Location: Oregon, USA
Contact:

Post by Grendel » Tue Dec 16, 2008 3:12 am

Link above is broken.

- make sure the fuses are correct, they are different for m8 and m88
- make sure you recompile the project w/ MCU=atmega88
- are you using 3V3 Z-diodes on D+/D- ? If so, replace them w/ 500mW 3V6 diodes.
- if you run the m88 at 3.3V, change it to 5V @ 16MHz. Use Z-diodes.
- Atmel has a m8 to m88 migration guide online here.

ArtemRu
Posts: 2
Joined: Sun Dec 14, 2008 1:28 pm
Location: Moscow, Russia
Contact:

Post by ArtemRu » Tue Dec 16, 2008 10:42 am

Link above is broken.

try this one:
http://www.artemlive.com/cgi-bin/news?c=v&id=749

- make sure the fuses are correct, they are different for m8 and m88


Fuses are correct. I've read the datasheet. The mcu is at 16Mhz and i checked it.

- make sure you recompile the project w/ MCU=atmega88


yes, i did

- are you using 3V3 Z-diodes on D+/D- ? If so, replace them w/ 500mW 3V6 diodes.


i use 3.6V

- if you run the m88 at 3.3V, change it to 5V @ 16MHz. Use Z-diodes.


i run mcu at 5V and use zener dioides 3.6v
- Atmel has a m8 to m88 migration guide online here.


thanks, i'll take a look, but my part of software works fine. Only AVR USB does not work. I have already ported my times routines and some other stuff to atmega88 just reading the datasheet for 88. I've checked - my part works fine.

Did you personally run AVR USB on atmega88?

Grendel
Rank 4
Rank 4
Posts: 167
Joined: Sat Dec 16, 2006 9:53 pm
Location: Oregon, USA
Contact:

Post by Grendel » Wed Dec 17, 2008 12:37 am

Almost :) I was redesigning my mega8 based project and actually got a mega88. Ended up using a tiny461 instead, since it has exactly the right size for what I need. I did look at the 88 specs in detail tho and I also ran into similar problems w/ the 461 (the 461 uses a newer chip design, similar to the 88 ) -- 3V3 diodes would work on the 8 but not on the 461, had to use 3V6 diodes. Also the pull-up on D- is a lot more sensitive to value variations on the 461. I nailed it down to changes in the I/O pin thresholds and hysteresis, you can find those values in the data sheets under "Typical Characteristics". Assuming 4.5V at 25C the values for the chips are approx.:

Code: Select all

      high   low
m8:   1.70V  1.25V
m88:  2.25V  2.15V
t461: 2.30V  1.95V


This nicely explains why 3V3 ZDs would work w/ the m8 but not the t461. You may have a similar problem, try leaving the diodes out (works on some hosts) or changing them to 3V7 or 3V8 ZDs.

Post Reply