Search found 456 matches

Go to advanced search

by ulao
Fri Jan 26, 2018 7:28 pm
Forum: V-USB
Topic: D+ and D- on different ports
Replies: 2
Views: 127

Re: D+ and D- on different ports

This should be relatively easy by adding a
USB_CFG_IOPORTNAME1
and
USB_CFG_IOPORTNAME2
and just doing a rename in the correct files and pay attention to the changes where minus and plus pins are used.
by ulao
Mon Dec 11, 2017 7:43 pm
Forum: V-USB
Topic: ATmega328p with internal RC oscillator?
Replies: 6
Views: 275

Re: ATmega328p with internal RC oscillator?

The 328's internal clock is not very accurate. v-usb requires a solid clock. You may get it to work by adjust the internal RC oscillator but this is going to take a lot of critical timing.. More on that here. https://forums.obdev.at/viewtopic.php?t=8819 or go int free https://cpldcpu.wordpress.com/2...
by ulao
Tue Nov 14, 2017 6:38 pm
Forum: V-USB
Topic: Simultaneous In and Out interrupt transfers
Replies: 6
Views: 422

Re: Simultaneous In and Out interrupt transfers

I have tried that but it didn't work out well for all systems. There is too much overhead in the OS that many times the application will be delayed and end up overrunning. One thing that helped was to set the thread to high priority but still had issues. If you close all other application it also wi...
by ulao
Tue Nov 14, 2017 6:36 pm
Forum: V-USB
Topic: v-usb not really good for control transfers after all.
Replies: 2
Views: 240

Re: v-usb not really good for control transfers after all.

Idea will not work because this function is only called based on the interrupt. I'd have to step back further. Unsure where to look at the moment, abandoning this idea for now.
by ulao
Fri Nov 10, 2017 7:49 pm
Forum: V-USB
Topic: Simultaneous In and Out interrupt transfers
Replies: 6
Views: 422

Re: Simultaneous In and Out interrupt transfers

Oh... no this is not well documented. Personally I think a disclaimer should have been put up (or maybe there is). V-usb loosely supports data input. I guess it is sort of expect, being this is a FM implementation of a hardware protocol but yeah, its not designed to preform as well as a hardware usb...
by ulao
Fri Nov 10, 2017 6:38 pm
Forum: V-USB
Topic: check if USB is idle
Replies: 2
Views: 389

Re: check if USB is idle

check for the arrest usbPoll(); //issue at least one for the check below if (USB_INTR_PENDING & (1<<USB_INTR_PENDING_BIT)) // Usbpoll() collided with data packet { uint8_t ctr; // loop takes 5 cycles asm volatile( " ldi %0,%1 \n\t" "loop%=: sbis %2,%3 \n\t" " ldi %0,%1 \...
by ulao
Fri Nov 10, 2017 6:32 pm
Forum: V-USB
Topic: Simultaneous In and Out interrupt transfers
Replies: 6
Views: 422

Re: Simultaneous In and Out interrupt transfers

Yeah, not going to happen. This is an over,kill but explains why https://forums.obdev.at/viewtopic.php?f=8&t=11102 The v-usb consumes the entire CPU to handle NAK until the driver is ready. You will have no choice but to wait for it to do its thing before sending out. Simultaneous is not achieva...
by ulao
Fri Nov 10, 2017 6:23 pm
Forum: V-USB
Topic: v-usb not really good for control transfers after all.
Replies: 2
Views: 240

Re: v-usb not really good for control transfers after all.

One small addition. It may be wise to check for the interrupt arrest before enabling. usbPoll(); //issue at least one for the check below if (USB_INTR_PENDING & (1<<USB_INTR_PENDING_BIT)) // Usbpoll() collided with data packet { uint8_t ctr; // loop takes 5 cycles asm volatile( " ldi %0,%1 ...
by ulao
Fri Nov 10, 2017 5:59 pm
Forum: V-USB
Topic: v-usb not really good for control transfers after all.
Replies: 2
Views: 240

v-usb not really good for control transfers after all.

If anyone has looked in to the v-usb on the wire you will learn a few things... sending the NACK consumes all the CPU time.and this can go on for quite a while. The host only stops sending IN packets right before the end of the frame, to avoid colliding with the 1 ms keep alive pulse. This finally l...
by ulao
Fri Oct 27, 2017 4:01 pm
Forum: V-USB
Topic: Is Data IN endpoint required for HID devices?
Replies: 1
Views: 323

Re: Is Data IN endpoint required for HID devices?

I'm getting confused by this as well. See my latest post. The EP0 I though had a default in? Thus no need to make another. I do know in some uses of v-usb it is absolutely needed to create another pipe. https://stackoverflow.com/questions/14129112/interfacing-a-libusb-device-powered-by-v-usb-library...
by ulao
Sun Oct 08, 2017 7:10 pm
Forum: V-USB
Topic: Using Pin change interrupt instead of INT0
Replies: 2
Views: 378

Re: Using Pin change interrupt instead of INT0

I find this rather interesting, could anyone explain the advantages/disadvantages or reason for wanting to do so? I'm thinking it would allow the device to sync to the usb poll better but not sure I follow the intention.
by ulao
Fri Sep 29, 2017 1:54 pm
Forum: V-USB
Topic: check if USB is idle
Replies: 2
Views: 389

Re: check if USB is idle

Been going down this road all month.... Do you use any control transfers? If so things get twice as hard. Assuming you have a normal interrupt based USB poll every 8-10ms you can tie everything to the usbpoll. Somewhere in your code you should have a line like so. while (!usbInterruptIsReady()) usbP...
by ulao
Fri Sep 29, 2017 1:47 pm
Forum: V-USB
Topic: USB\DEVICE_DESCRIPTOR_FAILURE
Replies: 1
Views: 331

Re: USB\DEVICE_DESCRIPTOR_FAILURE

added a 1k5 ohm pullup resistor to D- and 1m ohm pullup resistor to D+. Using the latest code examples that will not work. Or maybe you just failed to explain it right? The 1k5 goes from D- to the (normally middle pin) pull up pin. The Driver turns this pull up on and off. It may work with the righ...
by ulao
Wed Aug 23, 2017 4:54 am
Forum: V-USB
Topic: output report go right to usbfunctinowrite?
Replies: 6
Views: 674

Re: output report go right to usbfunctinowrite?

Turns out I must have had a corrupt, partial or old version of the driver. I had no reason to suspect that but changing a define blew up the code. So after I re downloaded to fix that I figure I better come back to this bug. Sure enough that also fixes this issue.
by ulao
Sat Aug 19, 2017 1:52 am
Forum: V-USB
Topic: output report go right to usbfunctinowrite?
Replies: 6
Views: 674

Re: output report go right to usbfunctinowrite?

I did as you suggested but still have the same issue? What can I look at to further this investigation.

Go to advanced search

cron