5
\$\begingroup\$

I'm working on a V-USB (aka AVR-USB) -based circuit running at 5V (i.e. two 3.6V Zeners across D+ & D-) and at 12MHz. I tried an ATmega88P instead of the ATmega88 chips I normally use and I can't get the circuit to enumerate. The Atmel appnotes on mega88->mega88P migration don't describe any obvious gotchas.

Anyone have any experience/tips with the differences in ATmega88P chips?

\$\endgroup\$
1
  • \$\begingroup\$ That'll teach me to not read the question properly. Deleted my answer as it merely referred to the same sheet mentioned by todbot as: "The Atmel appnotes on mega88->mega88P migration". \$\endgroup\$
    – Amos
    Dec 2, 2009 at 20:42

1 Answer 1

2
\$\begingroup\$

The problem is that the AVR-GCC library file "iom88p.h" for the ATmega88P (and similar files for ATmega168P and ATmega328P) is broken. It doesn't define the SIG_INTERRUPT0 interupt vector handler and only defines the alternate handler name of INT0_vect. The V-USB assembly code uses SIG_INTERRUPT0 and for some reason avr-as doesn't pick up the null define.

This library problem is also why you can no longer use defines like "PC3" in Arduino and must instead use "PORTC3".

The solution in the case of V-USB is to go into the "usbconfig.h" for your project and add:

     #define USB_INTR_VECTOR         INT0_vect

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.