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

	<title>Objective Development Forums</title>
	
	<link href="https://forums.obdev.at/index.php" />
	<updated>2010-09-22T10:48:51+02:00</updated>

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

		<entry>
		<author><name><![CDATA[horo]]></name></author>
		<updated>2010-09-22T10:48:51+02:00</updated>

		<published>2010-09-22T10:48:51+02:00</published>
		<id>https://forums.obdev.at/viewtopic.php?t=4842&amp;p=15945#p15945</id>
		<link href="https://forums.obdev.at/viewtopic.php?t=4842&amp;p=15945#p15945"/>
		<title type="html"><![CDATA[Re: Maximum Sample Rate in V-USB Data Acquisition Projects]]></title>

		
		<content type="html" xml:base="https://forums.obdev.at/viewtopic.php?t=4842&amp;p=15945#p15945"><![CDATA[
Hi Pedram,<br /><br />you're welcome to ask <img class="smilies" src="./../../../images/smilies/icon_wink.gif" alt=";)" title="Wink" /><br />Maybe one possible solution for your problem would be if you use the &quot;USB-SOF-heartbeat&quot; ticking every millisecond to trigger your analog conversion (look into usbconfig.h):<br /><div class="codebox"><p>Code: </p><pre><code>...<br />/* ---------------------------- Hardware Config ---------------------------- */<br /><br />#define USB_CFG_IOPORTNAME      D<br />/* This is the port where the USB bus is connected. When you configure it to<br /> * &quot;B&quot;, the registers PORTB, PINB and DDRB will be used.<br /> */<br />#define USB_CFG_DMINUS_BIT      4<br />/* This is the bit number in USB_CFG_IOPORT where the USB D- line is connected.<br /> * This may be any bit in the port.<br /> */<br />#define USB_CFG_DPLUS_BIT       2<br />/* This is the bit number in USB_CFG_IOPORT where the USB D+ line is connected.<br /> * This may be any bit in the port. Please note that D+ must also be connected<br /> * to interrupt pin INT0! &#91;You can also use other interrupts, see section<br /> * &quot;Optional MCU Description&quot; below, or you can connect D- to the interrupt, as<br /> * it is required if you use the USB_COUNT_SOF feature. If you use D- for the<br /> * interrupt, the USB interrupt will also be triggered at Start-Of-Frame<br /> * markers every millisecond.&#93;<br /> */ <br />...<br /> * #define USB_SOF_HOOK                    myAssemblerMacro<br /> * This macro (if defined) is executed in the assembler module when a<br /> * Start Of Frame condition is detected. It is recommended to define it to<br /> * the name of an assembler macro which is defined here as well so that more<br /> * than one assembler instruction can be used. The macro may use the register<br /> * YL and modify SREG. If it lasts longer than a couple of cycles, USB messages<br /> * immediately after an SOF pulse may be lost and must be retried by the host.<br /> * What can you do with this hook? Since the SOF signal occurs exactly every<br /> * 1 ms (unless the host is in sleep mode), you can use it to tune OSCCAL in<br /> * designs running on the internal RC oscillator.<br /> * Please note that Start Of Frame detection works only if D- is wired to the<br /> * interrupt, not D+. THIS IS DIFFERENT THAN MOST EXAMPLES!<br /> */<br />... </code></pre></div><br />This gives you 1000 samples/s - if you average every four samples you get 250 samples/s with 11 bit resolution. These samples can be packed into the eight byte usb packages.<br /><br />Ciao Martin<p>Statistics: Posted by <a href="https://forums.obdev.at/memberlist.php?mode=viewprofile&amp;u=891">horo</a> — Wed Sep 22, 2010 10:48 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Pedram]]></name></author>
		<updated>2010-09-21T21:33:45+02:00</updated>

		<published>2010-09-21T21:33:45+02:00</published>
		<id>https://forums.obdev.at/viewtopic.php?t=4842&amp;p=15938#p15938</id>
		<link href="https://forums.obdev.at/viewtopic.php?t=4842&amp;p=15938#p15938"/>
		<title type="html"><![CDATA[Re: Maximum Sample Rate in V-USB Data Acquisition Projects]]></title>

		
		<content type="html" xml:base="https://forums.obdev.at/viewtopic.php?t=4842&amp;p=15938#p15938"><![CDATA[
Thanks All and Specially Maxi, it was really a good news for me <img class="smilies" src="./../../../images/smilies/icon_biggrin.gif" alt=":D" title="Very Happy" /><br />prepare yourself for my dummy questions about V-USB <img class="smilies" src="./../../../images/smilies/icon_wink.gif" alt=";)" title="Wink" /><p>Statistics: Posted by <a href="https://forums.obdev.at/memberlist.php?mode=viewprofile&amp;u=4353">Pedram</a> — Tue Sep 21, 2010 9:33 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[maxi]]></name></author>
		<updated>2010-09-20T21:42:40+02:00</updated>

		<published>2010-09-20T21:42:40+02:00</published>
		<id>https://forums.obdev.at/viewtopic.php?t=4842&amp;p=15925#p15925</id>
		<link href="https://forums.obdev.at/viewtopic.php?t=4842&amp;p=15925#p15925"/>
		<title type="html"><![CDATA[Re: Maximum Sample Rate in V-USB Data Acquisition Projects]]></title>

		
		<content type="html" xml:base="https://forums.obdev.at/viewtopic.php?t=4842&amp;p=15925#p15925"><![CDATA[
<blockquote><div><cite>Pedram wrote:</cite>I am just searching for different choices and V-USB  think is the best and cheapest one, if it can sample my Analoge signal to PC in atleast 250Sample/S.</div></blockquote><br />You could easily achieve 250 samples per second by modifying the firmware a little, i'm sure.<br /><br />Actually, that project was exactly how I discovered V-USB too <img class="smilies" src="./../../../images/smilies/icon_smile.gif" alt=":)" title="Smile" />  see this thread <a href="http://forums.obdev.at/viewtopic.php?f=8&amp;t=3059" class="postlink">http://forums.obdev.at/viewtopic.php?f=8&amp;t=3059</a><br />I actually ended up being able measure signals into the MHz (8 bit resolution) using a trick know as equivalent time sampling. You can, if you like take 'snap-shots' of a signal then use a software or hardware trigger to align them.  Your PC will have plenty enough grunt to do this, V-USB can be idle for upto 50ms IIRC so you sample say 512 bytes worth of data then send it in packets to the PC for processing/rendering. Ok, it's not a true DSO but the human eye is not quick enough to notice, obviously it's no good for data capture/logging applications.<br /><br />Be prepared for lots of problems with EMI and be careful what you connect it to without proper input protection.  In the end I concluded that AVR8 is not the best choice for a diy scope but I did have some fun. Good luck.<br /><br />[edit]You might also find this AVRfreaks post of interest <a href="http://www.avrfreaks.net/index.php?name=PNphpBB2&amp;file=viewtopic&amp;t=82695" class="postlink">http://www.avrfreaks.net/index.php?name=PNphpBB2&amp;file=viewtopic&amp;t=82695</a><p>Statistics: Posted by <a href="https://forums.obdev.at/memberlist.php?mode=viewprofile&amp;u=2570">maxi</a> — Mon Sep 20, 2010 9:42 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Pedram]]></name></author>
		<updated>2010-09-20T14:55:53+02:00</updated>

		<published>2010-09-20T14:55:53+02:00</published>
		<id>https://forums.obdev.at/viewtopic.php?t=4842&amp;p=15923#p15923</id>
		<link href="https://forums.obdev.at/viewtopic.php?t=4842&amp;p=15923#p15923"/>
		<title type="html"><![CDATA[Re: Maximum Sample Rate in V-USB Data Acquisition Projects]]></title>

		
		<content type="html" xml:base="https://forums.obdev.at/viewtopic.php?t=4842&amp;p=15923#p15923"><![CDATA[
Thank you for your response,<br /><br />What i really want to know is that &quot;IF IT IS POSSIBLE OR NOT?&quot;<br />i am new to V-USB and i heard that the speed is low. i am just researching to build a cheap board for my project. I am just searching for different choices and V-USB  think is the best and cheapest one, if it can sample my Analoge signal to PC in atleast 250Sample/S.<br /><br />What i really want is a SCOPE.i am a electrical engineer and i have designed a circuite For ECG (Electro Cardio Graph), and till now, i have a analoge signal, I want to send it to my PC via a CHEAP board! what i really want is exactly like this, EXACTLY :<br /><a href="http://yveslebrac.blogspot.com/2008/10/cheapest-dual-trace-scope-in-galaxy.html" class="postlink">http://yveslebrac.blogspot.com/2008/10/cheapest-dual-trace-scope-in-galaxy.html</a><br />but with 250 s/s! not 100 s/s.<br /> your are not new and you have experience, is it possible or not? if yest i will leave my research and start working and learning V-USB <img class="smilies" src="./../../../images/smilies/icon_biggrin.gif" alt=":D" title="Very Happy" /><p>Statistics: Posted by <a href="https://forums.obdev.at/memberlist.php?mode=viewprofile&amp;u=4353">Pedram</a> — Mon Sep 20, 2010 2:55 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[horo]]></name></author>
		<updated>2010-09-20T09:25:04+02:00</updated>

		<published>2010-09-20T09:25:04+02:00</published>
		<id>https://forums.obdev.at/viewtopic.php?t=4842&amp;p=15913#p15913</id>
		<link href="https://forums.obdev.at/viewtopic.php?t=4842&amp;p=15913#p15913"/>
		<title type="html"><![CDATA[Re: Maximum Sample Rate in V-USB Data Acquisition Projects]]></title>

		
		<content type="html" xml:base="https://forums.obdev.at/viewtopic.php?t=4842&amp;p=15913#p15913"><![CDATA[
Hi,<br /><br />Grendel is right - 10ms poll rate is the theory - but for practical tests (win: 8ms, linux: 2 ms) look at the <a href="http://forums.obdev.at/viewtopic.php?f=8&amp;t=1352&amp;start=15#p8825" class="postlink">v-usb-midi thread</a>. And you're able to send 8 bytes packages with 4 unpacked samples (i.e. 400 samples/s). <br /><br />Ciao Martin<p>Statistics: Posted by <a href="https://forums.obdev.at/memberlist.php?mode=viewprofile&amp;u=891">horo</a> — Mon Sep 20, 2010 9:25 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Grendel]]></name></author>
		<updated>2010-09-20T07:35:50+02:00</updated>

		<published>2010-09-20T07:35:50+02:00</published>
		<id>https://forums.obdev.at/viewtopic.php?t=4842&amp;p=15911#p15911</id>
		<link href="https://forums.obdev.at/viewtopic.php?t=4842&amp;p=15911#p15911"/>
		<title type="html"><![CDATA[Re: Maximum Sample Rate in V-USB Data Acquisition Projects]]></title>

		
		<content type="html" xml:base="https://forums.obdev.at/viewtopic.php?t=4842&amp;p=15911#p15911"><![CDATA[
The 100s/s is a limit imposed by USB low speed (min. 10ms poll rate for INT EPs.) You'd be better of looking at chips w/ a native USB interface that supports full speed like the ATMega32U4 (<a href="http://www.pjrc.com/teensy/" class="postlink">example dev board</a>).<p>Statistics: Posted by <a href="https://forums.obdev.at/memberlist.php?mode=viewprofile&amp;u=101">Grendel</a> — Mon Sep 20, 2010 7:35 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[maxi]]></name></author>
		<updated>2010-09-20T00:31:59+02:00</updated>

		<published>2010-09-20T00:31:59+02:00</published>
		<id>https://forums.obdev.at/viewtopic.php?t=4842&amp;p=15910#p15910</id>
		<link href="https://forums.obdev.at/viewtopic.php?t=4842&amp;p=15910#p15910"/>
		<title type="html"><![CDATA[Re: Maximum Sample Rate in V-USB Data Acquisition Projects]]></title>

		
		<content type="html" xml:base="https://forums.obdev.at/viewtopic.php?t=4842&amp;p=15910#p15910"><![CDATA[
A typical AVR8 has a maximum sampling rate of ~15 KHz @ 10 bit resolution. Although it would be tricky to buffer this rate smoothly through the USB stack without plenty of RAM.<p>Statistics: Posted by <a href="https://forums.obdev.at/memberlist.php?mode=viewprofile&amp;u=2570">maxi</a> — Mon Sep 20, 2010 12:31 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Pedram]]></name></author>
		<updated>2010-09-19T11:28:48+02:00</updated>

		<published>2010-09-19T11:28:48+02:00</published>
		<id>https://forums.obdev.at/viewtopic.php?t=4842&amp;p=15907#p15907</id>
		<link href="https://forums.obdev.at/viewtopic.php?t=4842&amp;p=15907#p15907"/>
		<title type="html"><![CDATA[Maximum Sample Rate in V-USB Data Acquisition Projects]]></title>

		
		<content type="html" xml:base="https://forums.obdev.at/viewtopic.php?t=4842&amp;p=15907#p15907"><![CDATA[
Hello everybody,<br /><br />I am working on a project and i am searching for different USB interfaces which are AVAILABLE. I need to transfer my data (An Analoge Signal ) in precission of 10 bits and in sample rate of at least 250 bit/s to PC. I just want to KNOW if this implementation is possible in V-USB or not? I read all the related Projects but No one mentions the Sample Rate, Except The <a href="http://yveslebrac.blogspot.com/2008/10/cheapest-dual-trace-scope-in-galaxy.html" class="postlink">http://yveslebrac.blogspot.com/2008/10/cheapest-dual-trace-scope-in-galaxy.html</a> which said that it's sample rate is 100 sample/s Maximum!<br />Let me ask my question Clearly :<br />What is the maximum sample rate that is possible (10 bit precision)?<br /><br />Thank You In Advance <img class="smilies" src="./../../../images/smilies/icon_wink.gif" alt=";)" title="Wink" /><p>Statistics: Posted by <a href="https://forums.obdev.at/memberlist.php?mode=viewprofile&amp;u=4353">Pedram</a> — Sun Sep 19, 2010 11:28 am</p><hr />
]]></content>
	</entry>
	</feed>
