V-USB on ATMega162

General discussions about V-USB, our firmware-only implementation of a low speed USB device on Atmel's AVR microcontrollers
Post Reply
gknigh_t
Posts: 2
Joined: Tue Dec 22, 2009 5:26 am

V-USB on ATMega162

Post by gknigh_t » Tue Dec 22, 2009 5:52 am

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?

christian
Objective Development
Objective Development
Posts: 1443
Joined: Thu Nov 09, 2006 11:46 am

Re: V-USB on ATMega162

Post by christian » Tue Dec 22, 2009 5:19 pm

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.

Post Reply