Search found 6 matches

by guscrown
Sat Apr 18, 2015 6:20 pm
Forum: V-USB
Topic: Verify correct enumeration?
Replies: 1
Views: 3569

Re: Verify correct enumeration?

If anybody else is wondering you can use usbDeviceAddress, I believe it is a global variable; if it's "0" it means the device was not enumerated. If it's different than "0" it means it was. Alternatively, people have been using usbSofCount to monitor the host-device link, but to ...
by guscrown
Sat Apr 18, 2015 12:24 am
Forum: V-USB
Topic: Verify correct enumeration?
Replies: 1
Views: 3569

Verify correct enumeration?

Is there a way to confirm correct enumeration? This way we can trigger a "disconnect" and "reconnect" to attempt enumeration again. Or what about a way to tell if the device was de-enumerated?
by guscrown
Tue Apr 14, 2015 3:48 am
Forum: V-USB
Topic: usbPoll() from a timer interrupt?
Replies: 4
Views: 6750

Re: usbPoll() from a timer interrupt?

My main routine is not clogged at all, it's basically scanning the keypad matrix and sending the keypress data to the host, and that's it. I just thought it would be more elegant to guarantee a constant usbPoll() every x milliseconds if I did it with a timer interrupt. By the way, since you have ton...
by guscrown
Tue Apr 14, 2015 3:25 am
Forum: V-USB
Topic: Arduino IDE able to write and compile code?
Replies: 1
Views: 3816

Re: Arduino IDE able to write and compile code?

Adafruit has an example of a USB HID Keyboard using their Trinket and Pro Trinket (both Arduino compatible) using V-USB. You should check it out, and yes it compiles with Arduino IDE.

https://learn.adafruit.com/pro-trinket- ... d/examples
by guscrown
Sat Apr 11, 2015 6:45 am
Forum: V-USB
Topic: usbPoll() from a timer interrupt?
Replies: 4
Views: 6750

Re: usbPoll() from a timer interrupt?

Thanks for the reply. I've been reading the example project's code and nobody does it like that, everybody is simply polling in the for() loop. Might as well use a proven method. In my mind guarantying a 5ms usbPoll() cycle would provide more stability to the system.
by guscrown
Sat Apr 11, 2015 5:59 am
Forum: V-USB
Topic: usbPoll() from a timer interrupt?
Replies: 4
Views: 6750

usbPoll() from a timer interrupt?

I've been working on making a USB Keypad for a project I'm doing, and so far it is working fine. I decided to utilize timer1 to create a timer interrupt (overflow type) that triggers every 5ms. I use the interrupt to run the usbPoll() function for my keypad. Is this a bad idea? Is it just better to ...