<?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: Has anyone written a sample-rate library/header for Maple ADC?</title>
		<link>http://forums.leaflabs.com/topic.php?id=74079</link>
		<description>A place to share, learn, and grow...</description>
		<language>en-US</language>
		<pubDate>Fri, 22 Jan 2016 00:04:48 +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=74079" rel="self" type="application/rss+xml" />

		<item>
			<title>ventosus on "Has anyone written a sample-rate library/header for Maple ADC?"</title>
			<link>http://forums.leaflabs.com/topic.php?id=74079#post-104831</link>
			<pubDate>Tue, 29 Oct 2013 05:41:11 +0000</pubDate>
			<dc:creator>ventosus</dc:creator>
			<guid isPermaLink="false">104831@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;@fb44&#60;/p&#62;
&#60;p&#62;The sampling of the ADC is by default configured to be triggered by software, but you can configure it to be triggered by a timer.&#60;/p&#62;
&#60;p&#62;You have to use libmaple for that though. Here some keywords to look for in this forum and in the libmaple/wirish sources.&#60;/p&#62;
&#60;p&#62;e.g. use:&#60;br /&#62;
&#60;code&#62;&#60;br /&#62;
adc_set_extsel(dev, ADC_EXT_EV_TIM1_CC1); // trigger by channel1 of timer1&#60;br /&#62;
&#60;/code&#62;&#60;br /&#62;
when initializing the ADC peripheral instead of:&#60;br /&#62;
&#60;code&#62;&#60;br /&#62;
adc_set_extsel(dev, ADC_EXT_EV_SWSTART);&#60;br /&#62;
&#60;/code&#62;&#60;/p&#62;
&#60;p&#62;To get a notice about the end of conversion, you may want to&#60;br /&#62;
- monitor the end-of-conversion status flag (ADC_SR_EOC)&#60;br /&#62;
- set up an ADC interrupt (void __adc_irq(void))&#60;br /&#62;
- or use DMA if you want to sample more than one ADC channel
&#60;/p&#62;</description>
		</item>
		<item>
			<title>ftb44 on "Has anyone written a sample-rate library/header for Maple ADC?"</title>
			<link>http://forums.leaflabs.com/topic.php?id=74079#post-104828</link>
			<pubDate>Mon, 28 Oct 2013 16:05:40 +0000</pubDate>
			<dc:creator>ftb44</dc:creator>
			<guid isPermaLink="false">104828@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;Hi everyone,&#60;/p&#62;
&#60;p&#62;I am about to use the Maple in a project with a little bit of DSP, and I am worried about the fact that I can only sample once per analogRead().  To me this suggests that my sample rate might not be constant!  Has anyone written anything that could work around this non-determinism?  I know that the Maple is capable of incredibly fast analog reads, and I have a few ideas on how to stabilize the time between samples--but I feel like there must be better coders out there who have already solved this problem.
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
