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

	<title>Objective Development Forums</title>
	
	<link href="https://forums.obdev.at/index.php" />
	<updated>2009-01-22T19:41:23+02:00</updated>

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

		<entry>
		<author><name><![CDATA[roger]]></name></author>
		<updated>2009-01-22T19:41:23+02:00</updated>

		<published>2009-01-22T19:41:23+02:00</published>
		<id>https://forums.obdev.at/viewtopic.php?t=2036&amp;p=7625#p7625</id>
		<link href="https://forums.obdev.at/viewtopic.php?t=2036&amp;p=7625#p7625"/>
		<title type="html"><![CDATA[Continously sampling via ADC, how to start]]></title>

		
		<content type="html" xml:base="https://forums.obdev.at/viewtopic.php?t=2036&amp;p=7625#p7625"><![CDATA[
That's about what I can get. Using a 16 bit message size might help, but I have yet to try it.<p>Statistics: Posted by <a href="https://forums.obdev.at/memberlist.php?mode=viewprofile&amp;u=1617">roger</a> — Thu Jan 22, 2009 7:41 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[epsilon_da]]></name></author>
		<updated>2009-01-22T19:22:55+02:00</updated>

		<published>2009-01-22T19:22:55+02:00</published>
		<id>https://forums.obdev.at/viewtopic.php?t=2036&amp;p=7624#p7624</id>
		<link href="https://forums.obdev.at/viewtopic.php?t=2036&amp;p=7624#p7624"/>
		<title type="html"><![CDATA[Continously sampling via ADC, how to start]]></title>

		
		<content type="html" xml:base="https://forums.obdev.at/viewtopic.php?t=2036&amp;p=7624#p7624"><![CDATA[
You are correct. My mistake.<br /><br /> <img class="smilies" src="./../../../images/smilies/icon_redface.gif" alt=":oops:" title="Embarassed" /> too many errors in the code and in my interpretation.<br /><br />I will try to get real results.<br /><br />EDIT: The problem was a bad use of the &quot;clock&quot; function. The new result is 7182 bytes/s (only the buffer is counted, not protocol bytes). So good realtime adquisition is not possible.<p>Statistics: Posted by <a href="https://forums.obdev.at/memberlist.php?mode=viewprofile&amp;u=1412">epsilon_da</a> — Thu Jan 22, 2009 7:22 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[roger]]></name></author>
		<updated>2009-01-22T18:49:43+02:00</updated>

		<published>2009-01-22T18:49:43+02:00</published>
		<id>https://forums.obdev.at/viewtopic.php?t=2036&amp;p=7623#p7623</id>
		<link href="https://forums.obdev.at/viewtopic.php?t=2036&amp;p=7623#p7623"/>
		<title type="html"><![CDATA[Continously sampling via ADC, how to start]]></title>

		
		<content type="html" xml:base="https://forums.obdev.at/viewtopic.php?t=2036&amp;p=7623#p7623"><![CDATA[
That's a bit of a suspicious result I think.<br />According to <a href="http://forums.obdev.at/viewtopic.php?t=19&amp;postdays=0&amp;postorder=asc&amp;start=0" class="postlink">http://forums.obdev.at/viewtopic.php?t=19&amp;postdays=0&amp;postorder=asc&amp;start=0</a>, the theoretical limit is 24kbps and no one got above 7kbps.<br /><br />Can you post more details and double check your results?<p>Statistics: Posted by <a href="https://forums.obdev.at/memberlist.php?mode=viewprofile&amp;u=1617">roger</a> — Thu Jan 22, 2009 6:49 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[epsilon_da]]></name></author>
		<updated>2009-01-22T18:39:33+02:00</updated>

		<published>2009-01-22T18:39:33+02:00</published>
		<id>https://forums.obdev.at/viewtopic.php?t=2036&amp;p=7622#p7622</id>
		<link href="https://forums.obdev.at/viewtopic.php?t=2036&amp;p=7622#p7622"/>
		<title type="html"><![CDATA[Continously sampling via ADC, how to start]]></title>

		
		<content type="html" xml:base="https://forums.obdev.at/viewtopic.php?t=2036&amp;p=7622#p7622"><![CDATA[
<blockquote><div><cite>epsilon_da wrote:</cite>How fast can AVR-USB transfer a buffer?<br /></div></blockquote><br /><br />I did some tests transferring 5000 times a buffer of 1800 bytes from the uC to PC doing most transfers in chuncks of 250 bytes.<br />The result was a transfer rate of about 55 kb/s.<br />The firmware does nothing more than blink a led each second and transfer the buffer.<br />I suspect that doing a realtime adquisition board up to 25 ksps in 10 bit mode, is doable.<p>Statistics: Posted by <a href="https://forums.obdev.at/memberlist.php?mode=viewprofile&amp;u=1412">epsilon_da</a> — Thu Jan 22, 2009 6:39 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[roger]]></name></author>
		<updated>2009-01-21T22:13:22+02:00</updated>

		<published>2009-01-21T22:13:22+02:00</published>
		<id>https://forums.obdev.at/viewtopic.php?t=2036&amp;p=7616#p7616</id>
		<link href="https://forums.obdev.at/viewtopic.php?t=2036&amp;p=7616#p7616"/>
		<title type="html"><![CDATA[Continously sampling via ADC, how to start]]></title>

		
		<content type="html" xml:base="https://forums.obdev.at/viewtopic.php?t=2036&amp;p=7616#p7616"><![CDATA[
Hi.<br /><br />The sample rate is variable and is set by the host (from 1.1 kHz - &gt;10 kHz), and from my testing it is quite accurate.<br /><br />I built a small circuit using an ATTINY85 with a diode and BJT to reduce the 5V USB supply down to ~3.6 V. I used the 16.5 MHz RC module, which is good enough for me. My software only uses one channel, but it should be easy to expand that to several (I didn't have any free pins in my circuit).<br /><br />My testing shows that I can reliably and continuously transfer up to about 7 kbps using AVR-USB and a large enough buffer. So in 8 bit mode that's up to 7 ksps or (4/5)*7 ksps in 10 bit mode.<br /><br />Here are some test plots I made with various sample rates and varying input sine frequencies.<br /><br /><a href="http://img177.imageshack.us/my.php?image=fs2kxfya9.png" class="postlink"><img src="http://img177.imageshack.us/img177/715/fs2kxfya9.th.png" class="postimage" alt="Image" /></a><br /><a href="http://img249.imageshack.us/my.php?image=fs2kxtwq5.png" class="postlink"><img src="http://img249.imageshack.us/img249/7430/fs2kxtwq5.th.png" class="postimage" alt="Image" /></a><br /><a href="http://img185.imageshack.us/my.php?image=fs6kxfcj5.png" class="postlink"><img src="http://img185.imageshack.us/img185/6569/fs6kxfcj5.th.png" class="postimage" alt="Image" /></a><br /><a href="http://img259.imageshack.us/my.php?image=fs6kxf1kgh7.png" class="postlink"><img src="http://img259.imageshack.us/img259/2541/fs6kxf1kgh7.th.png" class="postimage" alt="Image" /></a><br /><a href="http://img292.imageshack.us/my.php?image=fs6kxtgw2.png" class="postlink"><img src="http://img292.imageshack.us/img292/4813/fs6kxtgw2.th.png" class="postimage" alt="Image" /></a><br /><br />As you may see, there's very little distortion and the timing is quite accurate.<br /><br />This is what happens when you try to sample too fast and the buffer can't keep up:<br /><a href="http://img249.imageshack.us/my.php?image=fs9kxfrg5.png" class="postlink"><img src="http://img249.imageshack.us/img249/5516/fs9kxfrg5.th.png" class="postimage" alt="Image" /></a><br /><a href="http://img160.imageshack.us/my.php?image=fs9kxtoo1.png" class="postlink"><img src="http://img160.imageshack.us/img160/5417/fs9kxtoo1.th.png" class="postimage" alt="Image" /></a><p>Statistics: Posted by <a href="https://forums.obdev.at/memberlist.php?mode=viewprofile&amp;u=1617">roger</a> — Wed Jan 21, 2009 10:13 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[OldSkull]]></name></author>
		<updated>2009-01-20T22:26:40+02:00</updated>

		<published>2009-01-20T22:26:40+02:00</published>
		<id>https://forums.obdev.at/viewtopic.php?t=2036&amp;p=7595#p7595</id>
		<link href="https://forums.obdev.at/viewtopic.php?t=2036&amp;p=7595#p7595"/>
		<title type="html"><![CDATA[Continously sampling via ADC, how to start]]></title>

		
		<content type="html" xml:base="https://forums.obdev.at/viewtopic.php?t=2036&amp;p=7595#p7595"><![CDATA[
I think that it's not the problem with ADC speed (or it's only partially a problem), but with speed of software-usb:<br /><!-- m --><a class="postlink" href="http://forums.obdev.at/viewtopic.php?t=19&amp;start=15">http://forums.obdev.at/viewtopic.php?t=19&amp;start=15</a><!-- m --><br />up to 7kB/s? it means sending up to less than 7k samples (8bit) per second.<br /><br />PS:<br />is there any Windows-based host for sending and receiving data from avr-usb device except gPowerSwitch?<p>Statistics: Posted by <a href="https://forums.obdev.at/memberlist.php?mode=viewprofile&amp;u=1490">OldSkull</a> — Tue Jan 20, 2009 10:26 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[epsilon_da]]></name></author>
		<updated>2009-01-20T22:09:03+02:00</updated>

		<published>2009-01-20T22:09:03+02:00</published>
		<id>https://forums.obdev.at/viewtopic.php?t=2036&amp;p=7593#p7593</id>
		<link href="https://forums.obdev.at/viewtopic.php?t=2036&amp;p=7593#p7593"/>
		<title type="html"><![CDATA[Continously sampling via ADC, how to start]]></title>

		
		<content type="html" xml:base="https://forums.obdev.at/viewtopic.php?t=2036&amp;p=7593#p7593"><![CDATA[
Hi.<br />Nice done.<br /><br /><br />How have you messured the sample rate?<br /><br />I need to fetch information from ADCs as fast as possible, but i may not need it to be circular.<br />What microcontroller are you using? Crystal oscillator? ADC prescaler settings? How many channels are you sending? etc.<br /><br />How fast can AVR-USB transfer a buffer in your case?<br /><br />You say that the sample rate are of about &quot;6 khz&quot;, but sample rate are messured in k-samples per second. What do you really mean with 6 khz? I think that it is too much slow. With an ATmega32 at 16Mhz it is possible to get 76923 kSPS and 8 bits.<br /><br />Thanks.<p>Statistics: Posted by <a href="https://forums.obdev.at/memberlist.php?mode=viewprofile&amp;u=1412">epsilon_da</a> — Tue Jan 20, 2009 10:09 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Anonymous]]></name></author>
		<updated>2009-01-19T17:20:10+02:00</updated>

		<published>2009-01-19T17:20:10+02:00</published>
		<id>https://forums.obdev.at/viewtopic.php?t=2036&amp;p=7588#p7588</id>
		<link href="https://forums.obdev.at/viewtopic.php?t=2036&amp;p=7588#p7588"/>
		<title type="html"><![CDATA[Continously sampling via ADC, how to start]]></title>

		
		<content type="html" xml:base="https://forums.obdev.at/viewtopic.php?t=2036&amp;p=7588#p7588"><![CDATA[
thank you very much for taking the time to share your work. i will try to understand and if i came up with something i will let you know if you don't mind.<br /><br />pat<p>Statistics: Posted by Guest — Mon Jan 19, 2009 5:20 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[roger]]></name></author>
		<updated>2009-01-19T07:43:42+02:00</updated>

		<published>2009-01-19T07:43:42+02:00</published>
		<id>https://forums.obdev.at/viewtopic.php?t=2036&amp;p=7586#p7586</id>
		<link href="https://forums.obdev.at/viewtopic.php?t=2036&amp;p=7586#p7586"/>
		<title type="html"><![CDATA[Continously sampling via ADC, how to start]]></title>

		
		<content type="html" xml:base="https://forums.obdev.at/viewtopic.php?t=2036&amp;p=7586#p7586"><![CDATA[
Sorry I haven't had a chance to post this until now or to clean up my code, but here it is: <!-- m --><a class="postlink" href="http://www.megaupload.com/?d=EXUBE3WX">http://www.megaupload.com/?d=EXUBE3WX</a><!-- m --><br /><br />usbtest.c is the main program.<br /><br />I can almost guarantee there are lots of bugs, so good luck <img class="smilies" src="./../../../images/smilies/icon_smile.gif" alt=":)" title="Smile" /><p>Statistics: Posted by <a href="https://forums.obdev.at/memberlist.php?mode=viewprofile&amp;u=1617">roger</a> — Mon Jan 19, 2009 7:43 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[psc]]></name></author>
		<updated>2009-01-15T20:37:58+02:00</updated>

		<published>2009-01-15T20:37:58+02:00</published>
		<id>https://forums.obdev.at/viewtopic.php?t=2036&amp;p=7546#p7546</id>
		<link href="https://forums.obdev.at/viewtopic.php?t=2036&amp;p=7546#p7546"/>
		<title type="html"><![CDATA[Continously sampling via ADC, how to start]]></title>

		
		<content type="html" xml:base="https://forums.obdev.at/viewtopic.php?t=2036&amp;p=7546#p7546"><![CDATA[
Roger,<br /><br />Really nice of you! It would be very helpful to have the entire code, including the pyUSB.<br /><br />Cheers!<br />Pat<p>Statistics: Posted by <a href="https://forums.obdev.at/memberlist.php?mode=viewprofile&amp;u=1494">psc</a> — Thu Jan 15, 2009 8:37 pm</p><hr />
]]></content>
	</entry>
	</feed>
