<?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>MightyOhm &#187; AVR</title>
	<atom:link href="http://mightyohm.com/blog/tag/avr/feed/" rel="self" type="application/rss+xml" />
	<link>http://mightyohm.com/blog</link>
	<description>Join the resistance.</description>
	<lastBuildDate>Tue, 07 Feb 2012 00:07:32 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Jan&#8217;s Wifi Radio has a modern look</title>
		<link>http://mightyohm.com/blog/2011/03/jans-wifi-radio-has-a-modern-look/</link>
		<comments>http://mightyohm.com/blog/2011/03/jans-wifi-radio-has-a-modern-look/#comments</comments>
		<pubDate>Thu, 24 Mar 2011 21:16:25 +0000</pubDate>
		<dc:creator>Jeff</dc:creator>
				<category><![CDATA[Electronics]]></category>
		<category><![CDATA[Embedded Linux]]></category>
		<category><![CDATA[Microcontrollers]]></category>
		<category><![CDATA[AVR]]></category>
		<category><![CDATA[BASCOM]]></category>
		<category><![CDATA[OpenWRT]]></category>
		<category><![CDATA[wifiradio]]></category>

		<guid isPermaLink="false">http://mightyohm.com/blog/?p=3731</guid>
		<description><![CDATA[Jan Wante made this gorgeous Wifi Radio with a modern look. It is based on my original Wifi Radio tutorials. Not content to simply duplicate my work, he added a few creative twists of his own, including a custom handmade case made of alucobond, MDF, and real wood veneer that gives his finished radio a nice, [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.instructables.com/id/Build-your-own-Wifi-radio/"><img class="alignnone size-full wp-image-3732" title="Build your own Wifi radio" src="http://mightyohm.com/blog/wp-content/uploads/2011/03/Build-your-own-Wifi-radio.jpg" alt="" width="500" height="375" /></a></p>
<p>Jan Wante made this <a href="http://www.instructables.com/id/Build-your-own-Wifi-radio/">gorgeous Wifi Radio</a> with a modern look. It is based on <a href="http://mightyohm.com/wifiradio">my original Wifi Radio tutorial</a>s.</p>
<p>Not content to simply duplicate my work, he added a few creative twists of his own, including a custom handmade case made of <a href="http://www.alucobond.com/">alucobond</a>, MDF, and real wood veneer that gives his finished radio a nice, modern look.  Inside, a hacked WL-520gU wireless router running <a href="http://openwrt.org">OpenWrt</a> runs the show and an ATmega microcontroller programmed with <a href="http://www.mcselec.com/index.php?option=com_content&amp;task=view&amp;id=14&amp;Itemid=41">BASCOM</a> interfaces with a rotary encoder and graphical LCD display.</p>
<p>The very impressive result is shown in this video:</p>
<p><object width="500" height="405"><param name="movie" value="http://www.youtube-nocookie.com/v/bltRuA8pe4I?fs=1&amp;hl=en_US&amp;rel=0&amp;hd=1" /><param name="allowFullScreen" value="true" /><param name="allowscriptaccess" value="always" /><embed type="application/x-shockwave-flash" width="500" height="405" src="http://www.youtube-nocookie.com/v/bltRuA8pe4I?fs=1&amp;hl=en_US&amp;rel=0&amp;hd=1" allowfullscreen="true" allowscriptaccess="always"></embed></object></p>
<p>Nice work, Jan!</p>
]]></content:encoded>
			<wfw:commentRss>http://mightyohm.com/blog/2011/03/jans-wifi-radio-has-a-modern-look/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>HV Rescue Shield now works with the Arduino Mega</title>
		<link>http://mightyohm.com/blog/2011/03/hv-rescue-shield-now-works-with-the-arduino-mega/</link>
		<comments>http://mightyohm.com/blog/2011/03/hv-rescue-shield-now-works-with-the-arduino-mega/#comments</comments>
		<pubDate>Wed, 16 Mar 2011 21:38:38 +0000</pubDate>
		<dc:creator>Jeff</dc:creator>
				<category><![CDATA[Announcements]]></category>
		<category><![CDATA[Microcontrollers]]></category>
		<category><![CDATA[Arduino]]></category>
		<category><![CDATA[AVR]]></category>
		<category><![CDATA[hvrescue]]></category>

		<guid isPermaLink="false">http://mightyohm.com/blog/?p=3718</guid>
		<description><![CDATA[Thanks to John, of the ATX Hackerspace, who loaned me his Arduino for testing, the HV Rescue Shield now works with the Arduino Mega. I had to create new byte read/write functions for digital lines 0-7 because they are implemented very &#8220;differently&#8221; (and I don&#8217;t mean that in a good way) in the hardware for the Mega. [...]]]></description>
			<content:encoded><![CDATA[<p><a class="tt-flickr tt-flickr-Medium" title="HV Rescue Shield works with Arduino Mega!" href="http://mightyohm.com/blog/products/hv-rescue-shield-2-x/"><img class="alignnone" src="http://farm6.static.flickr.com/5132/5532607829_2e84bcb189.jpg" alt="HV Rescue Shield works with Arduino Mega!" width="500" height="279" /></a></p>
<p>Thanks to John, of the ATX Hackerspace, who loaned me his Arduino for testing, the <a href="http://mightyohm.com/blog/products/hv-rescue-shield-2-x/">HV Rescue Shield</a> now works with the <a href="http://arduino.cc/en/Main/ArduinoBoardMega">Arduino Mega</a>.</p>
<p>I had to create new byte read/write functions for digital lines 0-7 because they are implemented very &#8220;differently&#8221; (<em>and I don&#8217;t mean that in a good way</em>) in the hardware for the Mega.  If you&#8217;re interested in how I did this, check out <a href="http://mightyohm.com/blog/products/hv-rescue-shield-2-x/source-code/">the new version 2.12 Arduino sketch</a> and the new mega_data_read and mega_data_write functions.</p>
<p>To use the <a href="http://mightyohm.com/blog/products/hv-rescue-shield-2-x/">HV Rescue Shield</a> with the Arduino, first download the revised sketch <a href="http://mightyohm.com/blog/products/hv-rescue-shield-2-x/source-code/">here</a>.  Set the MEGA #define to 1 and compile/upload the sketch to your board.  Make sure you have the Arduino Mega selected in the Arduino Board menu, or the sketch won&#8217;t compile.</p>
<p>The Mega has more pin headers than the Rescue Shield, so be sure to install the shield all the way to the left, as shown here:</p>
<p><a class="tt-flickr tt-flickr-Medium" title="HV Rescue Shield alignment on the Arduino Mega" href="http://www.flickr.com/photos/mightyohm/5533188334/"><img class="alignnone" src="http://farm6.static.flickr.com/5140/5533188334_ed8c932e6a.jpg" alt="HV Rescue Shield alignment on the Arduino Mega" width="500" height="202" /></a></p>
<p>If you experience any problems with the <a href="http://mightyohm.com/blog/products/hv-rescue-shield-2-x/">HV Rescue Shield</a> and the Arduino Mega, please report them in the <a href="http://mightyohm.com/forum/viewforum.php?f=7">support forum</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://mightyohm.com/blog/2011/03/hv-rescue-shield-now-works-with-the-arduino-mega/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>HV Rescue Shield 2.1 Now Shipping</title>
		<link>http://mightyohm.com/blog/2011/02/hv-rescue-shield-2-1-now-shipping/</link>
		<comments>http://mightyohm.com/blog/2011/02/hv-rescue-shield-2-1-now-shipping/#comments</comments>
		<pubDate>Mon, 07 Feb 2011 07:27:20 +0000</pubDate>
		<dc:creator>Jeff</dc:creator>
				<category><![CDATA[DIY]]></category>
		<category><![CDATA[Electronics]]></category>
		<category><![CDATA[Kits]]></category>
		<category><![CDATA[Microcontrollers]]></category>
		<category><![CDATA[AVR]]></category>
		<category><![CDATA[hvrescue]]></category>

		<guid isPermaLink="false">http://mightyohm.com/blog/?p=3620</guid>
		<description><![CDATA[I have good news.  The latest and greatest version of the HV Rescue Shield is now available! Version 2.1 contains a new and improved 12V switching circuit that resolves an issue reading/writing to parts with certain startup timer settings.  This issue affects all previous versions of the Rescue Shield kit. I have kits in stock [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://mightyohm.com/hvrescue2"><img class="alignnone" src="http://farm6.static.flickr.com/5140/5418114324_df1976bef0.jpg" alt="HV Rescue Shield 2.1" width="500" height="375" /></a></p>
<p>I have good news.  The latest and greatest version of the <a href="http://mightyohm.com/hvrescue2">HV Rescue Shield</a> is now available!</p>
<p>Version 2.1 contains a new and improved 12V switching circuit that resolves an issue reading/writing to parts with <a href="http://mightyohm.com/blog/2010/12/issue-with-rescue-shield-and-targets-with-sut-0ms/">certain startup timer settings</a>.  This issue affects all previous versions of the Rescue Shield kit.</p>
<p>I have kits in stock and ready to ship this week.  If you have been waiting for the new release, you can <a href="http://mightyohm.com/hvrescue2">place an order now</a>.</p>
<p><em>Note to HV Rescue Shield 2.0 customers: Because the startup timer issue was identified so quickly after version 2.0 was released, I am offering a free upgrade for all customers who purchased a version 2.0 kit.  Please <a href="http://mightyohm.com/blog/contact">contact me</a> to arrange for a replacement.  This offer only applies to HV Rescue Shield 2.0 customers. </em></p>
]]></content:encoded>
			<wfw:commentRss>http://mightyohm.com/blog/2011/02/hv-rescue-shield-2-1-now-shipping/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>HV Rescue Shield Update #3</title>
		<link>http://mightyohm.com/blog/2011/01/hv-rescue-shield-update-3/</link>
		<comments>http://mightyohm.com/blog/2011/01/hv-rescue-shield-update-3/#comments</comments>
		<pubDate>Tue, 25 Jan 2011 19:46:15 +0000</pubDate>
		<dc:creator>Jeff</dc:creator>
				<category><![CDATA[Kits]]></category>
		<category><![CDATA[Microcontrollers]]></category>
		<category><![CDATA[AVR]]></category>
		<category><![CDATA[hvrescue]]></category>

		<guid isPermaLink="false">http://mightyohm.com/blog/?p=3590</guid>
		<description><![CDATA[A quick update on the HV Rescue Shield: About a week ago, I completed testing on a new switching circuit that allows me to leave the DC-DC converter on full-time and switch the RESET signal very quickly (risetimes in the microseconds).   Now there shouldn&#8217;t be any more  issues getting parts with zero SUT to [...]]]></description>
			<content:encoded><![CDATA[<p>A quick update on the HV Rescue Shield:</p>
<p>About a week ago, I completed testing on a new switching circuit that allows me to leave the DC-DC converter on full-time and switch the RESET signal very quickly (risetimes in the microseconds).   Now there shouldn&#8217;t be any more  issues getting parts with zero SUT to enter HVSP/HVPP mode.</p>
<p>It&#8217;s taken a lot longer than I expected to get to this point, but the results look very good. I have had 100% success reading/writing all parts I have tested.</p>
<p>PCBs are on order and due to ship by the end of the week.  Assuming the layout is good and I didn&#8217;t just order a large batch of stylish (but small) coasters, I should have kits in stock again by the end of next week.</p>
<p>Watch here for updates, and my apologies to everyone who has been waiting on a kit &#8211; new and improved kits should be available soon.</p>
<p><strong>Update 2/1:</strong> PCBs came in while I was away last week, and are currently being held at my local Fedex office, which is closed due to the power outages that are affecting Austin today.  Apparently Austin does not handle prolonged sub-freezing temperatures very well.   As soon as I can get my hands on the boards, it should only be a day or two before kits are available again.</p>
]]></content:encoded>
			<wfw:commentRss>http://mightyohm.com/blog/2011/01/hv-rescue-shield-update-3/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>New Product: HV Rescue Shield 2.0</title>
		<link>http://mightyohm.com/blog/2010/12/new-product-hv-rescue-shield-2-0/</link>
		<comments>http://mightyohm.com/blog/2010/12/new-product-hv-rescue-shield-2-0/#comments</comments>
		<pubDate>Mon, 13 Dec 2010 22:03:28 +0000</pubDate>
		<dc:creator>Jeff</dc:creator>
				<category><![CDATA[Microcontrollers]]></category>
		<category><![CDATA[Arduino]]></category>
		<category><![CDATA[AVR]]></category>
		<category><![CDATA[hvrescue]]></category>

		<guid isPermaLink="false">http://mightyohm.com/blog/?p=3480</guid>
		<description><![CDATA[The HV Rescue Shield 2.0 is a high voltage parallel mode fuse programmer for Atmel AVR microcontrollers. It currently supports a wide variety of AVR chips, including the 28-pin ATmega48/88/168/328 series, the 20-pin ATtiny2313, and many 8-pin ATtiny devices (such as the ATtiny25/45/85 and ATtiny13A).  A list of supported devices is in progress, but the Rescue [...]]]></description>
			<content:encoded><![CDATA[<div>
<div>
<h3><span style="font-weight: normal; font-size: 13px;"><a title="HV Rescue Shield 2.x" href="http://mightyohm.com/hvrescue2"><img src="http://farm6.static.flickr.com/5244/5258942710_40eaf1b99c.jpg" alt="HV Rescue Shield 2.x" width="500" height="375" /></a></span></h3>
<p>The HV Rescue Shield 2.0 is a high voltage parallel mode fuse programmer for Atmel AVR microcontrollers.</p>
<p>It currently supports a wide variety of AVR chips, including the 28-pin ATmega48/88/168/328 series, the 20-pin ATtiny2313, and many 8-pin ATtiny devices (such as the ATtiny25/45/85 and ATtiny13A).  A <a href="http://mightyohm.com/wiki/products:hvrescue:compatibility">list of supported devices</a> is in progress, but the Rescue Shield supports many more devices than those listed on the wiki.</p>
<p><strong>The HV Rescue Shield 2.0 is in stock and ready to ship today!  Scroll down to place an order.</strong></p>
<h4>New in release 2.0:</h4>
<ul>
<li>Support for 8-pin ATtiny devices that use High Voltage Serial Programming (HVSP) mode!</li>
<li>Mode selection at startup so you don&#8217;t have to recompile the Arduino sketch to change parts.</li>
<li>More reliable HFUSE burning on all HVPP targets.</li>
<li>Numerous minor bug fixes and speed improvements to the code.</li>
<li>Reduced price, kit is now only <strong>$19.95</strong> (was $24.95).   This means the kit is lower cost, but with more supported parts!</li>
</ul>
<h4>Requirements:</h4>
<ul>
<li>A working <a href="http://www.arduino.cc">Arduino</a> (tested with Arduino Uno, Duemilanove and Arduino NG)</li>
<li>A computer with USB and the <a href="http://arduino.cc/en/Main/Software">Arduino IDE</a> installed (tested with <a href="http://arduino.cc/en/Main/ReleaseNotes">Arduino 0021</a>)</li>
<li>A soldering iron and basic electronics assembly skills</li>
</ul>
<h4>What you get:</h4>
<ul>
<li>A high quality printed circuit board with the DC-DC converter preassembled, as shown below.</li>
<li>All other components needed to build the kit</li>
<li>An Arduino sketch, assembly instructions, Eagle schematics and layout files.</li>
</ul>
<p>Here is a snapshot of the components included with the kit.</p>
<p><a title="parts" href="http://mightyohm.com/hvrescue2"><img src="http://farm6.static.flickr.com/5125/5258334193_1107daf0d0.jpg" alt="parts" width="500" height="375" /></a></p>
<h4>How to Order:</h4>
<p>Visit the <a href="http://mightyohm.com/hvrescue2">HV Rescue Shield 2.x product page</a> to place an order.</p>
</div>
</div>
]]></content:encoded>
			<wfw:commentRss>http://mightyohm.com/blog/2010/12/new-product-hv-rescue-shield-2-0/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>HV Rescue Shield 2.0 update</title>
		<link>http://mightyohm.com/blog/2010/12/hv-rescue-shield-2-0-update/</link>
		<comments>http://mightyohm.com/blog/2010/12/hv-rescue-shield-2-0-update/#comments</comments>
		<pubDate>Fri, 03 Dec 2010 00:56:40 +0000</pubDate>
		<dc:creator>Jeff</dc:creator>
				<category><![CDATA[DIY]]></category>
		<category><![CDATA[Electronics]]></category>
		<category><![CDATA[Kits]]></category>
		<category><![CDATA[Microcontrollers]]></category>
		<category><![CDATA[Arduino]]></category>
		<category><![CDATA[AVR]]></category>

		<guid isPermaLink="false">http://mightyohm.com/blog/?p=3404</guid>
		<description><![CDATA[Version 2.0 of the HV Rescue Shield (I decided to drop the &#8216;AVR&#8217; from the name) will add support for high voltage serial programming (HVSP) and 8-pin parts like the ATtiny13A. Boards are due back next week, components are on order, but there is still code to write. Back to work!]]></description>
			<content:encoded><![CDATA[<p><a class="tt-flickr tt-flickr-Medium" title="HV Rescue Shield 2.0" href="http://www.flickr.com/photos/mightyohm/5227880978/"><img class="alignnone" src="http://farm5.static.flickr.com/4131/5227880978_96728fa09d.jpg" alt="HV Rescue Shield 2.0" width="421" height="500" /></a></p>
<p>Version 2.0 of the HV Rescue Shield (I decided to drop the &#8216;AVR&#8217; from the name) will add support for high voltage serial programming (HVSP) and 8-pin parts like the ATtiny13A.</p>
<p>Boards are due back next week, components are on order, but there is still code to write.</p>
<p>Back to work!</p>
]]></content:encoded>
			<wfw:commentRss>http://mightyohm.com/blog/2010/12/hv-rescue-shield-2-0-update/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Atmel AVRISP mkII working in Virtualbox</title>
		<link>http://mightyohm.com/blog/2010/11/atmel-avrisp-mkii-working-in-virtualbox/</link>
		<comments>http://mightyohm.com/blog/2010/11/atmel-avrisp-mkii-working-in-virtualbox/#comments</comments>
		<pubDate>Thu, 18 Nov 2010 01:31:35 +0000</pubDate>
		<dc:creator>Jeff</dc:creator>
				<category><![CDATA[Microcontrollers]]></category>
		<category><![CDATA[Atmel]]></category>
		<category><![CDATA[AVR]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[virtualbox]]></category>

		<guid isPermaLink="false">http://mightyohm.com/blog/?p=3333</guid>
		<description><![CDATA[In the past I have had problems getting the Atmel AVRISP mkII to work with Virtualbox.  This can be really irritating if, like me, you want to write code in Linux but are forced to run Windows for Skype and various closed-source development tools (ugh). Today, it seems to be working.  I can talk to [...]]]></description>
			<content:encoded><![CDATA[<p>In the past I have had problems getting the <a href="http://www.atmel.com/dyn/products/tools_card.asp?tool_id=3808">Atmel AVRISP mkII</a> to work with <a href="http://www.virtualbox.org/">Virtualbox</a>.  This can be really irritating if, like me, you want to write code in Linux but are forced to run Windows for Skype and various <a href="http://www.atmel.com/dyn/products/tools_card.asp?tool_id=2725&amp;source=redirect">closed-source development tools</a> (ugh).</p>
<p>Today, it seems to be working.  I can talk to the AVRISP with <a href="http://savannah.nongnu.org/projects/avrdude/">avrdude</a> and program devices.  Cool!</p>
<p>I&#8217;m not sure what I changed.  I&#8217;m using Virtualbox 3.2.10 r66523, running on a Windows 7 64-bit host.  The VM/client OS is Ubuntu 10.10.  I created a USB filter for the AVRISP in the Virtual Machine settings; it doesn&#8217;t seem to work without it.  That might be what I was missing before.</p>
<p>To avoid having to run avrdude with root priveledges, I created the file /etc/udev/rules.d/10-avrisp2.rules with the contents:</p>
<pre>SUBSYSTEM=="usb", SYSFS{idVendor}=="03eb", SYSFS{idProduct}=="2104", GROUP="adm", MODE="0666"</pre>
<p>Pretty simple.</p>
<p>Oh, I should add that there is no guarantee other combinations of host/client OS will work.   If you&#8217;re getting different results, leave a comment.</p>
]]></content:encoded>
			<wfw:commentRss>http://mightyohm.com/blog/2010/11/atmel-avrisp-mkii-working-in-virtualbox/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>AVR Toolchain Installation Instructions for Windows, Mac OS X, Linux</title>
		<link>http://mightyohm.com/blog/2010/10/avr-toolchain-installation-instructions-for-windows-mac-os-x-linux/</link>
		<comments>http://mightyohm.com/blog/2010/10/avr-toolchain-installation-instructions-for-windows-mac-os-x-linux/#comments</comments>
		<pubDate>Fri, 29 Oct 2010 05:20:29 +0000</pubDate>
		<dc:creator>Jeff</dc:creator>
				<category><![CDATA[Microcontrollers]]></category>
		<category><![CDATA[AVR]]></category>
		<category><![CDATA[avr-gcc]]></category>
		<category><![CDATA[avrbook]]></category>
		<category><![CDATA[crosspack]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[osx]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[winavr]]></category>
		<category><![CDATA[windows]]></category>

		<guid isPermaLink="false">http://mightyohm.com/blog/?p=3304</guid>
		<description><![CDATA[Mitch Altman and I are in the process of writing a book about Making Cool Things with Microcontrollers (for people who know nothing.) The book features several DIY projects that use AVR microcontrollers.  We&#8217;re aiming to teach absolute beginners how to solder, basic electronics, and the process of turning a cool idea into reality by [...]]]></description>
			<content:encoded><![CDATA[<div>
<p><a href="http://mightyohm.com/blog/wp-content/uploads/2010/10/winavr.png"><img class="alignnone size-medium wp-image-3269" title="WinAVR" src="http://mightyohm.com/blog/wp-content/uploads/2010/10/winavr-500x336.png" alt="" width="500" height="336" /></a></p>
<p><a href="http://www.cornfieldelectronics.com">Mitch Altman</a> and I are in the process of writing a book about Making Cool Things with Microcontrollers (for people who know nothing.)</p>
<p>The book features several DIY projects that use <a href="http://atmel.com/products/avr/default.asp?family_id=607&amp;source=home">AVR</a> microcontrollers.  We&#8217;re aiming to teach absolute beginners how to solder, basic electronics, and the process of turning a cool idea into reality by using microcontrollers.</p>
<p>I wrote these instructions about setting up a working avr-gcc environment in Windows, Mac OS X, or Linux.  Mitch and I felt that they could use some beta testing in the real world before bring included in the book, so we decided to make them available here.  We also felt that they might help some people get started with AVRs before the book is available.</p>
<p>We want to make the process of writing and compiling code for the AVR simple and accessible, so we&#8217;re not using any fancy IDEs (eg. no <a href="http://www.atmel.com/dyn/products/tools_card.asp?tool_id=2725">AVR Studio</a>).  We also wanted to use the same software on all three operating systems, so Windows-only tools were out.  Instead, we&#8217;re using avr-gcc, the compiler behind WinAVR, CrossPack, and Arduino.</p>
<p>I would appreciate any feedback on these instructions.</p>
<p>Here they are:</p>
<p><a href="http://mightyohm.com/blog/tutorials/avr-toolchain-installation/windows">Windows</a></p>
<p><a href="http://mightyohm.com/blog/tutorials/avr-toolchain-installation/mac-os-x">Mac OS X</a></p>
<p><a href="http://mightyohm.com/blog/tutorials/avr-toolchain-installation/linux">Linux</a></p>
<p><strong>Update:</strong> I totally rewrote this post after getting feedback that I didn&#8217;t properly identify my target audience and explain why I chose avr-gcc.  Sorry!</p>
</div>
]]></content:encoded>
			<wfw:commentRss>http://mightyohm.com/blog/2010/10/avr-toolchain-installation-instructions-for-windows-mac-os-x-linux/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Misleading Newark Adsense Ad</title>
		<link>http://mightyohm.com/blog/2010/10/misleading-newark-adsense-ads/</link>
		<comments>http://mightyohm.com/blog/2010/10/misleading-newark-adsense-ads/#comments</comments>
		<pubDate>Mon, 18 Oct 2010 04:00:20 +0000</pubDate>
		<dc:creator>Jeff</dc:creator>
				<category><![CDATA[Microcontrollers]]></category>
		<category><![CDATA[ATmega]]></category>
		<category><![CDATA[Atmel]]></category>
		<category><![CDATA[AVR]]></category>
		<category><![CDATA[newark]]></category>

		<guid isPermaLink="false">http://mightyohm.com/blog/?p=3171</guid>
		<description><![CDATA[Exhibit A: Newark has hard to find ATmega32U2&#8242;s in stock?!  Yippee! &#60;click!&#62; Hey, wait a minute&#8230; Bad Newark! And no, they didn&#8217;t &#8220;just sell the last one.&#8221;]]></description>
			<content:encoded><![CDATA[<p>Exhibit A:</p>
<p><a class="tt-flickr tt-flickr-Medium" title="Newark Bogus Adsense" href="http://www.flickr.com/photos/mightyohm/5092377552/"><img class="alignnone" style="border: 1px solid black;" src="http://farm5.static.flickr.com/4126/5092377552_f01d14bae4.jpg" alt="Newark Bogus Adsense" width="500" height="49" /></a></p>
<p><a href="http://www.newark.com">Newark</a> has hard to find ATmega32U2&#8242;s in stock?!  Yippee!</p>
<p><em>&lt;click!&gt;</em></p>
<p>Hey, wait a minute&#8230;</p>
<p><a class="tt-flickr tt-flickr-Medium" title="Newark Bogus Adsense 2" href="http://www.flickr.com/photos/mightyohm/5092377560/"><img class="alignnone" style="border: 1px solid black;" src="http://farm5.static.flickr.com/4087/5092377560_1d625ec26e.jpg" alt="Newark Bogus Adsense 2" width="500" height="205" /></a></p>
<p>Bad Newark!</p>
<p>And no, they didn&#8217;t &#8220;just sell the last one.&#8221;</p>
]]></content:encoded>
			<wfw:commentRss>http://mightyohm.com/blog/2010/10/misleading-newark-adsense-ads/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>AVR HV Rescue Shield works with Arduino Uno</title>
		<link>http://mightyohm.com/blog/2010/10/avr-hv-rescue-shield-works-with-arduino-uno/</link>
		<comments>http://mightyohm.com/blog/2010/10/avr-hv-rescue-shield-works-with-arduino-uno/#comments</comments>
		<pubDate>Mon, 04 Oct 2010 22:42:54 +0000</pubDate>
		<dc:creator>Jeff</dc:creator>
				<category><![CDATA[Kits]]></category>
		<category><![CDATA[Microcontrollers]]></category>
		<category><![CDATA[Arduino]]></category>
		<category><![CDATA[AVR]]></category>
		<category><![CDATA[rescue shield]]></category>

		<guid isPermaLink="false">http://mightyohm.com/blog/?p=3120</guid>
		<description><![CDATA[I&#8217;m happy to report that the AVR HV Rescue Shield has been tested and works with the new Arduino Uno. This isn&#8217;t too much of a surprise, but it&#8217;s always good to check that seemingly innocent changes to a hardware platform don&#8217;t cause unexpected problems in existing applications.  (That is the voice of experience talking, can you tell?)]]></description>
			<content:encoded><![CDATA[<p><a class="tt-flickr tt-flickr-Medium" title="Arduino Uno" href="http://www.flickr.com/photos/mightyohm/5052593396/"><img class="alignnone" src="http://farm5.static.flickr.com/4089/5052593396_0bf1fbda64.jpg" alt="Arduino Uno" width="374" height="500" /></a></p>
<p>I&#8217;m happy to report that the <a href="http://mightyohm.com/avr_rescue">AVR HV Rescue Shield</a> has been tested and works with the new <a href="http://arduino.cc">Arduino Uno</a>.</p>
<p>This isn&#8217;t too much of a surprise, but it&#8217;s always good to check that seemingly innocent changes to a hardware platform don&#8217;t cause unexpected problems in existing applications.  (That is the voice of experience talking, can you tell?)</p>
]]></content:encoded>
			<wfw:commentRss>http://mightyohm.com/blog/2010/10/avr-hv-rescue-shield-works-with-arduino-uno/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>AVR HV Rescue Shield Out of Stock</title>
		<link>http://mightyohm.com/blog/2010/09/avr-hv-rescue-shield-out-of-stock/</link>
		<comments>http://mightyohm.com/blog/2010/09/avr-hv-rescue-shield-out-of-stock/#comments</comments>
		<pubDate>Wed, 29 Sep 2010 17:51:04 +0000</pubDate>
		<dc:creator>Jeff</dc:creator>
				<category><![CDATA[Kits]]></category>
		<category><![CDATA[Microcontrollers]]></category>
		<category><![CDATA[Atmel]]></category>
		<category><![CDATA[AVR]]></category>
		<category><![CDATA[pcb]]></category>
		<category><![CDATA[rescue shield]]></category>

		<guid isPermaLink="false">http://mightyohm.com/blog/?p=3118</guid>
		<description><![CDATA[This week I sold the last AVR HV Rescue Shield kit in stock! This is a significant milestone as it means I have finally sold off all of the kits from the original PCB fab run. At the time I wasn&#8217;t sure if anyone would actually buy such a thing, so pulling the trigger on [...]]]></description>
			<content:encoded><![CDATA[<p>This week I sold the last AVR HV Rescue Shield kit in stock!  This is a significant milestone as it means I have finally sold off all of the kits from the original PCB fab run.  At the time I wasn&#8217;t sure if anyone would actually buy such a thing, so pulling the trigger on what seemed like a huge number of boards was a leap of faith! </p>
<p>I want to thank everyone who bought kits and PCBs.  <strong>Thank you for supporting me and the site!</strong></p>
<p>Rather than reorder new boards of the existing design, I am taking this opportunity to re-evaluate my approach to a couple things, with the goal of reducing the BOM cost and lowering the overall cost of the kit. </p>
<p>The bad news is that this means there won&#8217;t be any more kits in stock in the short term.  I&#8217;m planning to release a new PCB design within the next couple weeks, which means kits would be in stock within about a month.  Because this is a busy time for me, I can&#8217;t promise specific dates, but I will do my best to keep the process moving because I know there are people waiting for the new kits.</p>
<p>If you need a kit <em>right now</em>, I believe Solarbotics <a href="http://www.solarbotics.com/products/31055/">still has some in stock</a>.</p>
<p>Otherwise, stay tuned for updates.</p>
<p>And again, if you bought a kit, or even if you built the DIY version with spare parts and helped spread the word, thank you!</p>
<p>- Jeff</p>
]]></content:encoded>
			<wfw:commentRss>http://mightyohm.com/blog/2010/09/avr-hv-rescue-shield-out-of-stock/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Improved firmware for USBTinyISP fixes USB issues</title>
		<link>http://mightyohm.com/blog/2010/09/improved-firmware-for-usbtinyisp-fixes-usb-issues-in-virtualbox/</link>
		<comments>http://mightyohm.com/blog/2010/09/improved-firmware-for-usbtinyisp-fixes-usb-issues-in-virtualbox/#comments</comments>
		<pubDate>Mon, 20 Sep 2010 13:35:29 +0000</pubDate>
		<dc:creator>Jeff</dc:creator>
				<category><![CDATA[Microcontrollers]]></category>
		<category><![CDATA[adafruit]]></category>
		<category><![CDATA[ATtiny]]></category>
		<category><![CDATA[attiny2313]]></category>
		<category><![CDATA[AVR]]></category>
		<category><![CDATA[usbtiny]]></category>
		<category><![CDATA[usbtinyisp]]></category>
		<category><![CDATA[virtualbox]]></category>

		<guid isPermaLink="false">http://mightyohm.com/blog/?p=3090</guid>
		<description><![CDATA[I am a big fan of VirtualBox.  I have used it in various forms over the past couple years: to run Windows within Linux, Linux within Windows, Linux within OSX, Windows within OSX, etc.  It is fast, powerful, configurable, and best of all, free. However, there is one major disadvantage to using a virtual machine [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://mightyohm.com/blog/wp-content/uploads/2010/09/virtualbox.png"><img class="alignnone size-medium wp-image-3095" title="VirtualBox 3.2.8" src="http://mightyohm.com/blog/wp-content/uploads/2010/09/virtualbox-500x394.png" alt="" width="500" height="394" /></a></p>
<p>I am a big fan of <a href="http://www.virtualbox.org/">VirtualBox</a>.  I have used it in various forms over the past couple years: to run Windows within Linux, Linux within Windows, Linux within OSX, Windows within OSX, etc.  It is fast, powerful, configurable, and best of all, free.</p>
<p>However, there is one major disadvantage to using a virtual machine for hardware development.  Sometimes USB devices don&#8217;t get along with the VM very well.  What&#8217;s worse is that sometimes certain combinations of host and guest OS will work for a given USB device, while others won&#8217;t.  This can make debugging very frustrating!</p>
<p>I recently set up VirtualBox on my Windows 7 x64 PC so that I could run Ubuntu 10.04 alongside Windows.  Everything was going great until I plugged in my Adafruit Industries <a href="http://www.ladyada.net/make/usbtinyisp/">USBTinyISP</a> so I could flash an AVR from within the Ubuntu virtual machine.</p>
<p>Instead of seeing the USBTinyISP show up on the VM, I got something like this:</p>
<p><img class="alignnone size-medium wp-image-3091" title="USBtinyISP captured but not responding" src="http://mightyohm.com/blog/wp-content/uploads/2010/09/captured_but_not_responding-499x444.png" alt="" width="499" height="444" /></p>
<p>The USBtinyISP is shown as &#8220;State: Captured:&#8221; in the VirtualBox USB device menu but there is no checkmark along side it, it doesn&#8217;t show up in lsusb, and avrdude can&#8217;t find it either.</p>
<p>When I tried to attach the USBtiny in Virtualbox again, I got this error message:</p>
<p><img class="alignnone size-full wp-image-3094" title="VirtualBox error message" src="http://mightyohm.com/blog/wp-content/uploads/2010/09/virtualbox-error.png" alt="" width="358" height="275" /></p>
<p>Bad news.</p>
<p>I tried various combinations of relaunching VirtualBox, rebooting, adding USB filters to the VM, unplugging, replugging, etc.  No dice.</p>
<p>I decided that there must be an issue with the USB stack running on the USBTinyISP.  Most USB devices can handle the hand-off between the Windows host and the Ubuntu virtual machine, but for some reason the USBTinyISP can&#8217;t.  (It&#8217;s also worth mentioning that the Atmel AVRISP mkII programmer doesn&#8217;t work with Virtualbox either.  It shows up but can&#8217;t flash a device.  I&#8217;ll have to look into this someday, but since I mainly use the USBTinyISP, fixing the AVRISP wasn&#8217;t a priority.)</p>
<p>The firmware that powers the Adafruit USBTinyISP is based on Dick Streefland&#8217;s <a href="http://www.xs4all.nl/~dicks/avr/usbtiny/">usbtiny</a> project.  Dick has released a couple more revisions of his code since the v1.3 release that Limor Fried used to create the <a href="http://www.ladyada.net/make/usbtinyisp/download.html">USBTinyISP v2.0 firmware</a>.  There have been a few <a href="http://mightyohm.com/blog/wp-content/uploads/2010/09/usbtiny_changelog.txt">bug fixes and improvements</a> to the code, including some that address USB enumeration/communication issues.  In addition, the usbtiny code now includes a branch specifically for the USBTinyISP.  A pre-compiled hex file is provided for easy flashing to an ATtiny2313.</p>
<p>I was hopeful that these fixes might solve my Virtualbox problems, so I downloaded Dick&#8217;s new <a href="http://www.xs4all.nl/~dicks/avr/usbtiny/usbtiny-1.5.tar.gz">usbtiny-1.5 source</a> and used my spare AVRISP mkII (within Windows) to burn the main.hex file to a spare ATtiny2313.</p>
<p><a class="tt-flickr tt-flickr-Medium" title="Flashing ATtiny2313" href="http://www.flickr.com/photos/mightyohm/4999912988/"><img class="alignnone" src="http://farm5.static.flickr.com/4152/4999912988_9e4b0fdaf8.jpg" alt="Flashing ATtiny2313" width="500" height="371" /></a></p>
<p>The USBtinyISP source sets the fuses on the ATtiny2313 for an external clock, so  I had to wire up a ceramic resonator (small orange blob to the lower left of the AVR) to verify the AVR after setting the fuses.  You can see my <a href="http://www.sparkfun.com/commerce/product_info.php?products_id=8508">Sparkfun AVR ISP adapter</a> on the right.  I also wired up  an external 5V power supply (the test leads at the top of the breadboard).</p>
<p>After burning the new usbtiny-1.5 firmware to the ATtiny2313, I installed it in my USBTinyISP and connected it to my computer.</p>
<p>At first, I still couldn&#8217;t get the USBTiny to attach to the VM if I plugged it into my PC and then selected it from VirtualBox&#8217;s USB menu.</p>
<p>However, when I created a USB filter in VirtualBox for the USBTinyISP and restarted the VM, it started working!  This was a huge improvement over the original firmware, which never worked once, despite all of the combinations I tried!</p>
<p>Here is the USB filter setup, accessible from the VM settings:</p>
<p><a href="http://mightyohm.com/blog/wp-content/uploads/2010/09/usbtiny0105_filter2.png"><img class="alignnone size-medium wp-image-3093" title="VirtualBox USB Filter" src="http://mightyohm.com/blog/wp-content/uploads/2010/09/usbtiny0105_filter2-500x365.png" alt="" width="500" height="365" /></a></p>
<p>Note that the revision is now shown as 0105 (instead of 0104 with the old usbtiny firmware):</p>
<p><a href="http://mightyohm.com/blog/wp-content/uploads/2010/09/usbtiny0105_filter.png"><img class="alignnone size-full wp-image-3092" title="USBTinyISP USB Filter Setup" src="http://mightyohm.com/blog/wp-content/uploads/2010/09/usbtiny0105_filter.png" alt="" width="366" height="339" /></a></p>
<p>lsusb shows the USBTinyISP (1781:0x9f Multiple Vendors) and avrdude no longer complains about finding the programmer.  (The initialization failed message shown below is because I didn&#8217;t have an AVR connected.)   The red LED on the USBTinyISP flashes when I run avrdude &#8211; a sure sign that the VM is communicating with the programmer.</p>
<p><a href="http://mightyohm.com/blog/wp-content/uploads/2010/09/usbtiny0105_working.png"><img class="alignnone size-medium wp-image-3101" title="USBTinyISP working" src="http://mightyohm.com/blog/wp-content/uploads/2010/09/usbtiny0105_working-499x355.png" alt="" width="499" height="355" /></a></p>
<p>Here is my modified USBTinyISP, with the reflashed ATtiny2313 and shorted R4 &amp; R7 (handy for programming devices that try to pull up/down the SCK/MOSI lines!)</p>
<p><a class="tt-flickr tt-flickr-Medium" title="Modified USBTinyISP" href="http://www.flickr.com/photos/mightyohm/4996516235/"><img class="alignnone" src="http://farm5.static.flickr.com/4153/4996516235_828999b4e2.jpg" alt="Modified USBTinyISP" width="500" height="375" /></a></p>
<p>I hope this helps anyone else who is trying to get the USBTinyISP working in Virtualbox on Windows.  It may help solve other USB problems as well &#8211; the fixes in the newer usbtiny code may apply to other situations as well.  If you are having problems with USB and the USBTinyISP, try upgrading the firmware and post your results here!</p>
]]></content:encoded>
			<wfw:commentRss>http://mightyohm.com/blog/2010/09/improved-firmware-for-usbtinyisp-fixes-usb-issues-in-virtualbox/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Fixed USBTinyISP drivers for 64-bit Windows 7 / Vista x64</title>
		<link>http://mightyohm.com/blog/2010/09/fixed-usbtinyisp-drivers-for-64-bit-windows-7/</link>
		<comments>http://mightyohm.com/blog/2010/09/fixed-usbtinyisp-drivers-for-64-bit-windows-7/#comments</comments>
		<pubDate>Thu, 09 Sep 2010 23:17:16 +0000</pubDate>
		<dc:creator>Jeff</dc:creator>
				<category><![CDATA[Microcontrollers]]></category>
		<category><![CDATA[adafruit]]></category>
		<category><![CDATA[AVR]]></category>
		<category><![CDATA[avr-gcc]]></category>
		<category><![CDATA[avrdude]]></category>
		<category><![CDATA[usbtiny]]></category>
		<category><![CDATA[windows]]></category>

		<guid isPermaLink="false">http://mightyohm.com/blog/?p=3068</guid>
		<description><![CDATA[For some time now, those wanting to use the Adafruit Industries USBTinyISP with the 64-bit versions of Windows 7 or Vista were faced with the following errors when attempting to install the device drivers supplied by Adafruit: For some reason, the 32-bit versions of these operating systems don&#8217;t prevent the unsigned drivers from being installed, [...]]]></description>
			<content:encoded><![CDATA[<p>For some time now, those wanting to use the Adafruit Industries <a href="http://www.ladyada.net/make/usbtinyisp/index.html">USBTinyISP</a> with the 64-bit versions of Windows 7 or Vista were faced with the following errors when attempting to install the <a href="http://www.ladyada.net/make/usbtinyisp/drivers.html">device drivers</a> supplied by Adafruit:</p>
<p><a href="http://mightyohm.com/blog/wp-content/uploads/2010/09/unsigned-driver.png"><img class="alignnone size-medium wp-image-3071" title="Windows USBTiny unsigned driver error" src="http://mightyohm.com/blog/wp-content/uploads/2010/09/unsigned-driver-500x382.png" alt="" width="500" height="382" /></a></p>
<p><a href="http://mightyohm.com/blog/wp-content/uploads/2010/09/unsigned-driver2.png"><img class="alignnone size-full wp-image-3070" title="USBtiny unsigned driver error message" src="http://mightyohm.com/blog/wp-content/uploads/2010/09/unsigned-driver2.png" alt="" width="396" height="376" /></a></p>
<p>For some reason, the 32-bit versions of these operating systems don&#8217;t prevent the unsigned drivers from being installed, although they do complain.</p>
<p>There are a few <a href="http://forums.adafruit.com/viewtopic.php?f=20&amp;t=11221">workarounds</a> that involve hacking Windows or disabling digital signature checking, but thanks to <a href="http://forums.adafruit.com/viewtopic.php?f=20&amp;t=17112">a tip by user wayneft</a> on the Adafruit support forums, I was able to make the process much more straightforward.</p>
<p>The USBTiny drivers are based on <a href="http://sourceforge.net/projects/libusb-win32/">libusb-win32</a>.  Based on some notes I found on the <a href="http://sourceforge.net/apps/trac/libusb-win32/wiki">libusb-win32 wiki</a>, I discovered that the latest libusb drivers contain a proper digital signature:</p>
<blockquote><p>Vista/7 64 bit are supported from version 1.2.0.0 since a Microsoft KMCS accepted digital signature is embedded in the kernel driver libusb0.sys. libusb-win32 based device drivers can also be submitted for Microsoft WHQL testing. Several companies have successfully finished the WHQL testing with their libusb-win32 based driver package. This will allow the customers to install the driver without a warning under current 32bit/64bit Windows.</p></blockquote>
<p>This is good news!</p>
<p>I downloaded the latest version of libusb-win32 (1.2.1.0) and used the included inf-wizard tool to create new drivers for the USBTinyISP:</p>
<p><a href="http://mightyohm.com/blog/wp-content/uploads/2010/09/usbtinyisp_libusb-win32_1.2.1.0.zip">usbtinyisp_libusb-win32_1.2.1.0</a></p>
<p>I used the Windows device manager to upgrade the broken drivers on my Windows 7 64-bit machine.  There is still a warning that &#8220;Windows can&#8217;t verify the publisher of this driver software&#8221; but there are no more errors about digital signatures and the new drivers appear to install and work correctly.</p>
<p>I haven&#8217;t done a huge amount of testing with the drivers, but I was able to communicate with the USBTiny via avrdude and flash a simple program to an AVR.   I also haven&#8217;t tested this fix on Vista, as I don&#8217;t have access to a computer running it.  If anyone tests these drivers on Vista x64, please post your results in the comments!</p>
]]></content:encoded>
			<wfw:commentRss>http://mightyohm.com/blog/2010/09/fixed-usbtinyisp-drivers-for-64-bit-windows-7/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Fix for broken avr-size in Ubuntu 10.04 (Lucid Lynx)</title>
		<link>http://mightyohm.com/blog/2010/08/fix-for-broken-avr-size-in-ubuntu-10-04-lucid/</link>
		<comments>http://mightyohm.com/blog/2010/08/fix-for-broken-avr-size-in-ubuntu-10-04-lucid/#comments</comments>
		<pubDate>Wed, 01 Sep 2010 03:17:29 +0000</pubDate>
		<dc:creator>Jeff</dc:creator>
				<category><![CDATA[Microcontrollers]]></category>
		<category><![CDATA[AVR]]></category>
		<category><![CDATA[avr-gcc]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://mightyohm.com/blog/?p=3045</guid>
		<description><![CDATA[If you have never used it before, avr-size is a very useful command that does a relatively simple thing &#8211; it tells you how large your compiled avr-gcc programs are.  This is very useful knowledge when you are trying to fit as much code as possible into a part with only a few K of flash memory. [...]]]></description>
			<content:encoded><![CDATA[<p>If you have never used it before, <a href="http://ccrma.stanford.edu/planetccrma/man/man1/avr-size.1.html">avr-size</a> is a very useful command that does a relatively simple thing &#8211; it tells you how large your compiled avr-gcc programs are.  This is very useful knowledge when you are trying to fit as much code as possible into a part with only a few K of flash memory.  Additionally, the actual flash footprint of an AVR program is not something you can easily distill from a .hex file.  Hex files are usually much larger than the actual compiled code due to the overhead of that file format.</p>
<p>avr-size comes with the binutils-avr package in Ubuntu (and is installed as part of WinAVR and CrossPack on Windows and OSX, respectively).  Unfortunately, Ubuntu 10.04 (Lucid Lynx) ships with a broken version of avr-size that doesn&#8217;t include the necessary patches to support the AVR.</p>
<p>To see if your avr-size is working, open a Terminal in Lucid and try executing this command on a compiled avr-gcc .elf file of your choice:</p>
<p><code><strong>avr-size -C --mcu=attiny2313 main.elf</strong></code></p>
<p>You&#8217;ll probably see something like this:</p>
<p><code>avr-size: invalid option -- 'C'<br />
Usage: avr-size [option(s)] [file(s)]<br />
Displays the sizes of sections inside binary files<br />
If no input file(s) are specified, a.out is assumed<br />
The options are:<br />
-A|-B     --format={sysv|berkeley}  Select output style (default is berkeley)<br />
-o|-d|-x  --radix={8|10|16}         Display numbers in octal, decimal or hex<br />
-t        --totals                  Display the total sizes (Berkeley only)<br />
--common                  Display total size for *COM* syms<br />
--target=&lt;bfdname&gt;        Set the binary file format<br />
@&lt;file&gt;                   Read options from &lt;file&gt;<br />
-h        --help                    Display this information<br />
-v        --version                 Display the program's version<br />
avr-size: supported targets: elf32-avr elf32-little elf32-big srec symbolsrec verilog tekhex binary ihex<br />
</code></p>
<p>Bad news, but it&#8217;s not surprising.  You have the broken version of avr-size that comes with binutils-avr for Lucid.</p>
<h3>The solution:</h3>
<p>I was able to fix this issue by installing the binutils-avr package for Debian Squeeze, an approach I learned about from <a href="https://bugs.launchpad.net/ubuntu/+source/binutils-avr/+bug/576676">this Ubuntu bug report</a>.</p>
<p>To download the Debian binutils-avr package, either go to the <a href="http://packages.debian.org/squeeze/amd64/binutils-avr/download">Debian package repository</a> or execute this command:</p>
<p><code><strong>wget "http://ftp.us.debian.org/debian/pool/main/b/binutils-avr/binutils-avr_2.20.1-1_amd64.deb"</strong></code></p>
<p>Now install the package by double clicking on it or executing:</p>
<p><code><strong>sudo dpkg -i binutils-avr_2.20.1-1_amd64.deb</strong></code></p>
<p>If you tell Ubuntu to &#8220;hold&#8221; the package you just installed, it should stop trying to revert to the broken version in the Lucid repository every time you run a system update:</p>
<p><code><strong>echo "binutils-avr hold" | sudo dpkg --set-selections</strong></code></p>
<p>You can check the hold status by running</p>
<p><code><strong>sudo dpkg --get-selections | grep binutils-avr<br />
</strong></code></p>
<p>The status should be shown as &#8220;hold&#8221; (not &#8220;install&#8221;).</p>
<p>Now if you run avr-size, you should see the special AVR option &#8216;-C&#8217; is now present.</p>
<p><code>jkeyzer@atom:~$<strong> avr-size --help</strong></code></p>
<p><code>Usage: avr-size [option(s)] [file(s)]<br />
Displays the sizes of sections inside binary files<br />
If no input file(s) are specified, a.out is assumed<br />
The options are:<br />
-A|-B|-C  --format={sysv|berkeley|avr}  Select output style (default is berkeley)<br />
--mcu=&lt;avrmcu&gt;            MCU name for AVR format only<br />
-o|-d|-x  --radix={8|10|16}         Display numbers in octal, decimal or hex<br />
-t        --totals                  Display the total sizes (Berkeley only)<br />
--common                  Display total size for *COM* syms<br />
--target=&lt;bfdname&gt;        Set the binary file format<br />
@&lt;file&gt;                   Read options from &lt;file&gt;<br />
-h        --help                    Display this information<br />
-v        --version                 Display the program's version<br />
avr-size: supported targets: elf32-avr coff-avr coff-ext-avr elf32-little elf32-big srec symbolsrec verilog tekhex binary ihex</code></p>
<p><code> </code></p>
<p><code>Report bugs to &lt;http://www.sourceware.org/bugzilla/&gt;</code></p>
<p>You can also test it out on a compiled .elf file:</p>
<p><code><strong><span style="font-weight: normal;">jkeyzer@atom:~$</span> avr-size -C --mcu=attiny2313 main.elf</strong></code></p>
<p><code>AVR Memory Usage<br />
----------------<br />
Device: attiny2313</code></p>
<p><code> </code></p>
<p><code>Program:    2008 bytes (98.0% Full)<br />
(.text + .data + .bootloader)</code></p>
<p><code> </code></p>
<p><code>Data:         23 bytes (18.0% Full)<br />
(.data + .bss + .noinit)</code></p>
<p>It works!  You now have a working avr-size command for Ubuntu.</p>
<p>There is a good chance this package will eventually be fixed in the Lucid repository, but based on the bug report above, it could be a while (2012?) before we see an update.  Until then, installing the Debian package seems to be a good solution.</p>
<p>If anyone reading this is close to the Ubuntu package maintainers, can you please kick them about this issue?</p>
]]></content:encoded>
			<wfw:commentRss>http://mightyohm.com/blog/2010/08/fix-for-broken-avr-size-in-ubuntu-10-04-lucid/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>AVR HV Rescue Shield Code Update 1.2</title>
		<link>http://mightyohm.com/blog/2010/08/avr-hv-rescue-shield-code-update-1-2/</link>
		<comments>http://mightyohm.com/blog/2010/08/avr-hv-rescue-shield-code-update-1-2/#comments</comments>
		<pubDate>Wed, 18 Aug 2010 07:03:24 +0000</pubDate>
		<dc:creator>Jeff</dc:creator>
				<category><![CDATA[Electronics]]></category>
		<category><![CDATA[Kits]]></category>
		<category><![CDATA[Microcontrollers]]></category>
		<category><![CDATA[Arduino]]></category>
		<category><![CDATA[AVR]]></category>
		<category><![CDATA[rescue shield]]></category>

		<guid isPermaLink="false">http://mightyohm.com/blog/?p=3027</guid>
		<description><![CDATA[Version 1.2 of the Arduino sketch that powers the AVR HV Rescue Shield is now available for download. The revised sketch now displays the target AVR&#8217;s existing fuse settings before asking you for new ones. I also cleaned up and reworked the code in a couple places, but these changes shouldn&#8217;t affect the existing functionality. [...]]]></description>
			<content:encoded><![CDATA[<p>Version 1.2 of the Arduino sketch that powers the <a href="http://mightyohm.com/blog/products/avr-hv-rescue-shield/">AVR HV Rescue Shield</a> is now <a href="http://mightyohm.com/blog/products/avr-hv-rescue-shield/source-code/">available for download</a>.</p>
<p>The revised sketch now displays the target AVR&#8217;s existing fuse settings before asking you for new ones.</p>
<p>I also cleaned up and reworked the code in a couple places, but these changes shouldn&#8217;t affect the existing functionality.</p>
<p>If you have any issues or questions about the new code, post them in the <a href="http://mightyohm.com/forum/viewforum.php?f=7">support forum</a> or <a href="http://mightyohm.com/blog/contact/">contact me directly</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://mightyohm.com/blog/2010/08/avr-hv-rescue-shield-code-update-1-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

