<?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: ADC fast sampling and 10 bit mode</title>
		<link>http://forums.leaflabs.com/topic.php?id=162</link>
		<description>A place to share, learn, and grow...</description>
		<language>en-US</language>
		<pubDate>Fri, 22 Jan 2016 00:20:18 +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=162" rel="self" type="application/rss+xml" />

		<item>
			<title>gbulmer on "ADC fast sampling and 10 bit mode"</title>
			<link>http://forums.leaflabs.com/topic.php?id=162#post-1154</link>
			<pubDate>Thu, 09 Sep 2010 21:15:53 +0000</pubDate>
			<dc:creator>gbulmer</dc:creator>
			<guid isPermaLink="false">1154@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;mbolivar - Thank you!&#60;/p&#62;
&#60;p&#62;I wasn't at all sure when I first read you post whether you meant the lab was agreeing with my assertion that &#34;I am &#60;em&#62;not&#60;/em&#62; an Electronics Engineer&#34;, or &#34;I have no ... relationship with Horowitz or Hill&#34;, or ... (They were all funny, though :-)
&#60;/p&#62;</description>
		</item>
		<item>
			<title>mbolivar on "ADC fast sampling and 10 bit mode"</title>
			<link>http://forums.leaflabs.com/topic.php?id=162#post-1152</link>
			<pubDate>Thu, 09 Sep 2010 20:33:31 +0000</pubDate>
			<dc:creator>mbolivar</dc:creator>
			<guid isPermaLink="false">1152@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;It seems there's some agreement here at the lab :)&#60;br /&#62;
&#60;a href=&#34;http://imgur.com/F6hO8.jpg&#34; rel=&#34;nofollow&#34;&#62;http://imgur.com/F6hO8.jpg&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;(Although I myself am emphatically not an electronics engineer)
&#60;/p&#62;</description>
		</item>
		<item>
			<title>gbulmer on "ADC fast sampling and 10 bit mode"</title>
			<link>http://forums.leaflabs.com/topic.php?id=162#post-1148</link>
			<pubDate>Thu, 09 Sep 2010 18:52:06 +0000</pubDate>
			<dc:creator>gbulmer</dc:creator>
			<guid isPermaLink="false">1148@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;I am &#60;em&#62;not&#60;/em&#62; an Electrtonics Engineer, but I believe the appropriate phrase is &#34;output impedance of the signal source&#34;. This amounts to the amount of current the signal source can supply (without significant distortion). The source output impedance can be significantly improved quite cheaply using a well-chosen operational amplifier (Op Amp).&#60;/p&#62;
&#60;p&#62;I would highly recommend the jaw-droppingly brilliant &#34;The Art of Electronics, second edition&#34; by Horowitz and Hill (e.g. &#60;a href=&#34;http://www.amazon.com/Art-Electronics-Student-Manual-Exercises/dp/0521377099/ref=tmm_other_title_0?ie=UTF8&#38;amp;qid=1284075647&#38;amp;sr=8-1)&#34; rel=&#34;nofollow&#34;&#62;http://www.amazon.com/Art-Electronics-Student-Manual-Exercises/dp/0521377099/ref=tmm_other_title_0?ie=UTF8&#38;amp;qid=1284075647&#38;amp;sr=8-1)&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;PS - AFAIK, I have no commercial or personal relationship with Horowitz or Hill&#60;br /&#62;
[Except, of course through the &#34;6 degrees of separation&#34;, which may be a bit shorter than average for me simply because I lived and worked in Cambridge MA for a while.]
&#60;/p&#62;</description>
		</item>
		<item>
			<title>poslathian on "ADC fast sampling and 10 bit mode"</title>
			<link>http://forums.leaflabs.com/topic.php?id=162#post-1097</link>
			<pubDate>Tue, 07 Sep 2010 21:03:41 +0000</pubDate>
			<dc:creator>poslathian</dc:creator>
			<guid isPermaLink="false">1097@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;good point gbulmer, we have seen empirically that impedance mismatch KILLS the ADC. Follow the guidelines in the documentation (either ST or ours) to make sure your input signal is of appropriate impedance for your desired sample rate.&#60;/p&#62;
&#60;p&#62;EDIT: &#34;mismatch&#34; is probably the wrong word there, since &#34;impedance mismatch&#34; means something specific related to transmission lines. Hopefully you know what i meant.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>gbulmer on "ADC fast sampling and 10 bit mode"</title>
			<link>http://forums.leaflabs.com/topic.php?id=162#post-1089</link>
			<pubDate>Tue, 07 Sep 2010 17:38:03 +0000</pubDate>
			<dc:creator>gbulmer</dc:creator>
			<guid isPermaLink="false">1089@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;youthreewire - I had believed that 10bit was possible.&#60;/p&#62;
&#60;p&#62;I combed through the ADC section in the RM0008 Reference Manual (document 13902 from st.com), and I can't find any mention of a 10-bit mode. I currently think there is no 10-bit mode, so if you find it, please post in the forum.&#60;/p&#62;
&#60;p&#62;I did see that there is a 12-bit or 8-bit mode on the 'high-density family' DAC, so until now, I had assumed that was confusing me. You having the same belief (10-bit mode) has caused me to start to look again.&#60;/p&#62;
&#60;p&#62;There is a 'fast interleaved' mode, which uses two ADC's to sample the same signal alternately. So one starts to sample, then the 2nd one starts 7 ADC clock cycles later, the first one finishes 7 cycles later, and can immediately start again, and so on. This is described as giving 2x the sample+conversion rate of one ADC. It's described in section &#34;11.9.3 Fast interleaved mode&#34;, page 229, of RM0008. So, in theory, it should sample at about 1.7M samples/second on a Maple, with no other changes. Ten-bit samples would only save a couple of clock cycles, this is more significant.&#60;/p&#62;
&#60;p&#62;If the processor-clock speed is dropped from 72MHz to 56MHz, and the ADC-clock prescaler decreased to 4 (to get 14MHz), then a single ADC should give 1Msamples/second, and Fast-Interleave theoretically gives 2M samples/second, at 12-bits/sample.&#60;/p&#62;
&#60;p&#62;Note: this is all contingent on the quality of the source of the signal being sampled. If it is high-impedance (the adc.c code comments suggest it needs to be under 0.4k), then the signal can not drive the sample input of the ADC anywhere near these rates anyway. The sample time will rapidly dominate the sample+conversion time.&#60;/p&#62;
&#60;p&#62;I have not tried any of that, but intend to. I would like to reach better than 1.6M samples/second for a possible project.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>youthreewire on "ADC fast sampling and 10 bit mode"</title>
			<link>http://forums.leaflabs.com/topic.php?id=162#post-1054</link>
			<pubDate>Tue, 07 Sep 2010 00:40:18 +0000</pubDate>
			<dc:creator>youthreewire</dc:creator>
			<guid isPermaLink="false">1054@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;Is there a way to get 10 bit data rather than the 12 bit default? Anything like setting a prescaler..
&#60;/p&#62;</description>
		</item>
		<item>
			<title>poslathian on "ADC fast sampling and 10 bit mode"</title>
			<link>http://forums.leaflabs.com/topic.php?id=162#post-1035</link>
			<pubDate>Mon, 06 Sep 2010 13:27:49 +0000</pubDate>
			<dc:creator>poslathian</dc:creator>
			<guid isPermaLink="false">1035@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;A suggestion from okie - in adc.c (in libmaple if youre a terminal dev person, or in hardware/leaflabs/cores/maple if youre working in the IDE:&#60;/p&#62;
&#60;p&#62;change ADC_SMPR1 and ADC_SMPR2 to 0. This should get the ADC's running at the 800KHz+ level minus whatever function call overheads you incur when you call analogRead. While I have not benchmarked or verified this change, I have heard very high quality audio passthrough when decimating analogRead 8 times in a loop to up the bitdepth from 12 to about 16.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>poslathian on "ADC fast sampling and 10 bit mode"</title>
			<link>http://forums.leaflabs.com/topic.php?id=162#post-1034</link>
			<pubDate>Mon, 06 Sep 2010 13:22:36 +0000</pubDate>
			<dc:creator>poslathian</dc:creator>
			<guid isPermaLink="false">1034@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;oops, my bad, default configuration is 150KHz, thanks Stephen!
&#60;/p&#62;</description>
		</item>
		<item>
			<title>poslathian on "ADC fast sampling and 10 bit mode"</title>
			<link>http://forums.leaflabs.com/topic.php?id=162#post-1033</link>
			<pubDate>Mon, 06 Sep 2010 13:20:29 +0000</pubDate>
			<dc:creator>poslathian</dc:creator>
			<guid isPermaLink="false">1033@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;A few notes about the ADC:&#60;br /&#62;
  1) It is true that stm32 on Maple supports two channels at 12bit, 1MHz sampling rate, and can be multiplexed out to 16 channels.&#60;br /&#62;
  2) The current ADC library implementation in wirish is rather naiive, and due to configuration and overhead, consecutive calls to analogRead give about 130KHz sampling rate. The ADC's are VERY difficult to configure, so wirish just gives you a simple setup that works - but doesnt pull the full performance. Expanding the configuration options for ADC's is definitely high on our stack, if you have fooled with alternative configurations, let us know!&#60;br /&#62;
  3) We recently discovered, that when running the stm32 at 72MHz (Maple default) the ADC's actually max out at 800+KHz, not the full 1MHz. If you slow the clock down, you can get the full 1MHz. I dont know all the details on this issue, but apparently is buried somewhere in the documentation. We will fix our docs to reflect this. Slowing down the system clock to max out the ADC's falls under the category of &#34;improvements to the wirish adc interface&#34;&#60;br /&#62;
  4) I know of one user who made a minor mod to the adc code in libmaple to get much faster sampling than the 130KHz - enough to decimate 44KHz audio 8 times and get ~16 bits! I will try and track down this change and post.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>StephenFromNYC on "ADC fast sampling and 10 bit mode"</title>
			<link>http://forums.leaflabs.com/topic.php?id=162#post-1026</link>
			<pubDate>Mon, 06 Sep 2010 08:02:32 +0000</pubDate>
			<dc:creator>StephenFromNYC</dc:creator>
			<guid isPermaLink="false">1026@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;September 6, 2010&#60;/p&#62;
&#60;p&#62;Hello youthreewire-&#60;/p&#62;
&#60;p&#62;If your code is not too long it may be better easier for uses to read and comment if you include the code using the &#34;blockquote&#34; markup tag..&#60;/p&#62;
&#60;p&#62;Check out these suggestions for faster ADC conversion.&#60;/p&#62;
&#60;p&#62;&#60;a href=&#34;http://forums.leaflabs.com/topic.php?id=154#post-1001&#34; rel=&#34;nofollow&#34;&#62;http://forums.leaflabs.com/topic.php?id=154#post-1001&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;I have been busy the last few days, so I have not been able to test the modified code.&#60;/p&#62;
&#60;p&#62;Good luck,&#60;/p&#62;
&#60;p&#62;Stephen from NYC
&#60;/p&#62;</description>
		</item>
		<item>
			<title>youthreewire on "ADC fast sampling and 10 bit mode"</title>
			<link>http://forums.leaflabs.com/topic.php?id=162#post-1025</link>
			<pubDate>Mon, 06 Sep 2010 01:50:32 +0000</pubDate>
			<dc:creator>youthreewire</dc:creator>
			<guid isPermaLink="false">1025@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;Hi,&#60;/p&#62;
&#60;p&#62;I am thinking of getting the ADC run at 14 Mhz which gives a conversion and sampling time of 14 x 1/Fadc as per the data sheet.So the acquisition time should be about 1uS. Also I want to set the ADC in 10 bit mode and the maximum voltage to be measured is 5V. Is this possible with the default settings on Maple STMF103?&#60;/p&#62;
&#60;p&#62;Thanks&#60;br /&#62;
(Maple newbie)
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
