<?xml version="1.0" encoding="UTF-8"?><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"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Arduino DCF77 v0.2 released</title>
	<atom:link href="http://gonium.net/md/2007/01/06/arduino-dcf77-v02-released/feed/" rel="self" type="application/rss+xml" />
	<link>http://gonium.net/md/2007/01/06/arduino-dcf77-v02-released/</link>
	<description>so much time, so little to do.</description>
	<lastBuildDate>Sun, 18 Apr 2010 19:44:52 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Elektrowolle &#62; DCF77 Empfang mit Arduino</title>
		<link>http://gonium.net/md/2007/01/06/arduino-dcf77-v02-released/comment-page-1/#comment-2480</link>
		<dc:creator>Elektrowolle &#62; DCF77 Empfang mit Arduino</dc:creator>
		<pubDate>Sun, 18 Apr 2010 11:28:09 +0000</pubDate>
		<guid isPermaLink="false">http://gonium.net/md/2007/01/06/arduino-dcf77-v02-released/#comment-2480</guid>
		<description>[...] mein DCF-77 Empfänger ab und zu Aussetzer zeigte, funktionierte der Code von http://gonium.net/md/2007/01/06/arduino-dcf77-v02-released/ leider nicht auf [...]</description>
		<content:encoded><![CDATA[<p>[...] mein DCF-77 Empfänger ab und zu Aussetzer zeigte, funktionierte der Code von <a href="http://gonium.net/md/2007/01/06/arduino-dcf77-v02-released/" rel="nofollow">http://gonium.net/md/2007/01/06/arduino-dcf77-v02-released/</a> leider nicht auf [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: elektro_wolle</title>
		<link>http://gonium.net/md/2007/01/06/arduino-dcf77-v02-released/comment-page-1/#comment-2470</link>
		<dc:creator>elektro_wolle</dc:creator>
		<pubDate>Sat, 13 Feb 2010 22:10:29 +0000</pubDate>
		<guid isPermaLink="false">http://gonium.net/md/2007/01/06/arduino-dcf77-v02-released/#comment-2470</guid>
		<description>Hallo Mathias, 

Thanks for sharing the code, but I had nearly no chance to retrieve a clean signal from the conrad DCF77 receiver. Every 3 to 4 seconds the debug information shows several short signals before the 100ms and 200ms signals. I&#039;ve modified the interrupthandler to ignore the jitter:

/**
 * Interrupthandler for INT0 - called when the signal on Pin 2 changes.
 */
void int0handler() {
  int length = millis() - previousFlankTime;
  if (length &lt; 10) {
    // ignore jitter
    return;
  }
  // check the value again - since it takes some time to
  // activate the interrupt routine, we get a clear signal.
  DCFSignalState = digitalRead(DCF77PIN);
}

and removed the DCFSignalState assignment in the main loop.

The problem concerning TCCR2 can be easily solved via the MsTimer2 Library. Changing the interrupt initialisation to:

/**
 * Initialize the DCF77 routines: initialize the variables,
 * configure the interrupt behaviour.
 */
void DCF77Init() {
  previousSignalState=0;
  previousFlankTime=0;
  bufferPosition=0;
  dcf_rx_buffer=0;
  ss=mm=hh=day=mon=year=0;
#ifdef DCF_DEBUG 
  Serial.println(&quot;Initializing DCF77 routines&quot;);
  Serial.print(&quot;Using DCF77 pin #&quot;);
  Serial.println(DCF77PIN);
#endif
  pinMode(BLINKPIN, OUTPUT);
  pinMode(DCF77PIN, INPUT);
  
#ifdef DCF_DEBUG
  Serial.println(&quot;Initializing timerinterrupt&quot;);
#endif
  MsTimer2::set(1000, advanceClock); // 500ms period

#ifdef DCF_DEBUG
  Serial.println(&quot;Initializing DCF77 signal listener interrupt&quot;);
#endif  
  attachInterrupt(0, int0handler, CHANGE);
}

removing the old interrupthandler and added the advanceClock function:

/**
 * The interrupt routine for counting seconds - increment hh:mm:ss.
 */
void advanceClock() {
    ss++;
    if (ss==60) {
      ss=0;
      mm++;
      if (mm==60) {
        mm=0;
        hh++;
        if (hh==24) 
          hh=0;
      }
    }
}


The timer is started in &quot;Parity check OK - updating time&quot; branch via MsTimer2::start(). The sideeffect of placing the MsTimer2::start after a positive parity check is that the time is only printed after successful decoding of the DCF77 Data. 

I&#039;ll mail you the complete sketch for integrating the changes in a version 0.0.3

Best regards</description>
		<content:encoded><![CDATA[<p>Hallo Mathias, </p>
<p>Thanks for sharing the code, but I had nearly no chance to retrieve a clean signal from the conrad DCF77 receiver. Every 3 to 4 seconds the debug information shows several short signals before the 100ms and 200ms signals. I&#8217;ve modified the interrupthandler to ignore the jitter:</p>
<p>/**<br />
 * Interrupthandler for INT0 &#8211; called when the signal on Pin 2 changes.<br />
 */<br />
void int0handler() {<br />
  int length = millis() &#8211; previousFlankTime;<br />
  if (length &lt; 10) {<br />
    // ignore jitter<br />
    return;<br />
  }<br />
  // check the value again &#8211; since it takes some time to<br />
  // activate the interrupt routine, we get a clear signal.<br />
  DCFSignalState = digitalRead(DCF77PIN);<br />
}</p>
<p>and removed the DCFSignalState assignment in the main loop.</p>
<p>The problem concerning TCCR2 can be easily solved via the MsTimer2 Library. Changing the interrupt initialisation to:</p>
<p>/**<br />
 * Initialize the DCF77 routines: initialize the variables,<br />
 * configure the interrupt behaviour.<br />
 */<br />
void DCF77Init() {<br />
  previousSignalState=0;<br />
  previousFlankTime=0;<br />
  bufferPosition=0;<br />
  dcf_rx_buffer=0;<br />
  ss=mm=hh=day=mon=year=0;<br />
#ifdef DCF_DEBUG<br />
  Serial.println(&quot;Initializing DCF77 routines&quot;);<br />
  Serial.print(&quot;Using DCF77 pin #&quot;);<br />
  Serial.println(DCF77PIN);<br />
#endif<br />
  pinMode(BLINKPIN, OUTPUT);<br />
  pinMode(DCF77PIN, INPUT);</p>
<p>#ifdef DCF_DEBUG<br />
  Serial.println(&quot;Initializing timerinterrupt&quot;);<br />
#endif<br />
  MsTimer2::set(1000, advanceClock); // 500ms period</p>
<p>#ifdef DCF_DEBUG<br />
  Serial.println(&quot;Initializing DCF77 signal listener interrupt&quot;);<br />
#endif<br />
  attachInterrupt(0, int0handler, CHANGE);<br />
}</p>
<p>removing the old interrupthandler and added the advanceClock function:</p>
<p>/**<br />
 * The interrupt routine for counting seconds &#8211; increment hh:mm:ss.<br />
 */<br />
void advanceClock() {<br />
    ss++;<br />
    if (ss==60) {<br />
      ss=0;<br />
      mm++;<br />
      if (mm==60) {<br />
        mm=0;<br />
        hh++;<br />
        if (hh==24)<br />
          hh=0;<br />
      }<br />
    }<br />
}</p>
<p>The timer is started in &quot;Parity check OK &#8211; updating time&quot; branch via MsTimer2::start(). The sideeffect of placing the MsTimer2::start after a positive parity check is that the time is only printed after successful decoding of the DCF77 Data. </p>
<p>I&#039;ll mail you the complete sketch for integrating the changes in a version 0.0.3</p>
<p>Best regards</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Willy</title>
		<link>http://gonium.net/md/2007/01/06/arduino-dcf77-v02-released/comment-page-1/#comment-2469</link>
		<dc:creator>Willy</dc:creator>
		<pubDate>Sun, 24 Jan 2010 15:57:57 +0000</pubDate>
		<guid isPermaLink="false">http://gonium.net/md/2007/01/06/arduino-dcf77-v02-released/#comment-2469</guid>
		<description>Hi Stefan 
I have just the same problem with my Arduino Pro ATmega 328

In function ‘void DCF77Init()’:
error: ‘TCCR2′ was not declared in this scope

I use also the latest enviroment 0017 
What have you done so that it runs the program?

Thanks a lot for your help,

Willy</description>
		<content:encoded><![CDATA[<p>Hi Stefan<br />
I have just the same problem with my Arduino Pro ATmega 328</p>
<p>In function ‘void DCF77Init()’:<br />
error: ‘TCCR2′ was not declared in this scope</p>
<p>I use also the latest enviroment 0017<br />
What have you done so that it runs the program?</p>
<p>Thanks a lot for your help,</p>
<p>Willy</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: hiac</title>
		<link>http://gonium.net/md/2007/01/06/arduino-dcf77-v02-released/comment-page-1/#comment-2467</link>
		<dc:creator>hiac</dc:creator>
		<pubDate>Wed, 20 Jan 2010 09:58:37 +0000</pubDate>
		<guid isPermaLink="false">http://gonium.net/md/2007/01/06/arduino-dcf77-v02-released/#comment-2467</guid>
		<description>It&#039;s the same form me! 
error: &#039;TCCR2&#039; was not declared in this scope
Are there any solutions until now?

I&#039;m using Nano-Board and also Arduino-Software version 0017.</description>
		<content:encoded><![CDATA[<p>It&#8217;s the same form me!<br />
error: &#8216;TCCR2&#8242; was not declared in this scope<br />
Are there any solutions until now?</p>
<p>I&#8217;m using Nano-Board and also Arduino-Software version 0017.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jan Willem</title>
		<link>http://gonium.net/md/2007/01/06/arduino-dcf77-v02-released/comment-page-1/#comment-2466</link>
		<dc:creator>Jan Willem</dc:creator>
		<pubDate>Fri, 08 Jan 2010 15:42:03 +0000</pubDate>
		<guid isPermaLink="false">http://gonium.net/md/2007/01/06/arduino-dcf77-v02-released/#comment-2466</guid>
		<description>I have the same error and I am using a Freeduino V1.6 wtih the Conrad DCF77 and environment 015.</description>
		<content:encoded><![CDATA[<p>I have the same error and I am using a Freeduino V1.6 wtih the Conrad DCF77 and environment 015.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rory</title>
		<link>http://gonium.net/md/2007/01/06/arduino-dcf77-v02-released/comment-page-1/#comment-2465</link>
		<dc:creator>Rory</dc:creator>
		<pubDate>Mon, 04 Jan 2010 11:03:07 +0000</pubDate>
		<guid isPermaLink="false">http://gonium.net/md/2007/01/06/arduino-dcf77-v02-released/#comment-2465</guid>
		<description>I got it compiling properly by declaring the integer but also theres 2 others that need to be declared, so just add this near the top somewhere

int TIMSK;
int TCCR2;
int OCIE2;

So far with my reciever that i got today i have not got it working but its most likely my fault.
Rory</description>
		<content:encoded><![CDATA[<p>I got it compiling properly by declaring the integer but also theres 2 others that need to be declared, so just add this near the top somewhere</p>
<p>int TIMSK;<br />
int TCCR2;<br />
int OCIE2;</p>
<p>So far with my reciever that i got today i have not got it working but its most likely my fault.<br />
Rory</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: nomike</title>
		<link>http://gonium.net/md/2007/01/06/arduino-dcf77-v02-released/comment-page-1/#comment-2461</link>
		<dc:creator>nomike</dc:creator>
		<pubDate>Fri, 27 Nov 2009 20:31:41 +0000</pubDate>
		<guid isPermaLink="false">http://gonium.net/md/2007/01/06/arduino-dcf77-v02-released/#comment-2461</guid>
		<description>Has anyone solved the TCCR2 problem yet? I&#039;m using environment version 0017 too, and a duemilanove with an &quot;ATMEGA328&quot;.</description>
		<content:encoded><![CDATA[<p>Has anyone solved the TCCR2 problem yet? I&#8217;m using environment version 0017 too, and a duemilanove with an &#8220;ATMEGA328&#8243;.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Stefan</title>
		<link>http://gonium.net/md/2007/01/06/arduino-dcf77-v02-released/comment-page-1/#comment-2451</link>
		<dc:creator>Stefan</dc:creator>
		<pubDate>Tue, 20 Oct 2009 22:06:23 +0000</pubDate>
		<guid isPermaLink="false">http://gonium.net/md/2007/01/06/arduino-dcf77-v02-released/#comment-2451</guid>
		<description>Hi md

I just found your latest code on the project. but sadly I still can&#039;t make it work with my diecimila &gt;


 In function &#039;void DCF77Init()&#039;:
error: &#039;TCCR2&#039; was not declared in this scope

I use the latest enviroment 0017 - is this a problem?

Thanks a lot,
Stefan</description>
		<content:encoded><![CDATA[<p>Hi md</p>
<p>I just found your latest code on the project. but sadly I still can&#8217;t make it work with my diecimila &gt;</p>
<p> In function &#8216;void DCF77Init()&#8217;:<br />
error: &#8216;TCCR2&#8242; was not declared in this scope</p>
<p>I use the latest enviroment 0017 &#8211; is this a problem?</p>
<p>Thanks a lot,<br />
Stefan</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sascha</title>
		<link>http://gonium.net/md/2007/01/06/arduino-dcf77-v02-released/comment-page-1/#comment-2447</link>
		<dc:creator>Sascha</dc:creator>
		<pubDate>Sat, 10 Oct 2009 21:17:42 +0000</pubDate>
		<guid isPermaLink="false">http://gonium.net/md/2007/01/06/arduino-dcf77-v02-released/#comment-2447</guid>
		<description>Hallo Mathias,

versuche mich auch gerade darin, Deine DCF77 Software auf meinen Arduino zu übertragen.
Leider habe auch ich einen Fehler beim Compilieren, weil TCCR2 nicht definiert ist.
Liegt das an V017 der Arduino Software?</description>
		<content:encoded><![CDATA[<p>Hallo Mathias,</p>
<p>versuche mich auch gerade darin, Deine DCF77 Software auf meinen Arduino zu übertragen.<br />
Leider habe auch ich einen Fehler beim Compilieren, weil TCCR2 nicht definiert ist.<br />
Liegt das an V017 der Arduino Software?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Richard</title>
		<link>http://gonium.net/md/2007/01/06/arduino-dcf77-v02-released/comment-page-1/#comment-2420</link>
		<dc:creator>Richard</dc:creator>
		<pubDate>Sat, 06 Jun 2009 18:39:03 +0000</pubDate>
		<guid isPermaLink="false">http://gonium.net/md/2007/01/06/arduino-dcf77-v02-released/#comment-2420</guid>
		<description>Hi Mathias,
     thanks for your very nice job.

I have an Arduino Duemilanove ATMEGA 328 and no idea on the diff with 168...

Pb whith TCCR2 at compile...

Thanks.</description>
		<content:encoded><![CDATA[<p>Hi Mathias,<br />
     thanks for your very nice job.</p>
<p>I have an Arduino Duemilanove ATMEGA 328 and no idea on the diff with 168&#8230;</p>
<p>Pb whith TCCR2 at compile&#8230;</p>
<p>Thanks.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
