I just finished the powerSwitch project using ATMega168.
It states in the usbconfig.h that any pin in the port can be used as D-
#define USB_CFG_DMINUS_BIT 3
/* This is the bit number in USB_CFG_IOPORT where the USB D- line is connected.
* This may be any bit in the port.
But when I use PD4 as D-, it doesn't work.
When I use PD3 as D- ( as in the USB UART Bridge CDC project by Osamu Tamura ), it works OK.
PowerSwitch using ATMega168
Re: PowerSwitch using ATMega168
What pin is D+ on? Which interrupt is being used? INT0 looks to be on PD2, and INT1 on PD3, and only PCINT on PD4. By default it uses INT0 (PD2).
Re: PowerSwitch using ATMega168
The D+ is PD2 ( INT0 ) as required.