Ik trying to get a pretty precicely timed output with avr-usb, but i've got a small problem:
Because the mcu (attiny45) does not have a 16 bit timer ia have to partialy use software to make the output signal.
This mostly works without a problem, but if I start communicating with the device the usb interrupts mess the timing up.
At the moment I use cli() and sei() before and after the timing-crucial part, which makes the crucial part work fine with a consistent timing, but it has a problem.
During that time (which is about 10% of the running time) usb communication doesn't work and if I send signals to the device during that period (to change the output) I get errors.
There is plenty of time to get proper commincation since most of the time the device can be reached, but in batched mode there are to much errors to just ignore.
Is there some setting or message to send to the computer that says "don't communicate right now, i'm busy"?
I think disconnecting from the bus and reconnecting 50 times a second is not the solution
FYI: I'm building a miniature version to control a servo via usb using the attiny45 to get a controller about the same size as an usb-b plug.