<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-gb">
	<link rel="self" type="application/atom+xml" href="https://forums.obdev.at/app.php/feed/topic/5317" />

	<title>Objective Development Forums</title>
	
	<link href="https://forums.obdev.at/index.php" />
	<updated>2012-06-07T13:19:53+02:00</updated>

	<author><name><![CDATA[Objective Development Forums]]></name></author>
	<id>https://forums.obdev.at/app.php/feed/topic/5317</id>

		<entry>
		<author><name><![CDATA[Anonymous]]></name></author>
		<updated>2012-06-07T13:19:53+02:00</updated>

		<published>2012-06-07T13:19:53+02:00</published>
		<id>https://forums.obdev.at/viewtopic.php?t=5317&amp;p=21794#p21794</id>
		<link href="https://forums.obdev.at/viewtopic.php?t=5317&amp;p=21794#p21794"/>
		<title type="html"><![CDATA[Re: Precise timming?]]></title>

		
		<content type="html" xml:base="https://forums.obdev.at/viewtopic.php?t=5317&amp;p=21794#p21794"><![CDATA[
Hello, have You already solved this issue? Can U provide the code fragment?<br />I have the same problem, generating I2C packet S|ADDR|P which takes too long and is disturbed by USB (maybe because the device reacts any low-speed request no matter what device it targets?), so I tried to finish usbPoll() as soon as possible, disable USB by clearing the USB_INTR_ENABLE &amp;=~ (1 &lt;&lt; USB_INTR_ENABLE_BIT); and doing my transfer - then enabling the USB_INTR_ENABLE again. Then the main loop calls the usbPoll().<br />Timing was fine now but my nBytes=usb_control_msg() too often fails from nBytes&lt;0 (STALL?). I have already spent two weeks on it, please help...<p>Statistics: Posted by Guest — Thu Jun 07, 2012 1:19 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[eslavko]]></name></author>
		<updated>2011-01-06T12:57:00+02:00</updated>

		<published>2011-01-06T12:57:00+02:00</published>
		<id>https://forums.obdev.at/viewtopic.php?t=5317&amp;p=17184#p17184</id>
		<link href="https://forums.obdev.at/viewtopic.php?t=5317&amp;p=17184#p17184"/>
		<title type="html"><![CDATA[Re: Precise timming?]]></title>

		
		<content type="html" xml:base="https://forums.obdev.at/viewtopic.php?t=5317&amp;p=17184#p17184"><![CDATA[
.. to describe idea in detail.<br /><br />I observe pulses with osciloscope. When no data transfer is in place the D- line get's Low pulse every milisecond. The D+ is all time low. When transfer is in place the both lines are toogling.<br />So idea is like that.<br /><br /><strong class="text-strong">in main loop.</strong><br />Reset 'interupt' flag.<br />wait until 'interrupt' flag is set OR D- is read LOW<br />wait 3 bit time ' to get interrupt if SOF is received<br /><br />if 'interrupt' flag is reset then <br />  we have near 1ms time free (no interrupt's can occour in that time)<br />  so do the job here<br />  if 'interrupt' flag is set then our job take to long (it was disturbed with interrupt)<br />end if<br /><br /><br />and in USB_SOF_HOOK we just set 'interrupt' flag<br /><br />Is that make sense?<p>Statistics: Posted by <a href="https://forums.obdev.at/memberlist.php?mode=viewprofile&amp;u=4732">eslavko</a> — Thu Jan 06, 2011 12:57 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[eslavko]]></name></author>
		<updated>2011-01-06T11:43:10+02:00</updated>

		<published>2011-01-06T11:43:10+02:00</published>
		<id>https://forums.obdev.at/viewtopic.php?t=5317&amp;p=17183#p17183</id>
		<link href="https://forums.obdev.at/viewtopic.php?t=5317&amp;p=17183#p17183"/>
		<title type="html"><![CDATA[Precise timming?]]></title>

		
		<content type="html" xml:base="https://forums.obdev.at/viewtopic.php?t=5317&amp;p=17183#p17183"><![CDATA[
Hello...<br /><br />I wan't to know if it's possible to make pulse of precise lengh't without to disturb USB interface.<br />Best to explain with example.<br />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.<br />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.<br />So I just think in other way.<br />If I understand usb correctly the transfer starts every milisecond and after packet is send then just wait another 1ms frame.<br />Is there a way to know when transaction is ended and how long was is.? <br />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.<br />Is possible to got such information?<br /><br />Thanks.<p>Statistics: Posted by <a href="https://forums.obdev.at/memberlist.php?mode=viewprofile&amp;u=4732">eslavko</a> — Thu Jan 06, 2011 11:43 am</p><hr />
]]></content>
	</entry>
	</feed>
