<?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: Tweaking the code</title>
	<atom:link href="http://gonium.net/md/2007/04/18/tweaking-the-code/feed/" rel="self" type="application/rss+xml" />
	<link>http://gonium.net/md/2007/04/18/tweaking-the-code/</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: Richard</title>
		<link>http://gonium.net/md/2007/04/18/tweaking-the-code/comment-page-1/#comment-2422</link>
		<dc:creator>Richard</dc:creator>
		<pubDate>Sun, 07 Jun 2009 19:02:30 +0000</pubDate>
		<guid isPermaLink="false">http://gonium.net/md/2007/04/18/tweaking-the-code/#comment-2422</guid>
		<description>hi,
    on ATMega328-based Arduinos, this code is not running.
    Any idea if the changes for ATMega168 is also valid for ATMega328 ?
    Thanks a lot for this nice work !

Best regards.</description>
		<content:encoded><![CDATA[<p>hi,<br />
    on ATMega328-based Arduinos, this code is not running.<br />
    Any idea if the changes for ATMega168 is also valid for ATMega328 ?<br />
    Thanks a lot for this nice work !</p>
<p>Best regards.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Richard</title>
		<link>http://gonium.net/md/2007/04/18/tweaking-the-code/comment-page-1/#comment-2421</link>
		<dc:creator>Richard</dc:creator>
		<pubDate>Sun, 07 Jun 2009 18:57:44 +0000</pubDate>
		<guid isPermaLink="false">http://gonium.net/md/2007/04/18/tweaking-the-code/#comment-2421</guid>
		<description>hi,

 Atmega328 this code 

I am findi</description>
		<content:encoded><![CDATA[<p>hi,</p>
<p> Atmega328 this code </p>
<p>I am findi</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: passi</title>
		<link>http://gonium.net/md/2007/04/18/tweaking-the-code/comment-page-1/#comment-2419</link>
		<dc:creator>passi</dc:creator>
		<pubDate>Sat, 06 Jun 2009 16:15:45 +0000</pubDate>
		<guid isPermaLink="false">http://gonium.net/md/2007/04/18/tweaking-the-code/#comment-2419</guid>
		<description>I have some issues with keeping the time as well but got a rtc clock flying around here, can you drop me a line with the code for this one so I can see how you solved the periodical syncs?

Cheers

Passi</description>
		<content:encoded><![CDATA[<p>I have some issues with keeping the time as well but got a rtc clock flying around here, can you drop me a line with the code for this one so I can see how you solved the periodical syncs?</p>
<p>Cheers</p>
<p>Passi</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: koos</title>
		<link>http://gonium.net/md/2007/04/18/tweaking-the-code/comment-page-1/#comment-2418</link>
		<dc:creator>koos</dc:creator>
		<pubDate>Thu, 28 May 2009 15:35:08 +0000</pubDate>
		<guid isPermaLink="false">http://gonium.net/md/2007/04/18/tweaking-the-code/#comment-2418</guid>
		<description>Hello Mathias,

Firstly, thank you for publishing this nice piece of code !
Due to a faulty DCF board, as I found out later, I needed to take a closer look at it. I discovered a small bug that causes the backup stand-alone clock to lag a few milliseconds/second behind. Furthermore I needed to optimise the code in order to include the clock in other program. Amongst others, the timer interrupt now occurs once per second using the TimerOne library.
If you would like I can mail the modified sketch to you to publish a new version.

groeten, koos</description>
		<content:encoded><![CDATA[<p>Hello Mathias,</p>
<p>Firstly, thank you for publishing this nice piece of code !<br />
Due to a faulty DCF board, as I found out later, I needed to take a closer look at it. I discovered a small bug that causes the backup stand-alone clock to lag a few milliseconds/second behind. Furthermore I needed to optimise the code in order to include the clock in other program. Amongst others, the timer interrupt now occurs once per second using the TimerOne library.<br />
If you would like I can mail the modified sketch to you to publish a new version.</p>
<p>groeten, koos</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ahon</title>
		<link>http://gonium.net/md/2007/04/18/tweaking-the-code/comment-page-1/#comment-2417</link>
		<dc:creator>ahon</dc:creator>
		<pubDate>Mon, 25 May 2009 16:01:14 +0000</pubDate>
		<guid isPermaLink="false">http://gonium.net/md/2007/04/18/tweaking-the-code/#comment-2417</guid>
		<description>hallo,
I hope you still check this thread.
I tried your code, it seems work fine.
but it starts always from 0, such as;
Time: 0:0:1 Date: 0.0.0
Time: 0:0:2 Date: 0.0.0
i waited for start up for 5minutes.
but start it still from 0..
any idea?
thanks
ahon</description>
		<content:encoded><![CDATA[<p>hallo,<br />
I hope you still check this thread.<br />
I tried your code, it seems work fine.<br />
but it starts always from 0, such as;<br />
Time: 0:0:1 Date: 0.0.0<br />
Time: 0:0:2 Date: 0.0.0<br />
i waited for start up for 5minutes.<br />
but start it still from 0..<br />
any idea?<br />
thanks<br />
ahon</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: md</title>
		<link>http://gonium.net/md/2007/04/18/tweaking-the-code/comment-page-1/#comment-2398</link>
		<dc:creator>md</dc:creator>
		<pubDate>Wed, 28 Jan 2009 19:31:55 +0000</pubDate>
		<guid isPermaLink="false">http://gonium.net/md/2007/04/18/tweaking-the-code/#comment-2398</guid>
		<description>Hi Jan,

I am sorry to hear that the code has these hiccups. I don&#039;t have an Arduino any more (I gave it to my brother) so I can&#039;t reproduce it now. If I remember the code correctly it simply measures the time between two signals as received by the DCF77 module. Depending on the time between two signals it determines if a &quot;0&quot; or a &quot;1&quot; bit was received. Each second a bit is transmitted.

The 59th second does not contain a bit and is used to synchronize the beginning of a new minute. I think here lies the problem: there is no signal for longer than a second, so the code resets the second count.

I would guess that you have an electrical problem: either the DCF signal is to weak where you are or the connection between the Arduino and the receiver is not solid. Try a different location and different pullup resistors (e.g. 10k vs 4k7).

HTH,
-Mathias

BTW: In another (unpublished) project I use the DCF77 receiver only to synchronize time periodically. I rely on a RTC to keep the time, in my case the DS1307. It also allows you to have a backup battery that keeps your time even if the power goes down. Reminds me that I could blog about this project ;-)</description>
		<content:encoded><![CDATA[<p>Hi Jan,</p>
<p>I am sorry to hear that the code has these hiccups. I don&#8217;t have an Arduino any more (I gave it to my brother) so I can&#8217;t reproduce it now. If I remember the code correctly it simply measures the time between two signals as received by the DCF77 module. Depending on the time between two signals it determines if a &#8220;0&#8243; or a &#8220;1&#8243; bit was received. Each second a bit is transmitted.</p>
<p>The 59th second does not contain a bit and is used to synchronize the beginning of a new minute. I think here lies the problem: there is no signal for longer than a second, so the code resets the second count.</p>
<p>I would guess that you have an electrical problem: either the DCF signal is to weak where you are or the connection between the Arduino and the receiver is not solid. Try a different location and different pullup resistors (e.g. 10k vs 4k7).</p>
<p>HTH,<br />
-Mathias</p>
<p>BTW: In another (unpublished) project I use the DCF77 receiver only to synchronize time periodically. I rely on a RTC to keep the time, in my case the DS1307. It also allows you to have a backup battery that keeps your time even if the power goes down. Reminds me that I could blog about this project ;-)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jan</title>
		<link>http://gonium.net/md/2007/04/18/tweaking-the-code/comment-page-1/#comment-2397</link>
		<dc:creator>Jan</dc:creator>
		<pubDate>Tue, 27 Jan 2009 19:32:52 +0000</pubDate>
		<guid isPermaLink="false">http://gonium.net/md/2007/04/18/tweaking-the-code/#comment-2397</guid>
		<description>Hi Mathias,

thanks for your DCF-77 code! I&#039;ve got a question: I&#039;ve been running version 0.2.1 for about a day on a Diecimila board, and found that it loses about half an hour over a day. Every now and then, it seems to miss a few seconds, and then goes back to the start of the same minute. Here&#039;s an example from the serial log with two such hiccups:

Time: 19:54:57 Date: 27.1.2009
Time: 19:54:58 Date: 27.1.2009
Time: 19:54:0 Date: 27.1.2009
Time: 19:54:1 Date: 27.1.2009
Time: 19:54:2 Date: 27.1.2009
Time: 19:54:3 Date: 27.1.2009
Time: 19:54:0 Date: 27.1.2009
Time: 19:54:1 Date: 27.1.2009
Time: 19:54:2 Date: 27.1.2009
Time: 19:54:3 Date: 27.1.2009

I&#039;ll try to find the bug myself, but any ideas what might cause this?

Thanks!

- jan</description>
		<content:encoded><![CDATA[<p>Hi Mathias,</p>
<p>thanks for your DCF-77 code! I&#8217;ve got a question: I&#8217;ve been running version 0.2.1 for about a day on a Diecimila board, and found that it loses about half an hour over a day. Every now and then, it seems to miss a few seconds, and then goes back to the start of the same minute. Here&#8217;s an example from the serial log with two such hiccups:</p>
<p>Time: 19:54:57 Date: 27.1.2009<br />
Time: 19:54:58 Date: 27.1.2009<br />
Time: 19:54:0 Date: 27.1.2009<br />
Time: 19:54:1 Date: 27.1.2009<br />
Time: 19:54:2 Date: 27.1.2009<br />
Time: 19:54:3 Date: 27.1.2009<br />
Time: 19:54:0 Date: 27.1.2009<br />
Time: 19:54:1 Date: 27.1.2009<br />
Time: 19:54:2 Date: 27.1.2009<br />
Time: 19:54:3 Date: 27.1.2009</p>
<p>I&#8217;ll try to find the bug myself, but any ideas what might cause this?</p>
<p>Thanks!</p>
<p>- jan</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: md</title>
		<link>http://gonium.net/md/2007/04/18/tweaking-the-code/comment-page-1/#comment-2028</link>
		<dc:creator>md</dc:creator>
		<pubDate>Mon, 28 Jan 2008 10:57:28 +0000</pubDate>
		<guid isPermaLink="false">http://gonium.net/md/2007/04/18/tweaking-the-code/#comment-2028</guid>
		<description>Hi Jul,

aparently, you don&#039;t have the ATMEGA168 flag defined, so the Compiler tries to compile the definitions for the ATMega8 (and the initialization registers have slightly different names...)

Try adding the line
#define ATMEGA168
to your code.

-Mathias</description>
		<content:encoded><![CDATA[<p>Hi Jul,</p>
<p>aparently, you don&#8217;t have the ATMEGA168 flag defined, so the Compiler tries to compile the definitions for the ATMega8 (and the initialization registers have slightly different names&#8230;)</p>
<p>Try adding the line<br />
#define ATMEGA168<br />
to your code.</p>
<p>-Mathias</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: julian</title>
		<link>http://gonium.net/md/2007/04/18/tweaking-the-code/comment-page-1/#comment-2027</link>
		<dc:creator>julian</dc:creator>
		<pubDate>Mon, 28 Jan 2008 09:57:24 +0000</pubDate>
		<guid isPermaLink="false">http://gonium.net/md/2007/04/18/tweaking-the-code/#comment-2027</guid>
		<description>Hallo Mathias,

sorry my fault. My error is:

In function &#039;void DCF77Init()&#039;:
error: &#039;TCCR2&#039; was not declared in this scope

I have an arduiono diecimile an the atmega168.

Jul</description>
		<content:encoded><![CDATA[<p>Hallo Mathias,</p>
<p>sorry my fault. My error is:</p>
<p>In function &#8216;void DCF77Init()&#8217;:<br />
error: &#8216;TCCR2&#8242; was not declared in this scope</p>
<p>I have an arduiono diecimile an the atmega168.</p>
<p>Jul</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: md</title>
		<link>http://gonium.net/md/2007/04/18/tweaking-the-code/comment-page-1/#comment-2025</link>
		<dc:creator>md</dc:creator>
		<pubDate>Mon, 28 Jan 2008 09:21:33 +0000</pubDate>
		<guid isPermaLink="false">http://gonium.net/md/2007/04/18/tweaking-the-code/#comment-2025</guid>
		<description>Hi Jul,

are you sure we&#039;re talking about my code above (v0.2.1)? There is no DCF77.cpp in this archive, and the serialDumpTime function starts at line 225. Nevertheless, there is no HardwareSerial.print(..) in Arduino, but a Serial.print(...), AFAIK.

Sorry, but try to use this sketch unmodified first. I don&#039;t have an Arduino 10 environment here, but since the interfaces weren&#039;t changed, the code *should* work.

HTH,
-Mathias</description>
		<content:encoded><![CDATA[<p>Hi Jul,</p>
<p>are you sure we&#8217;re talking about my code above (v0.2.1)? There is no DCF77.cpp in this archive, and the serialDumpTime function starts at line 225. Nevertheless, there is no HardwareSerial.print(..) in Arduino, but a Serial.print(&#8230;), AFAIK.</p>
<p>Sorry, but try to use this sketch unmodified first. I don&#8217;t have an Arduino 10 environment here, but since the interfaces weren&#8217;t changed, the code *should* work.</p>
<p>HTH,<br />
-Mathias</p>
]]></content:encoded>
	</item>
</channel>
</rss>
