<?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: Some Problem with timer(in I2C mode)</title>
		<link>http://forums.leaflabs.com/topic.php?id=74416</link>
		<description>A place to share, learn, and grow...</description>
		<language>en-US</language>
		<pubDate>Fri, 22 Jan 2016 00:04:31 +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=74416" rel="self" type="application/rss+xml" />

		<item>
			<title>Scobbing on "Some Problem with timer(in I2C mode)"</title>
			<link>http://forums.leaflabs.com/topic.php?id=74416#post-105703</link>
			<pubDate>Sat, 04 Apr 2015 07:51:59 +0000</pubDate>
			<dc:creator>Scobbing</dc:creator>
			<guid isPermaLink="false">105703@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;thanks for all of you :D
&#60;/p&#62;</description>
		</item>
		<item>
			<title>madias on "Some Problem with timer(in I2C mode)"</title>
			<link>http://forums.leaflabs.com/topic.php?id=74416#post-105663</link>
			<pubDate>Sun, 22 Feb 2015 10:01:05 +0000</pubDate>
			<dc:creator>madias</dc:creator>
			<guid isPermaLink="false">105663@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;Pardon, Scoobing, but the library you wanna transfer is AVR code only. (TCCR1A.... are the low level timer register for AVR (=&#34;Arduino&#34; 8bit).&#60;br /&#62;
Please start here:&#60;br /&#62;
&#60;a href=&#34;http://leaflabs.com/docs/hardware/maple-mini.html&#34; rel=&#34;nofollow&#34;&#62;http://leaflabs.com/docs/hardware/maple-mini.html&#60;/a&#62;&#60;br /&#62;
and here&#60;br /&#62;
&#60;a href=&#34;http://leaflabs.com/docs/hardware/maple-mini.html&#34; rel=&#34;nofollow&#34;&#62;http://leaflabs.com/docs/hardware/maple-mini.html&#60;/a&#62;&#60;br /&#62;
for the fundamental basics you need to know.&#60;br /&#62;
In other words: There is no sense converting the AVR timer library, because you can use &#34;Hardwaretimer&#34; (second link)&#60;br /&#62;
regards&#60;br /&#62;
Matthias
&#60;/p&#62;</description>
		</item>
		<item>
			<title>tormod on "Some Problem with timer(in I2C mode)"</title>
			<link>http://forums.leaflabs.com/topic.php?id=74416#post-105662</link>
			<pubDate>Sun, 22 Feb 2015 04:47:41 +0000</pubDate>
			<dc:creator>tormod</dc:creator>
			<guid isPermaLink="false">105662@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;Roger, thanks for linking to that active forum. But wouldn't it be better, if that is going to be the &#34;official&#34; forum, to not have everything in one thread? Otherwise, you could always invite people to join here also :)
&#60;/p&#62;</description>
		</item>
		<item>
			<title>rogerclark on "Some Problem with timer(in I2C mode)"</title>
			<link>http://forums.leaflabs.com/topic.php?id=74416#post-105658</link>
			<pubDate>Fri, 20 Feb 2015 20:37:20 +0000</pubDate>
			<dc:creator>rogerclark</dc:creator>
			<guid isPermaLink="false">105658@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;Try posting to &#60;a href=&#34;http://forum.arduino.cc/index.php?topic=265904.new#new&#34; rel=&#34;nofollow&#34;&#62;http://forum.arduino.cc/index.php?topic=265904.new#new&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;We now have an active community on the official Arduino forum.&#60;/p&#62;
&#60;p&#62;Note. We also have replacement hardware files for Arduino IDE 1.6 (latest version)
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Scobbing on "Some Problem with timer(in I2C mode)"</title>
			<link>http://forums.leaflabs.com/topic.php?id=74416#post-105650</link>
			<pubDate>Sat, 07 Feb 2015 21:06:13 +0000</pubDate>
			<dc:creator>Scobbing</dc:creator>
			<guid isPermaLink="false">105650@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;Hi, I want to transfer my Arduino problem to Maple, I find I use a library, and IDE show me some wrong with it.&#60;/p&#62;
&#60;p&#62;When I solve other problems, I find this warning&#34;error:'TCCR1A' was not declared in this scope&#34;. I know TCCR1A is a timer,but I don't know how to solve this problem ,please help me.&#60;/p&#62;
&#60;p&#62;thanks :D!&#60;/p&#62;
&#60;p&#62;void InitPWMInterrupt()&#60;br /&#62;
{&#60;br /&#62;
#if (DEBUG)&#60;br /&#62;
    Serial2.println(&#34;PWM interrupt initialized&#34;);&#60;br /&#62;
#endif&#60;/p&#62;
&#60;p&#62;    TCCR1A =&#60;br /&#62;
       (0 &#38;lt;&#38;lt; WGM10) &#124;&#60;br /&#62;
       (0 &#38;lt;&#38;lt; WGM11) &#124;&#60;br /&#62;
       (0 &#38;lt;&#38;lt; COM1A1) &#124;&#60;br /&#62;
       (1 &#38;lt;&#38;lt; COM1A0) &#124; // Toggle pin om compare-match&#60;br /&#62;
       (0 &#38;lt;&#38;lt; COM1B1) &#124;&#60;br /&#62;
       (0 &#38;lt;&#38;lt; COM1B0);  &#60;/p&#62;
&#60;p&#62;    TCCR1B =&#60;br /&#62;
        (1 &#38;lt;&#38;lt; ICNC1)&#124; // Input capture noise canceler - set to active&#60;br /&#62;
        (1 &#38;lt;&#38;lt; ICES1)&#124; // Input capture edge select. 1 = rising, 0 = falling. We will toggle this, doesn't matter what it starts at&#60;br /&#62;
        (0 &#38;lt;&#38;lt; CS10) &#124; // Prescale 8&#60;br /&#62;
        (1 &#38;lt;&#38;lt; CS11) &#124; // Prescale 8&#60;br /&#62;
        (0 &#38;lt;&#38;lt; CS12) &#124; // Prescale 8&#60;br /&#62;
        (0 &#38;lt;&#38;lt; WGM13)&#124;&#60;br /&#62;
        (1 &#38;lt;&#38;lt; WGM12); // CTC mode (Clear timer on compare match) with ICR1 as top.           &#60;/p&#62;
&#60;p&#62;    // Not used in this case:&#60;br /&#62;
    TCCR1C =&#60;br /&#62;
        (0 &#38;lt;&#38;lt; FOC1A)&#124; // No force output compare (A)&#60;br /&#62;
        (0 &#38;lt;&#38;lt; FOC1B); // No force output compare (B)&#60;/p&#62;
&#60;p&#62;    TIMSK1 =&#60;br /&#62;
        (PPM_IN &#38;lt;&#38;lt; ICIE1) &#124; // Enable input capture interrupt&#60;br /&#62;
        (1 &#38;lt;&#38;lt; OCIE1A) &#124; // Interrupt on compare A&#60;br /&#62;
        (0 &#38;lt;&#38;lt; OCIE1B) &#124; // Disable interrupt on compare B&#60;br /&#62;
        (0 &#38;lt;&#38;lt; TOIE1);          &#60;/p&#62;
&#60;p&#62;    // OCR1A is used to generate PPM signal and later reset counter (to control frame-length)&#60;br /&#62;
    OCR1A = DEAD_TIME;&#60;br /&#62;
}&#60;/p&#62;
&#60;p&#62;//--------------------------------------------------------------------------------------&#60;br /&#62;
// Func: InitTimerInterrupt&#60;br /&#62;
// Desc: Initializes timer interrupts.&#60;br /&#62;
//--------------------------------------------------------------------------------------&#60;br /&#62;
void InitTimerInterrupt()&#60;br /&#62;
{&#60;br /&#62;
#if (DEBUG)&#60;br /&#62;
    Serial2.println(&#34;Timer interrupt initialized&#34;);&#60;br /&#62;
#endif&#60;/p&#62;
&#60;p&#62;    TCCR0A =&#60;br /&#62;
       (0 &#38;lt;&#38;lt; WGM00) &#124;&#60;br /&#62;
       (1 &#38;lt;&#38;lt; WGM01) &#124;&#60;br /&#62;
       (0 &#38;lt;&#38;lt; COM0A1) &#124;&#60;br /&#62;
       (0 &#38;lt;&#38;lt; COM0A0) &#124;&#60;br /&#62;
       (0 &#38;lt;&#38;lt; COM0B1) &#124;&#60;br /&#62;
       (0 &#38;lt;&#38;lt; COM0B0);  &#60;/p&#62;
&#60;p&#62;    // 61 hz update-rate:&#60;br /&#62;
    TCCR0B =&#60;br /&#62;
        (0 &#38;lt;&#38;lt; FOC0A)&#124; //&#60;br /&#62;
        (0 &#38;lt;&#38;lt; FOC0B)&#124; //&#60;br /&#62;
        (1 &#38;lt;&#38;lt; CS00) &#124; // Prescale 1024&#60;br /&#62;
        (0 &#38;lt;&#38;lt; CS01) &#124; // Prescale 1024&#60;br /&#62;
        (1 &#38;lt;&#38;lt; CS02) &#124; // Prescale 1024&#60;br /&#62;
        (0 &#38;lt;&#38;lt; WGM02);&#60;/p&#62;
&#60;p&#62;    TIMSK0 =&#60;br /&#62;
        (0 &#38;lt;&#38;lt; OCIE0B) &#124;&#60;br /&#62;
        (1 &#38;lt;&#38;lt; OCIE0A) &#124;&#60;br /&#62;
        (1 &#38;lt;&#38;lt; TOIE0);       &#60;/p&#62;
&#60;p&#62;    OCR0B = 64 * 2;&#60;br /&#62;
    OCR0A = 64 * 2;&#60;br /&#62;
}
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
