Precise timming?
Posted: Thu Jan 06, 2011 11:43 am
Hello...
I wan't to know if it's possible to make pulse of precise lengh't without to disturb USB interface.
Best to explain with example.
I had DS1820 thermometer and wan't to control it with VUSB. The timming is precise and longest pulse is 500uS logg (reset) and the data pulses are shorter than 120uS.
So if I wish to make precise 500uS pulse I should dissable interrupt to have precise timing. But dissabling interrupt fot that long is not good as just few cycles are alowed.
So I just think in other way.
If I understand usb correctly the transfer starts every milisecond and after packet is send then just wait another 1ms frame.
Is there a way to know when transaction is ended and how long was is.?
Ie If I know that last transaction was 300uS long and know that is ended 'right now' then I can make pulse with simple loop for 700us long as I know that no interrupt can be generated until next 1ms frame.
Is possible to got such information?
Thanks.
I wan't to know if it's possible to make pulse of precise lengh't without to disturb USB interface.
Best to explain with example.
I had DS1820 thermometer and wan't to control it with VUSB. The timming is precise and longest pulse is 500uS logg (reset) and the data pulses are shorter than 120uS.
So if I wish to make precise 500uS pulse I should dissable interrupt to have precise timing. But dissabling interrupt fot that long is not good as just few cycles are alowed.
So I just think in other way.
If I understand usb correctly the transfer starts every milisecond and after packet is send then just wait another 1ms frame.
Is there a way to know when transaction is ended and how long was is.?
Ie If I know that last transaction was 300uS long and know that is ended 'right now' then I can make pulse with simple loop for 700us long as I know that no interrupt can be generated until next 1ms frame.
Is possible to got such information?
Thanks.