<?xml version="1.0" encoding="windows-1252"?><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: Prime-ary Prototype: Complete!</title>
	<atom:link href="http://www.SWHarden.com/blog/2009-06-10-primary-prototype-complete/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.SWHarden.com/blog/2009-06-10-primary-prototype-complete/</link>
	<description>A collection of thoughts in technological degradation</description>
	<lastBuildDate>Tue, 31 Aug 2010 10:23:58 -0700</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Kenneth Finnegan</title>
		<link>http://www.SWHarden.com/blog/2009-06-10-primary-prototype-complete/comment-page-1/#comment-10448</link>
		<dc:creator>Kenneth Finnegan</dc:creator>
		<pubDate>Sat, 28 Aug 2010 06:54:32 +0000</pubDate>
		<guid isPermaLink="false">http://www.SWHarden.com/blog/?p=1180#comment-10448</guid>
		<description>Very nice, but as far as your display, I think you should invest a little time into learning how to use the timer interrupts on the AVRs.  It makes for much easier coding, generally smaller code size (the function calls are implicit) and is one of the first steps towards low power consumption programming (replacing the idle loops with sleep calls).  I wrote up a relatively simple example using this a few months ago: http://kennethfinnegan.blogspot.com/2010/03/attiny2313-four-digit-clock.html</description>
		<content:encoded><![CDATA[<p>Very nice, but as far as your display, I think you should invest a little time into learning how to use the timer interrupts on the AVRs.  It makes for much easier coding, generally smaller code size (the function calls are implicit) and is one of the first steps towards low power consumption programming (replacing the idle loops with sleep calls).  I wrote up a relatively simple example using this a few months ago: <a href="http://kennethfinnegan.blogspot.com/2010/03/attiny2313-four-digit-clock.html" rel="nofollow" onclick="javascript:urchinTracker ('/outbound/comment/kennethfinnegan.blogspot.com');">http://kennethfinnegan.blogspot.com/2010/03/attiny2313-four-digit-clock.html</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Yann Vernier</title>
		<link>http://www.SWHarden.com/blog/2009-06-10-primary-prototype-complete/comment-page-1/#comment-10419</link>
		<dc:creator>Yann Vernier</dc:creator>
		<pubDate>Tue, 24 Aug 2010 17:20:35 +0000</pubDate>
		<guid isPermaLink="false">http://www.SWHarden.com/blog/?p=1180#comment-10419</guid>
		<description>Found the culprit. The delay functions are meant to be called with constant values, and delay was declared as a variable. With -fwhole-program, gcc could tell it was never written. Adding &quot;const&quot; to the declaration char delay=1; caused the code to drop to under 1k. Thus it really did generate floating point code, for a single constant 1, no less.</description>
		<content:encoded><![CDATA[<p>Found the culprit. The delay functions are meant to be called with constant values, and delay was declared as a variable. With -fwhole-program, gcc could tell it was never written. Adding &#8220;const&#8221; to the declaration char delay=1; caused the code to drop to under 1k. Thus it really did generate floating point code, for a single constant 1, no less.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Yann Vernier</title>
		<link>http://www.SWHarden.com/blog/2009-06-10-primary-prototype-complete/comment-page-1/#comment-10417</link>
		<dc:creator>Yann Vernier</dc:creator>
		<pubDate>Tue, 24 Aug 2010 17:06:43 +0000</pubDate>
		<guid isPermaLink="false">http://www.SWHarden.com/blog/?p=1180#comment-10417</guid>
		<description>Actually, the code doesn&#039;t seem to use anything from math.h/libm (such as, for instance, sqrt). I would guess most of the code size comes from how it has been compiled; I tend to use avr-gcc -Os -fwhole-program. The costly calls in there are multiplication (the tiny2313 doesn&#039;t have a multiplier), division and modulo (32-bit, no less), and, if you have an unfortunate combination of avr-libc and compiler settings, the delay calls themselves. 
A quick test at compiling that way yielded an 870 byte program. Leaving out -fwhole-program means it can&#039;t eliminate or simplify any functions, and then I got sizes around 4.5k, easily twice as large as a 2313. Since that wouldn&#039;t fit at all there&#039;s probably some middle ground I&#039;m missing.</description>
		<content:encoded><![CDATA[<p>Actually, the code doesn&#8217;t seem to use anything from math.h/libm (such as, for instance, sqrt). I would guess most of the code size comes from how it has been compiled; I tend to use avr-gcc -Os -fwhole-program. The costly calls in there are multiplication (the tiny2313 doesn&#8217;t have a multiplier), division and modulo (32-bit, no less), and, if you have an unfortunate combination of avr-libc and compiler settings, the delay calls themselves.<br />
A quick test at compiling that way yielded an 870 byte program. Leaving out -fwhole-program means it can&#8217;t eliminate or simplify any functions, and then I got sizes around 4.5k, easily twice as large as a 2313. Since that wouldn&#8217;t fit at all there&#8217;s probably some middle ground I&#8217;m missing.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Daniel Holth</title>
		<link>http://www.SWHarden.com/blog/2009-06-10-primary-prototype-complete/comment-page-1/#comment-10416</link>
		<dc:creator>Daniel Holth</dc:creator>
		<pubDate>Tue, 24 Aug 2010 14:02:25 +0000</pubDate>
		<guid isPermaLink="false">http://www.SWHarden.com/blog/?p=1180#comment-10416</guid>
		<description>I&#039;m not the only one eagerly awaiting the 4kb successor to the ATtiny2313.

Most of your code size is probably from linking in math libraries. You might be able to change your algorithm slightly to avoid doing that.</description>
		<content:encoded><![CDATA[<p>I&#8217;m not the only one eagerly awaiting the 4kb successor to the ATtiny2313.</p>
<p>Most of your code size is probably from linking in math libraries. You might be able to change your algorithm slightly to avoid doing that.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
