Sorry guys for possibly beating a dead horse here. I am trying to get AVR-USB working on the ATMega162 as well.
I have got the device running of a 12MHz external crystal with the appropriate fuse bits set.
The problem is that I am using UART0 for serial comms and both INT0/1 pins are given to USB.
PD2/INT0 is D+
PD3/INT1 is D-
TCCR0 = 0x05.
In usbconfig.h I have
#define USB_CFG_IOPORTNAME D
#define USB_CFG_DMINUS_BIT 2
#define USB_CFG_DPLUS_BIT 3
I am using AVR Studio with WinAVR installed.
When I plug in the USB, the PC recognizes the device and displays the device name I specified in usbconfig.h
After that, I am unable to successfully issue single key commands over USB to the PC.
What I did is take the example http://www.obdev.at/products/vusb/hidkeys.html and graft the code into AVR studio for ATMega162.
Are there any TIMER/Interrupt related settings that I have missed?
V-USB on ATMega162
Re: V-USB on ATMega162
Since the PC recognizes the device by name, USB communication is working as such. There must be an issue with I/O ports for key inputs.