<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>FergoFrog&#039;s Home</title>
	<atom:link href="http://fergofrog.com/index.php/feed/" rel="self" type="application/rss+xml" />
	<link>http://fergofrog.com</link>
	<description></description>
	<lastBuildDate>Mon, 25 Apr 2011 00:03:51 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Fixing bad AVR Fuses</title>
		<link>http://fergofrog.com/index.php/2011/02/fixing-bad-avr-fuses/</link>
		<comments>http://fergofrog.com/index.php/2011/02/fixing-bad-avr-fuses/#comments</comments>
		<pubDate>Sat, 12 Feb 2011 11:59:27 +0000</pubDate>
		<dc:creator>FergoFrog</dc:creator>
				<category><![CDATA[Electronics]]></category>
		<category><![CDATA[avr]]></category>

		<guid isPermaLink="false">http://fergofrog.com/?p=66</guid>
		<description><![CDATA[It&#8217;s pretty easy to make mistakes while programming an AVR&#8217;s fuses and making a mistake could seem to render your AVR unusable. Don&#8217;t give up, there are three main causes that could lead to this message from avrdude: avrdude: initialization &#8230;<p class="read-more"><a href="http://fergofrog.com/index.php/2011/02/fixing-bad-avr-fuses/">Read more &#187;</a></p>]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s pretty easy to make mistakes while programming an AVR&#8217;s fuses and making a mistake could seem to render your AVR unusable. Don&#8217;t give up, there are three main causes that could lead to this message from avrdude:<br />
<code>avrdude: initialization failed, rc=-1<br />
Double check connections and try again, or use -F to override<br />
this check.</code></p>
<ol>
<li>Check the connections between your programmer and the AVR (perhaps one of the leads have fallen out or one of the solder joints are damaged)</li>
<li>The clock fuses are set for a source you aren&#8217;t providing, for more information on fixing this read below</li>
<li>The SPIEN (SPI enable) fuse has been unprogrammed, this means that you can no longer program with a standard serial programmer (such as a <a href="http://www.ladyada.net/make/usbtinyisp/" target="_blank">USBTinyISP</a>), to fix this you need a high voltage parallel programmer, for example MightyOhm&#8217;s <a href="http://mightyohm.com/blog/products/hv-rescue-shield-2-x/" target="_blank">High Voltage Rescue Shield</a> (an arduino is required) or the Atmel AVR Dragon</li>
</ol>
<p><span id="more-66"></span>By obtaining an ATTiny13 (or a similar, cheap AVR) you can fix any clock settings. There are a few steps required to get this to work as your clock:</p>
<ol>
<li>Download and compile this program (which will create a square wave out of PB4, pin 3 of the ATTiny13), <a href="http://fergofrog.com/wp-content/uploads/2011/02/clock.S">clock.S</a> (you&#8217;ll need an AVR ASM compiler like <a href="http://avra.sourceforge.net/" target="_blank">AVRA</a> and the include file for your AVR, you can download <a href="http://fergofrog.com/wp-content/uploads/2011/02/tn13def.inc">tn13def.inc</a> for an ATTiny13) OR if you&#8217;re using an ATTiny13 you can download this precompiled <a href="http://fergofrog.com/wp-content/uploads/2011/02/clock.hex">clock.hex</a></li>
<li>Burn the compiled clock.hex to the AVR, for example (for an ATTiny13, using a USBTinyISP):<br />
<code>$ avrdude -p t13 -c usbtiny -U flash:w:clock.hex</code></li>
<li>Unprogram the CKDIV8 fuse (increasing the outputted frequency by 8 times), for example (for an ATTiny13, using a USBTinyISP):<br />
<code>$ avrdude -p t13 -c usbtiny -U lfuse:w:0x7a:m</code></li>
<li>Connect PB4, pin 3 (or whatever you set the port to be in clock.S) of the clock AVR to the XTAL1 pin of the broken AVR</li>
<li>Use a <a href="http://www.engbedded.com/fusecalc/" target="_blank">fuse calculator</a> to calculate your fixed clock settings, type in the avrdude command to change the fuses and append <strong>-B 50</strong>, this&#8217;ll slow the clock period so that the AVR can keep up with the SCK clock (at avrdude&#8217;s default value of 10usec the clock generated by the ATTiny13 isn&#8217;t fast enough to allow the target AVR to receive instructions, a period of 50usec should be fine, but increasing it won&#8217;t hurt only cause it to program slower), for example (for an ATMega328P, using a USBTinyISP):<br />
<code>$ avrdude -p m328p -c usbtiny -B 50 -U lfuse:w:0x62:m -U hfuse:w:0xd9:m -U efuse:w:0xff:m</code></li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://fergofrog.com/index.php/2011/02/fixing-bad-avr-fuses/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>DIY AVR Target Board</title>
		<link>http://fergofrog.com/index.php/2011/02/diy-avr-target-board/</link>
		<comments>http://fergofrog.com/index.php/2011/02/diy-avr-target-board/#comments</comments>
		<pubDate>Thu, 03 Feb 2011 09:35:50 +0000</pubDate>
		<dc:creator>FergoFrog</dc:creator>
				<category><![CDATA[Electronics]]></category>
		<category><![CDATA[avr]]></category>
		<category><![CDATA[target board]]></category>

		<guid isPermaLink="false">http://fergofrog.com/?p=38</guid>
		<description><![CDATA[In order to program the ATMega8 included with the Asuro Robot Kit I have designed two AVR Target Boards. Initially I had both in one, but I couldn&#8217;t fit both on the one veroboard. This target board is designed to &#8230;<p class="read-more"><a href="http://fergofrog.com/index.php/2011/02/diy-avr-target-board/">Read more &#187;</a></p>]]></description>
			<content:encoded><![CDATA[<p>In order to program the ATMega8 included with the Asuro Robot Kit I have designed two AVR Target Boards. Initially I had both in one, but I couldn&#8217;t fit both on the one veroboard. This target board is designed to program most 40 pin, 28 pin, 20 pin and 8 pin AVR 8-bit microcontrollers, for example ATMega162, ATMega328, ATMega128, ATTiny2313, ATTiny13, etc. I included a 2&#215;3 ISP header so it will work with most new AVR ISP Programmers (for example adafruit&#8217;s <a href="http://www.ladyada.net/make/usbtinyisp/" target="_blank">USBTinyISP</a>), but for those wanting a 2&#215;5 header it should be a simple modification.</p>
<p><a href="http://fergofrog.com/wp-content/uploads/2011/02/IMG_1601.jpg" target="_blank"><img class="size-full wp-image-40 alignnone" title="Large AVR Target Board" src="http://fergofrog.com/wp-content/uploads/2011/02/IMG_1601.jpg" alt="Click for a larger image..." width="200" height="150" /></a><a href="http://fergofrog.com/wp-content/uploads/2011/02/IMG_1605.jpg" target="_blank"><img class="size-full wp-image-41 alignnone" title="Small AVR Target Board" src="http://fergofrog.com/wp-content/uploads/2011/02/IMG_1605.jpg" alt="Click for a larger image..." width="200" height="150" /></a></p>
<p><span id="more-38"></span></p>
<h3>Version Differences</h3>
<p>There are a few differences between the two target boards:</p>
<ul>
<li>The large target board is designed for 40 and 28 pin AVRs (the ATMega&#8217;s), while the small one is for the 20 and 8 pin AVRs (the ATTiny&#8217;s).</li>
<li>The large board has one ZIF socket for each size of AVR, while the small one has one ZIF socket for both sizes (with a size jumper to select the size, more details below)</li>
<li>The large target board has two (selectable) clock sources available; a crystal (I used an 8MHz one) and an ATTiny13 providing a clock for boards with bad clock fuse settings. The small target board has the ability to add a clock source in (XTAL1 and XTAL2 lines have been designed in, however no clock source has been designed).</li>
</ul>
<h3>Clock Source</h3>
<p>There are three clocking options with the large board:</p>
<ul>
<li>No clock: Remove all jumper shunts</li>
<li>The ATTiny clock: Insert a jumper shunt into the right jumper</li>
<li>The crystal clock: Insert two jumper shunts, one into the center jumper and the other on the left.</li>
</ul>
<h4>Setting up the ATTiny13 clock</h4>
<p>To setup the ATTiny13 clock you need to unprogram the CKDIV8 fuse on the ATTiny13 (for an excellent fuse calculator visit <a href="http://www.engbedded.com/fusecalc/" target="_blank">http://www.engbedded.com/fusecalc/</a>) and burn a program that will oscillate PortB4 of the ATTiny. I have written a basic program, you can download the source file, <a href="http://fergofrog.com/wp-content/uploads/2011/02/clock.S">clock.S</a>, and compile yourself with an AVR ASM programmer like <a href="http://avra.sourceforge.net/" target="_blank">AVRA</a> (you will need the ATTiny13 include file, <a href="http://fergofrog.com/wp-content/uploads/2011/02/tn13def.inc">tn13def.inc</a>) or simply download the precompiled <a href="http://fergofrog.com/wp-content/uploads/2011/02/clock.hex">clock.hex</a>. You should now have an ATTiny13 creating a square wave at ~1.4MHz, perfect for our needs.</p>
<h3>Chip Select (between 8 and 20 pin ATTiny&#8217;s)</h3>
<p>In order to combine the 8 and 20 pin sockets into one I have added a setting jumper under the socket; to program an 8 pin AVR (for example an ATTiny13) place the jumper shunt on the left and on the right to program a 20 pin AVR (for example the ATTiny2313).</p>
<h3>Notes, Schematics and Veroboard layout</h3>
<ul>
<li>Pin one for the AVR ISP headers and the AVR microcontroller sockets  is always the bottom left one (when the socket is oriented to be under  the ISP header).</li>
<li>The target board in the images is missing the 10k resistor between pin 1 of the ATTiny13 clock and VCC, I would recommend installing it.</li>
</ul>
<p>Here are the schematics (also in <a href="http://fergofrog.com/wp-content/uploads/2011/02/AVR-Target-Board.sch">SCH</a>, for EAGLE) and the veroboard layout (these are for the all-in-one version):</p>
<p><a href="http://fergofrog.com/wp-content/uploads/2011/02/AVR-Target-Board.png"><img class="alignnone size-full wp-image-64" title="AVR Target Board" src="http://fergofrog.com/wp-content/uploads/2011/02/AVR-Target-Board.png" alt="" width="400" height="191" /></a></p>
<p><a href="http://fergofrog.com/wp-content/uploads/2011/02/AVR-Target-Board1.png"><img class="alignnone size-full wp-image-74" title="AVR Target Board" src="http://fergofrog.com/wp-content/uploads/2011/02/AVR-Target-Board1.png" alt="" width="400" height="191" /></a></p>
<p>Also, images of the undersides:</p>
<p><a href="http://fergofrog.com/wp-content/uploads/2011/02/IMG_1610.jpg"><img class="alignnone size-full wp-image-53" title="Large AVR Target Board - Underside" src="http://fergofrog.com/wp-content/uploads/2011/02/IMG_1603.jpg" alt="Click for a larger image..." width="200" height="150" /><img class="alignnone size-full wp-image-54" title="Small AVR Target Board - Underside" src="http://fergofrog.com/wp-content/uploads/2011/02/IMG_1610.jpg" alt="Click for a larger image..." width="200" height="150" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://fergofrog.com/index.php/2011/02/diy-avr-target-board/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Asuro Programmable Robot Kit</title>
		<link>http://fergofrog.com/index.php/2011/01/asuro-programmable-robot-kit/</link>
		<comments>http://fergofrog.com/index.php/2011/01/asuro-programmable-robot-kit/#comments</comments>
		<pubDate>Thu, 27 Jan 2011 06:38:19 +0000</pubDate>
		<dc:creator>FergoFrog</dc:creator>
				<category><![CDATA[Electronics]]></category>
		<category><![CDATA[avr]]></category>
		<category><![CDATA[robot]]></category>

		<guid isPermaLink="false">http://fergofrog.com/?p=35</guid>
		<description><![CDATA[I was given an Asuro Programmable Robot Kit for my birthday, but haven&#8217;t had a chance to look at it until now. It looks like a fantastic integrated solution to use as an introduction to robotics, however there is one &#8230;<p class="read-more"><a href="http://fergofrog.com/index.php/2011/01/asuro-programmable-robot-kit/">Read more &#187;</a></p>]]></description>
			<content:encoded><![CDATA[<p>I was given an <a href="http://www.jaycar.com.au/productView.asp?ID=KR3120">Asuro Programmable Robot Kit</a> for my birthday, but haven&#8217;t had a chance to look at it until now. It looks like a fantastic integrated solution to use as an introduction to robotics, however there is one particular aspect I dislike about it; the bundled software and programming solution. I haven&#8217;t tried installing the software, but it looks clunky, restrictive and painful, additionally they expect me to program it with the included IR programmer (utilising the software). I would much rather use <a href="http://www.ladyada.net/make/usbtinyisp/">Adafruit&#8217;s USBtinyISP</a>, Emacs, AVRDUDE, GCC-AVR and design an AVR target board (which I&#8217;m about to finalise, more details to come) to program the included ATMega8.</p>
<p>After I have it all soldered together and have it running some software I&#8217;ll post more details on what I&#8217;ve done, for now all I have are plans.</p>
]]></content:encoded>
			<wfw:commentRss>http://fergofrog.com/index.php/2011/01/asuro-programmable-robot-kit/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Whirlpool Daily Roundup RSS Feed</title>
		<link>http://fergofrog.com/index.php/2011/01/whirlpool-daily-roundup-rss-feed/</link>
		<comments>http://fergofrog.com/index.php/2011/01/whirlpool-daily-roundup-rss-feed/#comments</comments>
		<pubDate>Thu, 27 Jan 2011 05:58:28 +0000</pubDate>
		<dc:creator>FergoFrog</dc:creator>
				<category><![CDATA[Scripts]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[rss]]></category>
		<category><![CDATA[whirlpool]]></category>

		<guid isPermaLink="false">http://fergofrog.com/?p=26</guid>
		<description><![CDATA[Last year I wrote a Whirlpool Daily Roundup RSS Feed generator, the feed is generated hourly and can be accessed at http://fergofrog.com/wproundup/wproundup.rss. Please set your reader to not download it too often (every 20-30 minutes is fine), it is hosted &#8230;<p class="read-more"><a href="http://fergofrog.com/index.php/2011/01/whirlpool-daily-roundup-rss-feed/">Read more &#187;</a></p>]]></description>
			<content:encoded><![CDATA[<p>Last year I wrote a Whirlpool Daily Roundup RSS Feed generator, the feed is generated hourly and can be accessed at <a href="http://fergofrog.com/wproundup/wproundup.rss" target="_blank">http://fergofrog.com/wproundup/wproundup.rss</a>. Please set your reader to not download it too often (every 20-30 minutes is fine), it is hosted on my home internet connection and I can&#8217;t handle too many regular requests.</p>
<p>I based it off a feed I used a few years ago, which is hosted at <a href="https://github.com/tarka/Whirlpool" target="_blank">https://github.com/tarka/Whirlpool</a>. However I wanted each post to have its own item in the feed, so I rewrote tarka&#8217;s version. My greatest problem was that the pubDate field requires a RFC 2822 formatted time stamp. Whirlpool not providing that on their page I began writing up a parser module that could handle each website and parse the date from there; however I found that whirlpool had too many sources, many of which don&#8217;t provide the time their article was published. My final solution was simply to set each article to be published at 10am AEST, which isn&#8217;t great but it was better than any other method I could think of (including stuff with databases and a mixture of database + parsers).</p>
<p>I have put the source code up here: <a href="http://fergofrog.com/wproundup/roundup2rss.py" target="_blank">http://fergofrog.com/wproundup/roundup2rss.py</a>. It is released under GPL 2.0, if you want a copy of the license you can find it at <a href="http://fergofrog.com/wproundup/gpl-2.0.txt" target="_blank">http://fergofrog.com/wproundup/gpl-2.0.txt</a>. Feel free to adapt it to your needs, or to another website, that&#8217;s why it is released under GPL. If you do use it, then feel free to leave a comment about it, I&#8217;ll be interested to see what you have done.</p>
<p>If you notice any problems with the feed please let me know in the comments, or my email address is in the source code.</p>
]]></content:encoded>
			<wfw:commentRss>http://fergofrog.com/index.php/2011/01/whirlpool-daily-roundup-rss-feed/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Updated Server</title>
		<link>http://fergofrog.com/index.php/2011/01/updated-server/</link>
		<comments>http://fergofrog.com/index.php/2011/01/updated-server/#comments</comments>
		<pubDate>Thu, 27 Jan 2011 04:54:16 +0000</pubDate>
		<dc:creator>FergoFrog</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[server]]></category>
		<category><![CDATA[update]]></category>

		<guid isPermaLink="false">http://fergofrog.com/?p=5</guid>
		<description><![CDATA[In order to clear some space on my server&#8217;s HDD I have wiped and done a fresh install of everything on it. I have additionally added an 80GB HDD for the install, and a 250GB HDD for music. I had &#8230;<p class="read-more"><a href="http://fergofrog.com/index.php/2011/01/updated-server/">Read more &#187;</a></p>]]></description>
			<content:encoded><![CDATA[<p>In order to clear some space on my server&#8217;s HDD I have wiped and done a fresh install of everything on it. I have additionally added an 80GB HDD for the install, and a 250GB HDD for music. I had a backup of the old blog, but I have chosen not to install it and start fresh, again. I&#8217;m not making any promises on updating this often, but I will endeavor to post updates on things that I&#8217;m doing.</p>
]]></content:encoded>
			<wfw:commentRss>http://fergofrog.com/index.php/2011/01/updated-server/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

