<?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/10735" />

	<title>Objective Development Forums</title>
	
	<link href="https://forums.obdev.at/index.php" />
	<updated>2017-02-16T18:58:53+02:00</updated>

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

		<entry>
		<author><name><![CDATA[kuro68k]]></name></author>
		<updated>2017-02-16T18:58:53+02:00</updated>

		<published>2017-02-16T18:58:53+02:00</published>
		<id>https://forums.obdev.at/viewtopic.php?t=10735&amp;p=31986#p31986</id>
		<link href="https://forums.obdev.at/viewtopic.php?t=10735&amp;p=31986#p31986"/>
		<title type="html"><![CDATA[Re: jitter in usbdrvasm16.inc]]></title>

		
		<content type="html" xml:base="https://forums.obdev.at/viewtopic.php?t=10735&amp;p=31986#p31986"><![CDATA[
Thanks for this. I'm interesting in integrating it into my code. I've noticed the jitter too. Can you post the complete TX routine?<br /><br />I think the best solution would be to remove the sbrs. There is a nop in didStuff7 so you could replace it with a bst/bld, but not the other two.<br /><br />The only thing I can think of at the moment is to unroll the loop.<p>Statistics: Posted by <a href="https://forums.obdev.at/memberlist.php?mode=viewprofile&amp;u=22474">kuro68k</a> — Thu Feb 16, 2017 6:58 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[az3749]]></name></author>
		<updated>2017-02-15T11:48:01+02:00</updated>

		<published>2017-02-15T11:48:01+02:00</published>
		<id>https://forums.obdev.at/viewtopic.php?t=10735&amp;p=31974#p31974</id>
		<link href="https://forums.obdev.at/viewtopic.php?t=10735&amp;p=31974#p31974"/>
		<title type="html"><![CDATA[jitter in usbdrvasm16.inc]]></title>

		
		<content type="html" xml:base="https://forums.obdev.at/viewtopic.php?t=10735&amp;p=31974#p31974"><![CDATA[
<div class="codebox"><p>Code: </p><pre><code>txBitLoop:<br />    sbrs    shift, 0        ;&#91;-3&#93; &#91;7&#93;<br />    eor     x1, x4          ;&#91;-2&#93; &#91;8&#93;<br />    out     USBOUT, x1      ;&#91;-1&#93; &#91;9&#93; &lt;-- out N &lt;- jitter is here - AZ<br />    ror     shift           ;&#91;0&#93; &#91;10&#93;<br />    ror     x2              ;&#91;1&#93;<br /><br /></code></pre></div>timing will depends of sending data. zero data (0x00) will have ~10% less  duration than (0xff). USB allows only 1.5%.<br />It is possible to solve - make bitcnt dependent of data to compensate jitter:<br /><div class="codebox"><p>Code: </p><pre><code>;   calc shift comp pare - 1+4 cycles<br />   ldi      bitcnt, 0xFF<br />   EOR      bitcnt,shift<br />   andi   bitcnt,0x3F<br />   ORI      bitcnt,0x20<br />   nop   ; AZ<br /></code></pre></div><br />I placed it before<br />  <div class="codebox"><p>Code: </p><pre><code>  dec     cnt             ;&#91;3&#93;<br />    brne    txByteLoop      ;&#91;4&#93;</code></pre></div><p>Statistics: Posted by <a href="https://forums.obdev.at/memberlist.php?mode=viewprofile&amp;u=22473">az3749</a> — Wed Feb 15, 2017 11:48 am</p><hr />
]]></content>
	</entry>
	</feed>
