<?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: Minimal Arduino with ATmega8</title>
	<atom:link href="http://todbot.com/blog/2009/05/26/minimal-arduino-with-atmega8/feed/" rel="self" type="application/rss+xml" />
	<link>http://todbot.com/blog/2009/05/26/minimal-arduino-with-atmega8/</link>
	<description>Random experiments, circuits, code, rapid prototyping, sometimes things to buy, and the odd tune by Tod E. Kurt.</description>
	<lastBuildDate>Tue, 09 Mar 2010 21:20:45 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: todbot</title>
		<link>http://todbot.com/blog/2009/05/26/minimal-arduino-with-atmega8/comment-page-3/#comment-57587</link>
		<dc:creator>todbot</dc:creator>
		<pubDate>Mon, 09 Nov 2009 19:19:34 +0000</pubDate>
		<guid isPermaLink="false">http://todbot.com/blog/?p=494#comment-57587</guid>
		<description>Oh man that&#039;s the worst, when the tools are the problem.  It&#039;s like having a screwdriver that strips screws!
Thanks for figuring this out.</description>
		<content:encoded><![CDATA[<p>Oh man that&#8217;s the worst, when the tools are the problem.  It&#8217;s like having a screwdriver that strips screws!<br />
Thanks for figuring this out.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Miles</title>
		<link>http://todbot.com/blog/2009/05/26/minimal-arduino-with-atmega8/comment-page-3/#comment-57560</link>
		<dc:creator>Miles</dc:creator>
		<pubDate>Thu, 05 Nov 2009 20:53:37 +0000</pubDate>
		<guid isPermaLink="false">http://todbot.com/blog/?p=494#comment-57560</guid>
		<description>Ah! I&#039;ve figured it out. It turned out AVR Studio had a bug! 

Here&#039;s a couple of links that I found helpful:
http://www.arduino.cc/playground/Learning/Burn168
http://www.5volt.eu/archives/3

and most important the fix for AVR Studio 4.6
http://download.milesburton.com/Arduino/AVRStudio/AVRStudio16Fix_BootProgHotFix.exe [mirrored]</description>
		<content:encoded><![CDATA[<p>Ah! I&#8217;ve figured it out. It turned out AVR Studio had a bug! </p>
<p>Here&#8217;s a couple of links that I found helpful:<br />
<a href="http://www.arduino.cc/playground/Learning/Burn168" rel="nofollow">http://www.arduino.cc/playground/Learning/Burn168</a><br />
<a href="http://www.5volt.eu/archives/3" rel="nofollow">http://www.5volt.eu/archives/3</a></p>
<p>and most important the fix for AVR Studio 4.6<br />
<a href="http://download.milesburton.com/Arduino/AVRStudio/AVRStudio16Fix_BootProgHotFix.exe" rel="nofollow">http://download.milesburton.com/Arduino/AVRStudio/AVRStudio16Fix_BootProgHotFix.exe</a> [mirrored]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Miles</title>
		<link>http://todbot.com/blog/2009/05/26/minimal-arduino-with-atmega8/comment-page-3/#comment-57384</link>
		<dc:creator>Miles</dc:creator>
		<pubDate>Sun, 01 Nov 2009 16:20:47 +0000</pubDate>
		<guid isPermaLink="false">http://todbot.com/blog/?p=494#comment-57384</guid>
		<description>Yeah I did wonder that myself. Though if that were the case serial communication wouldn&#039;t sync and you&#039;d just receive garbage as it&#039;s running faster/slow than expected.

I have tried burning the NG bootloader to my 168&#039;s and that works fine (uploading sketches normally). I must say I didn&#039;t have the same success with the AtMega 8s.

I would like to upload the bootloader in the Arduino IDE (at least that would verify the lock/unlock bits) but for some reason my STK500 clone (some cheapey off Ebay) isn&#039;t recognised. It just sits there saying &quot;timed out&quot;.</description>
		<content:encoded><![CDATA[<p>Yeah I did wonder that myself. Though if that were the case serial communication wouldn&#8217;t sync and you&#8217;d just receive garbage as it&#8217;s running faster/slow than expected.</p>
<p>I have tried burning the NG bootloader to my 168&#8217;s and that works fine (uploading sketches normally). I must say I didn&#8217;t have the same success with the AtMega 8s.</p>
<p>I would like to upload the bootloader in the Arduino IDE (at least that would verify the lock/unlock bits) but for some reason my STK500 clone (some cheapey off Ebay) isn&#8217;t recognised. It just sits there saying &#8220;timed out&#8221;.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: todbot</title>
		<link>http://todbot.com/blog/2009/05/26/minimal-arduino-with-atmega8/comment-page-3/#comment-57321</link>
		<dc:creator>todbot</dc:creator>
		<pubDate>Sat, 31 Oct 2009 17:34:18 +0000</pubDate>
		<guid isPermaLink="false">http://todbot.com/blog/?p=494#comment-57321</guid>
		<description>Hmm, that is weird.   I wonder if since you&#039;re using a Freeduino board that has a built-in external oscillator, that the oscillator is somehow clocking the chip at 16MHz instead of doing the internal 8MHz osc.

Have you tried burning the bootloader using the Arduino IDE instead of AVR Studio?  Perhaps AVR Studio is doing something with the hex file?  (I notice it&#039;s giving some sort of error in your screenshot set)

The other thing you can try, just to verify your entire process, is to burn the standard &quot;NG&quot; bootloader for the ATmega8 or the ATmega168.  (there&#039;s a separate one for each)  That should definitely work, since your Freeduino board has the external crystal.</description>
		<content:encoded><![CDATA[<p>Hmm, that is weird.   I wonder if since you&#8217;re using a Freeduino board that has a built-in external oscillator, that the oscillator is somehow clocking the chip at 16MHz instead of doing the internal 8MHz osc.</p>
<p>Have you tried burning the bootloader using the Arduino IDE instead of AVR Studio?  Perhaps AVR Studio is doing something with the hex file?  (I notice it&#8217;s giving some sort of error in your screenshot set)</p>
<p>The other thing you can try, just to verify your entire process, is to burn the standard &#8220;NG&#8221; bootloader for the ATmega8 or the ATmega168.  (there&#8217;s a separate one for each)  That should definitely work, since your Freeduino board has the external crystal.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Miles</title>
		<link>http://todbot.com/blog/2009/05/26/minimal-arduino-with-atmega8/comment-page-2/#comment-57317</link>
		<dc:creator>Miles</dc:creator>
		<pubDate>Sat, 31 Oct 2009 15:32:18 +0000</pubDate>
		<guid isPermaLink="false">http://todbot.com/blog/?p=494#comment-57317</guid>
		<description>Hi Todbot, thanks for replying so quickly!

I&#039;m still not having a huge amount of joy. I&#039;m using a set of AtMega8s (and a bunch of 168 in the wings). 

I&#039;ve setup the fuses as you suggested in a Freeduino (originally housed a 328).

http://mnetcs.com/thumb/storage/b9051513.JPG

The fuses and lock bits are set via AVR Studio here:
http://mnetcs.com/thumb/storage/b9479064.JPG

Yet when I try and upload a sketch it fails. I&#039;ve  tried several different methods. Hitting reset, uploading first then reset yada yada. No joy. Theoretically it should work anyway, the Freeduino provides a reset LOW (otherwise the 320 wouldn&#039;t work).

It&#039;s all very strange. As I mentioned I&#039;ve even hooked up a blinkm and uploaded the tester sketch - Fine, communication over serial is normal.</description>
		<content:encoded><![CDATA[<p>Hi Todbot, thanks for replying so quickly!</p>
<p>I&#8217;m still not having a huge amount of joy. I&#8217;m using a set of AtMega8s (and a bunch of 168 in the wings). </p>
<p>I&#8217;ve setup the fuses as you suggested in a Freeduino (originally housed a 328).</p>
<p><a href="http://mnetcs.com/thumb/storage/b9051513.JPG" rel="nofollow">http://mnetcs.com/thumb/storage/b9051513.JPG</a></p>
<p>The fuses and lock bits are set via AVR Studio here:<br />
<a href="http://mnetcs.com/thumb/storage/b9479064.JPG" rel="nofollow">http://mnetcs.com/thumb/storage/b9479064.JPG</a></p>
<p>Yet when I try and upload a sketch it fails. I&#8217;ve  tried several different methods. Hitting reset, uploading first then reset yada yada. No joy. Theoretically it should work anyway, the Freeduino provides a reset LOW (otherwise the 320 wouldn&#8217;t work).</p>
<p>It&#8217;s all very strange. As I mentioned I&#8217;ve even hooked up a blinkm and uploaded the tester sketch &#8211; Fine, communication over serial is normal.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: todbot</title>
		<link>http://todbot.com/blog/2009/05/26/minimal-arduino-with-atmega8/comment-page-2/#comment-57271</link>
		<dc:creator>todbot</dc:creator>
		<pubDate>Fri, 30 Oct 2009 23:38:33 +0000</pubDate>
		<guid isPermaLink="false">http://todbot.com/blog/?p=494#comment-57271</guid>
		<description>Hi Miles,
You are correct about the fuse settings being a bit off.  The lfuse should be something like 0xD4, not 0xDF.  Perhaps the best setting would be lfuse=0xE4. (gives a few more milliseconds to start up in case of weak power)  I&#039;ve updated the post with this change, thanks.  Note that these fuse values are only for ATmega8 chips, they won&#039;t work for ATmega88, ATmega168, and ATmega328.

I&#039;m not sure what you mean by serial not working.  Do you mean you can&#039;t use Serial.println() and similar methods?  That sounds really strange.

Or do you mean you cannot upload sketches with the Arduino IDE via a serial cable?  If so, you should note that this bootloader waits a very short time looking for a sketch upload before running whatever its last programmed sketch was.  It&#039;s around a second.  That means you need to apply power to the chip or reset it and then immediately hit the &quot;Upload&quot; button.  I find it easier to hit &quot;Upload&quot; then power up / reset the chip, because the uploader does a few retries before giving up.</description>
		<content:encoded><![CDATA[<p>Hi Miles,<br />
You are correct about the fuse settings being a bit off.  The lfuse should be something like 0xD4, not 0xDF.  Perhaps the best setting would be lfuse=0xE4. (gives a few more milliseconds to start up in case of weak power)  I&#8217;ve updated the post with this change, thanks.  Note that these fuse values are only for ATmega8 chips, they won&#8217;t work for ATmega88, ATmega168, and ATmega328.</p>
<p>I&#8217;m not sure what you mean by serial not working.  Do you mean you can&#8217;t use Serial.println() and similar methods?  That sounds really strange.</p>
<p>Or do you mean you cannot upload sketches with the Arduino IDE via a serial cable?  If so, you should note that this bootloader waits a very short time looking for a sketch upload before running whatever its last programmed sketch was.  It&#8217;s around a second.  That means you need to apply power to the chip or reset it and then immediately hit the &#8220;Upload&#8221; button.  I find it easier to hit &#8220;Upload&#8221; then power up / reset the chip, because the uploader does a few retries before giving up.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Miles</title>
		<link>http://todbot.com/blog/2009/05/26/minimal-arduino-with-atmega8/comment-page-2/#comment-57267</link>
		<dc:creator>Miles</dc:creator>
		<pubDate>Fri, 30 Oct 2009 22:45:14 +0000</pubDate>
		<guid isPermaLink="false">http://todbot.com/blog/?p=494#comment-57267</guid>
		<description>Hmm, I&#039;ve been trying to get this going myself. Following your example I set the clocks through AVR Studio instead of Arduino (my programmer doesn&#039;t seem to pick up?)

For some reason I can load, for example a compiled blink sketch - that&#039;ll work fine. Uploading the bootloader you provided works but it wont respond to serial (meaning it&#039;s pretty much useless)

Also in AVR Studio, the fuse bits seem to imply it&#039;s using an external 8mhz clock rather than the internal 8mhz Osci.

Can anyone help?</description>
		<content:encoded><![CDATA[<p>Hmm, I&#8217;ve been trying to get this going myself. Following your example I set the clocks through AVR Studio instead of Arduino (my programmer doesn&#8217;t seem to pick up?)</p>
<p>For some reason I can load, for example a compiled blink sketch &#8211; that&#8217;ll work fine. Uploading the bootloader you provided works but it wont respond to serial (meaning it&#8217;s pretty much useless)</p>
<p>Also in AVR Studio, the fuse bits seem to imply it&#8217;s using an external 8mhz clock rather than the internal 8mhz Osci.</p>
<p>Can anyone help?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: dddanmar.net &#187; Blog Archive</title>
		<link>http://todbot.com/blog/2009/05/26/minimal-arduino-with-atmega8/comment-page-2/#comment-56648</link>
		<dc:creator>dddanmar.net &#187; Blog Archive</dc:creator>
		<pubDate>Thu, 08 Oct 2009 11:39:35 +0000</pubDate>
		<guid isPermaLink="false">http://todbot.com/blog/?p=494#comment-56648</guid>
		<description>[...] the file from todbot&#8217;s blog and unzip to the hardware/bootloaders directory of your Arduino [...]</description>
		<content:encoded><![CDATA[<p>[...] the file from todbot&#8217;s blog and unzip to the hardware/bootloaders directory of your Arduino [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Making Coffee &#171; Wire Jungle</title>
		<link>http://todbot.com/blog/2009/05/26/minimal-arduino-with-atmega8/comment-page-2/#comment-56394</link>
		<dc:creator>Making Coffee &#171; Wire Jungle</dc:creator>
		<pubDate>Fri, 02 Oct 2009 20:01:24 +0000</pubDate>
		<guid isPermaLink="false">http://todbot.com/blog/?p=494#comment-56394</guid>
		<description>[...] the board needs to be redesigned as a standalone, this has been done before. A minimal approach is too restrictive in this case, since the circuit will need an [...]</description>
		<content:encoded><![CDATA[<p>[...] the board needs to be redesigned as a standalone, this has been done before. A minimal approach is too restrictive in this case, since the circuit will need an [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: todbot</title>
		<link>http://todbot.com/blog/2009/05/26/minimal-arduino-with-atmega8/comment-page-2/#comment-54132</link>
		<dc:creator>todbot</dc:creator>
		<pubDate>Sat, 15 Aug 2009 04:09:59 +0000</pubDate>
		<guid isPermaLink="false">http://todbot.com/blog/?p=494#comment-54132</guid>
		<description>Hi turbo,
Hmm, that&#039;s the error you get when the AVRISPmkII programmer isn&#039;t plugged into your system.  Sometimes avrdude doesn&#039;t recognize it, in which case I just unplug it and plug it back in.  You should get a green LED light on he AVRISPmkII indicating that it&#039;s plugged in and wired up correctly.</description>
		<content:encoded><![CDATA[<p>Hi turbo,<br />
Hmm, that&#8217;s the error you get when the AVRISPmkII programmer isn&#8217;t plugged into your system.  Sometimes avrdude doesn&#8217;t recognize it, in which case I just unplug it and plug it back in.  You should get a green LED light on he AVRISPmkII indicating that it&#8217;s plugged in and wired up correctly.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: turbo</title>
		<link>http://todbot.com/blog/2009/05/26/minimal-arduino-with-atmega8/comment-page-2/#comment-54129</link>
		<dc:creator>turbo</dc:creator>
		<pubDate>Sat, 15 Aug 2009 00:56:00 +0000</pubDate>
		<guid isPermaLink="false">http://todbot.com/blog/?p=494#comment-54129</guid>
		<description>I&#039;ve followed these direction but get the following error:

avrdude: usbdev_open(): did not find any USB device &quot;usb&quot;

i am very much a noob to AVRs. AVRstudio seemed to program the boot.hex file properly. any suggestions would be greatly appreciated. thx</description>
		<content:encoded><![CDATA[<p>I&#8217;ve followed these direction but get the following error:</p>
<p>avrdude: usbdev_open(): did not find any USB device &#8220;usb&#8221;</p>
<p>i am very much a noob to AVRs. AVRstudio seemed to program the boot.hex file properly. any suggestions would be greatly appreciated. thx</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ninjia Arduino&#187; Blog ?? &#187; ????</title>
		<link>http://todbot.com/blog/2009/05/26/minimal-arduino-with-atmega8/comment-page-2/#comment-53698</link>
		<dc:creator>Ninjia Arduino&#187; Blog ?? &#187; ????</dc:creator>
		<pubDate>Tue, 21 Jul 2009 14:37:29 +0000</pubDate>
		<guid isPermaLink="false">http://todbot.com/blog/?p=494#comment-53698</guid>
		<description>[...] http://todbot.com/blog/2009/05/26/minimal-arduino-with-atmega8/ [...]</description>
		<content:encoded><![CDATA[<p>[...] <a href="http://todbot.com/blog/2009/05/26/minimal-arduino-with-atmega8/" rel="nofollow">http://todbot.com/blog/2009/05/26/minimal-arduino-with-atmega8/</a> [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: todbot</title>
		<link>http://todbot.com/blog/2009/05/26/minimal-arduino-with-atmega8/comment-page-2/#comment-53557</link>
		<dc:creator>todbot</dc:creator>
		<pubDate>Wed, 15 Jul 2009 23:39:43 +0000</pubDate>
		<guid isPermaLink="false">http://todbot.com/blog/?p=494#comment-53557</guid>
		<description>This bootloader is like the original old Arduino one, where you have to press the reset button right before you upload.  Since this &quot;minimal&quot; setup has no reset button, it means you need to apply power right before pressing upload.  You have about 3 seconds after powering up to start uploading a sketch.

The official source for information about AVR fuses are in the datasheet for the particular chip you&#039;re working with.  You can go to http://atmel.com/avr/ and click on &quot;&lt;a href=&quot;http://atmel.com/dyn/products/datasheets.asp?family_id=607&quot; rel=&quot;nofollow&quot;&gt;Datasheets&lt;/a&gt;&quot;.  Then look for the part you&#039;re using to get a PDF datasheet.  The fuse description are in the &quot;memory programming&quot; section of the datasheet.

The datasheets can be pretty daunting, and the fuse section is one of the more complex.  Limor started a &lt;a href=&quot;http://www.ladyada.net/learn/avrdevtut/fuses.html&quot; rel=&quot;nofollow&quot;&gt;AVR fuse tutorial&lt;/a&gt;.  It&#039;s only partly done, but gives some good info.

Mostly what I do is look for projects doing things similar to what I&#039;m doing, seeing what their fuse settings are, and lookup in the datasheet what they mean.  And then maybe ask someone. :)  But basically, for a given circuit with a given chip, you have only a small number of potential fuse settings that will work.  So if all else fails, exactly copy an existing circuit.  One of the nice aspects of the many variations of Arduino and Arduino-clones that now exist is that there are several known-working circuits to copy from.
</description>
		<content:encoded><![CDATA[<p>This bootloader is like the original old Arduino one, where you have to press the reset button right before you upload.  Since this &#8220;minimal&#8221; setup has no reset button, it means you need to apply power right before pressing upload.  You have about 3 seconds after powering up to start uploading a sketch.</p>
<p>The official source for information about AVR fuses are in the datasheet for the particular chip you&#8217;re working with.  You can go to <a href="http://atmel.com/avr/" rel="nofollow">http://atmel.com/avr/</a> and click on &#8220;<a href="http://atmel.com/dyn/products/datasheets.asp?family_id=607" rel="nofollow">Datasheets</a>&#8220;.  Then look for the part you&#8217;re using to get a PDF datasheet.  The fuse description are in the &#8220;memory programming&#8221; section of the datasheet.</p>
<p>The datasheets can be pretty daunting, and the fuse section is one of the more complex.  Limor started a <a href="http://www.ladyada.net/learn/avrdevtut/fuses.html" rel="nofollow">AVR fuse tutorial</a>.  It&#8217;s only partly done, but gives some good info.</p>
<p>Mostly what I do is look for projects doing things similar to what I&#8217;m doing, seeing what their fuse settings are, and lookup in the datasheet what they mean.  And then maybe ask someone. :)  But basically, for a given circuit with a given chip, you have only a small number of potential fuse settings that will work.  So if all else fails, exactly copy an existing circuit.  One of the nice aspects of the many variations of Arduino and Arduino-clones that now exist is that there are several known-working circuits to copy from.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jan Kruse</title>
		<link>http://todbot.com/blog/2009/05/26/minimal-arduino-with-atmega8/comment-page-2/#comment-53556</link>
		<dc:creator>Jan Kruse</dc:creator>
		<pubDate>Wed, 15 Jul 2009 23:13:00 +0000</pubDate>
		<guid isPermaLink="false">http://todbot.com/blog/?p=494#comment-53556</guid>
		<description>for the fusecalc tool, is there a documentation somewhere online, that explains the options, maybe even in context with Arduinos? Could you point me to anything like that?

many thanks,
Jan</description>
		<content:encoded><![CDATA[<p>for the fusecalc tool, is there a documentation somewhere online, that explains the options, maybe even in context with Arduinos? Could you point me to anything like that?</p>
<p>many thanks,<br />
Jan</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jan Kruse</title>
		<link>http://todbot.com/blog/2009/05/26/minimal-arduino-with-atmega8/comment-page-2/#comment-53555</link>
		<dc:creator>Jan Kruse</dc:creator>
		<pubDate>Wed, 15 Jul 2009 23:07:07 +0000</pubDate>
		<guid isPermaLink="false">http://todbot.com/blog/?p=494#comment-53555</guid>
		<description>the avrdude message is:

avrdude: stk500_getsync(): not in sync: resp=0x00
avrdude: stk500_disable(): protocol error, expect=0x14, resp=0x51

I&#039;ve selected the noXtal 8Mhz version in the IDE. 

thanks for looking into this !</description>
		<content:encoded><![CDATA[<p>the avrdude message is:</p>
<p>avrdude: stk500_getsync(): not in sync: resp=0&#215;00<br />
avrdude: stk500_disable(): protocol error, expect=0&#215;14, resp=0&#215;51</p>
<p>I&#8217;ve selected the noXtal 8Mhz version in the IDE. </p>
<p>thanks for looking into this !</p>
]]></content:encoded>
	</item>
</channel>
</rss>
