Code: Select all
#define USB_INTR_CFG EICRA /* not MCUCR */
/* #define USB_INTR_CFG_SET ((1 << ISC00) | (1 << ISC01)) */
/* #define USB_INTR_CFG_CLR 0 */
#define USB_INTR_ENABLE EIMSK /* not GIMSK */
/* #define USB_INTR_ENABLE_BIT INT0 */
#define USB_INTR_PENDING EIFR /* not GIFR */
/* #define USB_INTR_PENDING_BIT INTF0 */
ATMEL changed some register names with Atmega48/88/168, so V-USB needs these changes to let the driver enable external interrupt INT0. Wondering why I got no error messages before changing this like for TCCR0 and TIFR (has to be TCCR0B and TIFR0). My Atmega48 works fine with 12 MHz, 5 V from USB and 68 Ohm / 3,6V zener diodes at the data lines.
Of course don´t forget to uncheck the CLKDIV8-fuse and it is a good idea to use the latest usbdrv from 11-2008 even with the older projects.