<?xml version='1.0' encoding='UTF-8'?><rss xmlns:atom='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' version='2.0'><channel><atom:id>tag:blogger.com,1999:blog-5032942319323490906</atom:id><lastBuildDate>Sat, 03 Jan 2009 15:41:48 +0000</lastBuildDate><title>UnwiredBen's Embedded Hacks</title><description>A collection of embedded hardware projects that Ben Combee's been working on, presented with video and source code</description><link>http://combee.net/hack/</link><managingEditor>noreply@blogger.com (UnwiredBen)</managingEditor><generator>Blogger</generator><openSearch:totalResults>1</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-5032942319323490906.post-4001950014527404585</guid><pubDate>Sat, 03 Jan 2009 14:43:00 +0000</pubDate><atom:updated>2009-01-03T10:41:48.978-05:00</atom:updated><title>Mignonette-Powered Prime Number Counter</title><description>&lt;object width="425" height="344"&gt;&lt;param name="movie" value="http://www.youtube.com/v/TDonP053o70&amp;hl=en&amp;fs=1"&gt;&lt;/param&gt;&lt;param name="allowFullScreen" value="true"&gt;&lt;/param&gt;&lt;param name="allowscriptaccess" value="always"&gt;&lt;/param&gt;&lt;embed src="http://www.youtube.com/v/TDonP053o70&amp;hl=en&amp;fs=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="344"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;a href="http://combee.net/hack/PrimeCounter.zip"&gt;PrimeCounter.zip&lt;/a&gt;, source and Makefile for use with WinAVR tools, GPL 2.0 license&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;This is my first programming project for &lt;a href="http://www.mignonette-game.com/"&gt;the Mignonette Game Project development board&lt;/a&gt;.  You can get this as &lt;a href="http://www.makershed.com/ProductDetails.asp?ProductCode=MKCE5"&gt;a solder-it-youself kit from the Maker Shed site&lt;/a&gt;.  It's a ATMega88 processor hooked up to a 5x7 bi-color LED matrix, four simple switches, and a speaker/headphone jack.  The chip has 8K of Flash memory for your program code along with 1K of RAM, and the version in the kit comes preprogrammed with a self-test program and a simple game called Crunch.&lt;br /&gt;&lt;br /&gt;This was the first project that I soldered together back in December and it worked the first time thanks to the clear directions provided on the website.  Because all of the pins were being used by the display and inputs, the only way to program the board is through the 6-pin ISP connector, so I ordered &lt;a href="http://www.ladyada.net/make/usbtinyisp/"&gt;a USBTinyISP programmer kit&lt;/a&gt; from ladyada.net and put that together just after Christmas.&lt;br /&gt;&lt;br /&gt;The code is derived from the &lt;a href="http://www.mignonette-game.com/downloads/attack-game-v1.0.zip"&gt;Attack game&lt;/a&gt; that Chris Brookfield wrote on the Mignonette website.  The code keeps a 5x7 bitmap for both the red and green LEDs in memory and has a display() routine that pulses all of the LEDs with the content of the bitmap.  If you don't call display() frequently, none of the LEDs will show.  You can vary the brightness of the display based on how often you call that routine.&lt;br /&gt;&lt;br /&gt;I reworked a lot of the display code from the Attack game to make it smaller and better formatted, then I added a digit display call.  This uses an embedded 3x5 font that's adequate to display the ten digits.  The digit routine lets you pick a color and side of the display, then copies the bitmap into the output buffer.  I've got a simple counting loop that gets the next number, determines if it's prime, outputs the two digits, then calls display() in an embedded loop for long enought that you can make out the number before going to the next one.&lt;br /&gt;&lt;br /&gt;The next step with this code is to make a basic dice roller application.  This means extending the code to take input with the buttons and to make an interesting sound while the user has the "roll" button depressed.</description><link>http://combee.net/hack/2009/01/mignonette-powered-prime-number-counter.html</link><author>noreply@blogger.com (UnwiredBen)</author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></item></channel></rss>