<?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: Timers</title>
		<link>http://forums.leaflabs.com/topic.php?id=585</link>
		<description>A place to share, learn, and grow...</description>
		<language>en-US</language>
		<pubDate>Fri, 22 Jan 2016 00:24:25 +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=585" rel="self" type="application/rss+xml" />

		<item>
			<title>mbolivar on "Timers"</title>
			<link>http://forums.leaflabs.com/topic.php?id=585#post-3240</link>
			<pubDate>Mon, 27 Dec 2010 17:31:41 +0000</pubDate>
			<dc:creator>mbolivar</dc:creator>
			<guid isPermaLink="false">3240@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;millis() does use systick, as crenn said.  however, delay() is currently implemented in terms of delayMicroseconds(), which is just an empirically determined busy-wait in assembly. see time.c for the details:&#60;/p&#62;
&#60;p&#62;&#60;a href=&#34;https://github.com/leaflabs/libmaple/blob/0.0.9/wirish/time.c&#34; rel=&#34;nofollow&#34;&#62;https://github.com/leaflabs/libmaple/blob/0.0.9/wirish/time.c&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;the timers are initialized by default in init(), starting on line 68:&#60;/p&#62;
&#60;p&#62;&#60;a href=&#34;https://github.com/leaflabs/libmaple/blob/0.0.9/wirish/wirish.c&#34; rel=&#34;nofollow&#34;&#62;https://github.com/leaflabs/libmaple/blob/0.0.9/wirish/wirish.c&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;since a timer's prescaler and reset values are shared across all channels, altering those will affect pwm on all pins associated with the timer.  here is a table you may find useful:&#60;br /&#62;
&#60;a href=&#34;http://leaflabs.com/docs/timers.html#caveats&#34; rel=&#34;nofollow&#34;&#62;http://leaflabs.com/docs/timers.html#caveats&#60;/a&#62;
&#60;/p&#62;</description>
		</item>
		<item>
			<title>gbulmer on "Timers"</title>
			<link>http://forums.leaflabs.com/topic.php?id=585#post-3232</link>
			<pubDate>Mon, 27 Dec 2010 09:20:02 +0000</pubDate>
			<dc:creator>gbulmer</dc:creator>
			<guid isPermaLink="false">3232@http://forums.leaflabs.com/</guid>
			<description>&#60;blockquote&#62;&#60;p&#62;Any reason for them to be turned on by default if they dont do anything?&#60;/p&#62;&#60;/blockquote&#62;
&#60;p&#62;Maybe partly because that's how the Arduino is set up. All of its timers are up and running. I am in favour of this because setting up the hardware is often one of the biggest hurdels for a beginner to overcome.&#60;/p&#62;
&#60;p&#62;I imagine it also makes some of the other code, like pwmWrite, a bit simpler if it can assume the timer is already going.&#60;/p&#62;
&#60;p&#62;Finally, the timers are doing something, they are running!-)&#60;br /&#62;
So it is pretty straightforward to go look at a running timer to get a value. IMHO, this is very beginner friendly, and makes 'foraging' around the peripherals easier to get started on.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>General Tree on "Timers"</title>
			<link>http://forums.leaflabs.com/topic.php?id=585#post-3230</link>
			<pubDate>Mon, 27 Dec 2010 06:17:51 +0000</pubDate>
			<dc:creator>General Tree</dc:creator>
			<guid isPermaLink="false">3230@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;Great, thanks.&#60;/p&#62;
&#60;p&#62;Any reason for them to be turned on by default if they dont do anything?
&#60;/p&#62;</description>
		</item>
		<item>
			<title>crenn on "Timers"</title>
			<link>http://forums.leaflabs.com/topic.php?id=585#post-3229</link>
			<pubDate>Mon, 27 Dec 2010 05:57:54 +0000</pubDate>
			<dc:creator>crenn</dc:creator>
			<guid isPermaLink="false">3229@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;All of them are available to tweak.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>General Tree on "Timers"</title>
			<link>http://forums.leaflabs.com/topic.php?id=585#post-3228</link>
			<pubDate>Mon, 27 Dec 2010 05:57:06 +0000</pubDate>
			<dc:creator>General Tree</dc:creator>
			<guid isPermaLink="false">3228@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;By tweak I mean to change the period of the counting, or the prescaler, or even turn it off, without it hurting the functions mentioned above.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>crenn on "Timers"</title>
			<link>http://forums.leaflabs.com/topic.php?id=585#post-3225</link>
			<pubDate>Mon, 27 Dec 2010 05:46:53 +0000</pubDate>
			<dc:creator>crenn</dc:creator>
			<guid isPermaLink="false">3225@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;I believe that the systick timer is used for delay() and millis(). What do you mean by tweak?
&#60;/p&#62;</description>
		</item>
		<item>
			<title>General Tree on "Timers"</title>
			<link>http://forums.leaflabs.com/topic.php?id=585#post-3224</link>
			<pubDate>Mon, 27 Dec 2010 05:42:10 +0000</pubDate>
			<dc:creator>General Tree</dc:creator>
			<guid isPermaLink="false">3224@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;Hi everyone.&#60;/p&#62;
&#60;p&#62;Iv'e been playing with the timers, and saw that upon startup, timers 1-4 are already running by default.&#60;br /&#62;
I was wondering which ones of them are used for functions like delay(), millis() etc.,&#60;br /&#62;
and which ones are there for me to tweak.&#60;/p&#62;
&#60;p&#62;thanks
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
