<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="bbPress/1.0.2" -->
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title>LeafLabs Garden &#187; Topic: 4channel input capture / USB / UART</title>
		<link>http://forums.leaflabs.com/topic.php?id=780</link>
		<description>A place to share, learn, and grow...</description>
		<language>en-US</language>
		<pubDate>Fri, 22 Jan 2016 00:18:13 +0000</pubDate>
		<generator>http://bbpress.org/?v=1.0.2</generator>
		<textInput>
			<title><![CDATA[Search]]></title>
			<description><![CDATA[Search all topics from these forums.]]></description>
			<name>q</name>
			<link>http://forums.leaflabs.com/search.php</link>
		</textInput>
		<atom:link href="http://forums.leaflabs.com/rss.php?topic=780" rel="self" type="application/rss+xml" />

		<item>
			<title>gbulmer on "4channel input capture / USB / UART"</title>
			<link>http://forums.leaflabs.com/topic.php?id=780#post-4816</link>
			<pubDate>Thu, 26 May 2011 05:09:07 +0000</pubDate>
			<dc:creator>gbulmer</dc:creator>
			<guid isPermaLink="false">4816@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;As folks have said, input capture timing is done in autonomous hardware, so software interrupts can't cause that to jitter.&#60;/p&#62;
&#60;p&#62;BUT, there is a trade-off between resolution and duration. &#60;/p&#62;
&#60;p&#62;The timers count in multiples of 72MHz, so as poslathian explains, that is the highest resolution. &#60;/p&#62;
&#60;p&#62;The timer is only 16 bits, so if it counts at 72MHz, it will wrap around at about 1099Hz, so the longest duration the timer will record is under 1 millisecond. Longer than that, and there will be ambiguity.&#60;/p&#62;
&#60;p&#62;There are a couple of ways to improve on this. For example, timers can be 'chained' together (Section 15.3.15 &#34;Timer synchronization&#34; of RM0008) to create a 32bit timer, which would then wrap around at roughly 60 seconds.&#60;/p&#62;
&#60;p&#62;Once the timer values are converted to an adequate range of values, you could send them to a host PC. Then the obstacle may be the amount of bandwidth needed to communicate the values.&#60;/p&#62;
&#60;p&#62;As trevden wrote, the more information you are able to share, the better we might be able to help.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>mbolivar on "4channel input capture / USB / UART"</title>
			<link>http://forums.leaflabs.com/topic.php?id=780#post-4779</link>
			<pubDate>Wed, 25 May 2011 03:25:15 +0000</pubDate>
			<dc:creator>mbolivar</dc:creator>
			<guid isPermaLink="false">4779@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;although, to be fair, input capture support isn't in timer.h yet, and we haven't done any thinking at all about how (or even whether) to include support for it in HardwareTimer.&#60;/p&#62;
&#60;p&#62;btw, issues like these are why the HardwareTimer interface was declared unstable in 0.0.10 -- it would be easy to keep adding features to it, but the result would be an unusable mess.  this is definitely an issue that needs more brains; input from the forum on this would be great.&#60;/p&#62;
&#60;p&#62;edit: see my separate thread on this issue here: &#60;a href=&#34;http://forums.leaflabs.com/topic.php?id=794&#34; rel=&#34;nofollow&#34;&#62;http://forums.leaflabs.com/topic.php?id=794&#60;/a&#62;
&#60;/p&#62;</description>
		</item>
		<item>
			<title>poslathian on "4channel input capture / USB / UART"</title>
			<link>http://forums.leaflabs.com/topic.php?id=780#post-4760</link>
			<pubDate>Tue, 24 May 2011 16:22:29 +0000</pubDate>
			<dc:creator>poslathian</dc:creator>
			<guid isPermaLink="false">4760@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;as trevden points out, properly configured you should be use the hardware timers in input capture mode to get about 14ns resolution!
&#60;/p&#62;</description>
		</item>
		<item>
			<title>trevden on "4channel input capture / USB / UART"</title>
			<link>http://forums.leaflabs.com/topic.php?id=780#post-4702</link>
			<pubDate>Sat, 21 May 2011 01:00:02 +0000</pubDate>
			<dc:creator>trevden</dc:creator>
			<guid isPermaLink="false">4702@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;Also, FTR, it looks like input capture happens on such a low level that it latches the counter value in hardware, so it shouldn't be affected by things like USB interrupts. Of course, you still need to start the counter with the appropriate accuracy...
&#60;/p&#62;</description>
		</item>
		<item>
			<title>trevden on "4channel input capture / USB / UART"</title>
			<link>http://forums.leaflabs.com/topic.php?id=780#post-4701</link>
			<pubDate>Sat, 21 May 2011 00:42:15 +0000</pubDate>
			<dc:creator>trevden</dc:creator>
			<guid isPermaLink="false">4701@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;What sort of precision are you actually looking for? Tens of nanoseconds? Microseconds? Milliseconds?&#60;/p&#62;
&#60;p&#62;And, of course, the more information you can provide about your specific application and what sort of inputs/parameters you have, the better the answers we can give you. :)
&#60;/p&#62;</description>
		</item>
		<item>
			<title>poslathian on "4channel input capture / USB / UART"</title>
			<link>http://forums.leaflabs.com/topic.php?id=780#post-4698</link>
			<pubDate>Fri, 20 May 2011 19:04:29 +0000</pubDate>
			<dc:creator>poslathian</dc:creator>
			<guid isPermaLink="false">4698@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;You may be able to use the USB if you are not continuously sampling always. You could stash the values in a buffer and then turn on the USB periodically to print them. SerialUSB.end() and SerialUSB.begin() should kill and revive the USB. Similarly systick_end() (I think, check the docs) should kill the systick. If you cant buffer the data you need (sampling too often) you can use a UART/USART connected to an FTDI or Arduino or another Maple to feed the data out if you absolutely cant ever turn on the USB. &#60;/p&#62;
&#60;p&#62;your idea of using the input compare mode on the timers is sound. You might also use external digital interrupts to do the timing latching, but it might not be as accurate as input compare on the timers
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Jeannette Bagley on "4channel input capture / USB / UART"</title>
			<link>http://forums.leaflabs.com/topic.php?id=780#post-4693</link>
			<pubDate>Fri, 20 May 2011 16:51:57 +0000</pubDate>
			<dc:creator>Jeannette Bagley</dc:creator>
			<guid isPermaLink="false">4693@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;Hi everyone,&#60;/p&#62;
&#60;p&#62;for a project I am currently thinking of I need to time 4 different external events, i.e. run times. All events have a common starting point in time, t0, so I thought of using the Maple board with a timer set to input compare to store the counter values in memory using DMA and trigger an interrupt once all counter values are available.&#60;/p&#62;
&#60;p&#62;From the manual / forum, I learned that USB and SYSTICK should be disabled to avoid Jitter, and since precision is pretty important in my application, I'll probably have to stick to that. My question now, is though, how to communicate the value to the &#34;outside world&#34;? I would love to do continuous measurements, which kinda rules out storing the values on the board itself, and transmitting them back to a connected PC via USB is also out of the question (although that would be ideal).&#60;/p&#62;
&#60;p&#62;Will serial communication work? Will it induce Jitter? Any other alternatives, pointers? Any help is appreciated!&#60;/p&#62;
&#60;p&#62;Cheers,&#60;br /&#62;
Jeanette
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
