<?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; User Favorites: Luis Pereira</title>
		<link><a href='http://forums.leaflabs.com/profile.php?id=4665'>4665</a></link>
		<description>A place to share, learn, and grow...</description>
		<language>en-US</language>
		<pubDate>Fri, 22 Jan 2016 00:27:41 +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?profile=4665" rel="self" type="application/rss+xml" />

		<item>
			<title>Luis Pereira on "Timers Channel Compare only works at Overflow rate"</title>
			<link>http://forums.leaflabs.com/topic.php?id=1790#post-10854</link>
			<pubDate>Thu, 24 May 2012 17:28:26 +0000</pubDate>
			<dc:creator>Luis Pereira</dc:creator>
			<guid isPermaLink="false">10854@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;It had to be an basic error....&#60;br /&#62;
I missed that even if the Interrupt is thrigered, the timer count until the overflow value...&#60;br /&#62;
to have the expected behavior I should set the timer counter to zero...&#60;br /&#62;
&#60;pre&#62;&#60;code&#62;void Interrupt_Fo_Step(void) {
  Timer_Fo.setCount(0);
  toggleLED();
}&#60;/code&#62;&#60;/pre&#62;</description>
		</item>
		<item>
			<title>Luis Pereira on "Timers Channel Compare only works at Overflow rate"</title>
			<link>http://forums.leaflabs.com/topic.php?id=1790#post-10841</link>
			<pubDate>Thu, 24 May 2012 10:22:28 +0000</pubDate>
			<dc:creator>Luis Pereira</dc:creator>
			<guid isPermaLink="false">10841@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;Dear All, &#60;/p&#62;
&#60;p&#62;I'm new on Mapple! As usual because the lack of power from Arduino. :D&#60;br /&#62;
I'm really interested in the 4 channels Timers for my final application, but in my initial tests with small pieces of code for familiarization, I got stuck in the Timers Functions.&#60;br /&#62;
I already manage to have the Timers working, but now I don't know what's wrong with the following code because even with TIMER_CH1 set to 1/5 of the overflow value (1 and 5sec), the BOARD_LED flash at 5 sec. rate (Overflow value)...&#60;/p&#62;
&#60;p&#62;Can you please let mw know what's wrong?!&#60;br /&#62;
IDE v0.0.12&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;void Interrupt_Fo_Step(void);
HardwareTimer Timer_Fo(1);  //Set Timer_Fo to Timer1
int temp=0;
void setup() {
    pinMode(BOARD_LED_PIN, OUTPUT);

    Timer_Fo.setMode(TIMER_CH1, TIMER_OUTPUT_COMPARE);  //
    Timer_Fo.pause();
    Timer_Fo.setCount(0);
    Timer_Fo.setPrescaleFactor(7200); //Prescale 7200 -&#38;gt; 0.01Mhz -&#38;gt; 100us
    Timer_Fo.setOverflow(50000); //50000*100us = 5sec
    Timer_Fo.setCompare(TIMER_CH1, 10000);   //10000*100us = 1sec
    Timer_Fo.attachInterrupt(TIMER_CH1, Interrupt_Fo_Step);
    Timer_Fo.refresh();
    Timer_Fo.resume();
}

void loop() {
  temp++;
}

void Interrupt_Fo_Step(void) {
  toggleLED();
}&#60;/code&#62;&#60;/pre&#62;</description>
		</item>

	</channel>
</rss>
