<?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>Robots w/Lasers &#187; AVR</title>
	<atom:link href="http://blog.davr.org/category/hardware/avr/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.davr.org</link>
	<description>Nintendo DS &#038; GBA development, microcontrollers, and occasionally FPGAs</description>
	<lastBuildDate>Wed, 17 Mar 2010 04:51:00 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>It Works!</title>
		<link>http://blog.davr.org/2008/01/09/it-works/</link>
		<comments>http://blog.davr.org/2008/01/09/it-works/#comments</comments>
		<pubDate>Thu, 10 Jan 2008 02:54:49 +0000</pubDate>
		<dc:creator>davr</dc:creator>
				<category><![CDATA[AVR]]></category>
		<category><![CDATA[Hardware]]></category>

		<guid isPermaLink="false">http://blog.davr.org/2008/01/09/it-works/</guid>
		<description><![CDATA[I&#8217;ve finished assembling my little gadget&#8230;and it works! As a side note, Flux is super handy, it made soldering the tiny SMT stuff really easy, also I learned a few tips from this video. 
I ran into one small problem: on the board, I added a JTAG port for in-circuit programming &#038; debugging. However, my [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://davr.org/elec/avr_led_game.jpg"><img align="right" src="http://davr.org/elec/avr_led_game1.jpg" width="220" height="352"></a>I&#8217;ve finished assembling my little gadget&#8230;and it works! As a side note, Flux is super handy, it made soldering the tiny SMT stuff really easy, also I learned a few tips from <a href="http://www.curiousinventor.com/guides/Surface_Mount_Soldering/101">this video</a>. </p>
<p>I ran into one small problem: on the board, I added a JTAG port for in-circuit programming &#038; debugging. However, my cheapo JTAGICE mkI (not mkII) doesn&#8217;t support the newer AVR chip I put on the board. So I had to hack in an ICSP port, hence the four ugly green wires coming out of the middle of the board. But once I got that in, I updated the program I had running on the prototype. There were just some minor changes, IO pins were mapped differently, and the syntax for using Timers was slightly changed.</p>
<p>Now that the hardware is essentially done, I need to write some more software, get a few polished minigames on there. </p>
<p><b>UPDATE:</b> Please <a href="http://davr.org/elec/avrsub.php">enter your email address</a>, I&#8217;m trying to find out if there&#8217;s any interest in these devices. If enough people subscribe, it will encourage me to do something about it <img src='http://blog.davr.org/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>You can <a href="http://davr.org/elec/avr_led_game.avi">download a short video</a>, or watch it online here:</p>
<p><span id="more-76"></span><br />
<embed style="width:400px; height:326px;" id="VideoPlayback" type="application/x-shockwave-flash" src="http://video.google.com/googleplayer.swf?docId=4647490573418066760&#038;hl=en" flashvars=""> </embed></p>
<p>PS: I bought enough parts (including the PCB) to build two of them&#8230;so if anyone wants to buy one, please feel free to make me an offer in the comments below <img src='http://blog.davr.org/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://blog.davr.org/2008/01/09/it-works/feed/</wfw:commentRss>
		<slash:comments>12</slash:comments>
<enclosure url="http://davr.org/elec/avr_led_game.avi" length="2787266" type="video/x-msvideo" />
		</item>
		<item>
		<title>PCB Received from Olimex</title>
		<link>http://blog.davr.org/2008/01/04/pcb-received-from-olimex/</link>
		<comments>http://blog.davr.org/2008/01/04/pcb-received-from-olimex/#comments</comments>
		<pubDate>Fri, 04 Jan 2008 20:00:55 +0000</pubDate>
		<dc:creator>davr</dc:creator>
				<category><![CDATA[AVR]]></category>
		<category><![CDATA[Hardware]]></category>

		<guid isPermaLink="false">http://blog.davr.org/2008/01/04/pcb-received-from-olimex/</guid>
		<description><![CDATA[Over the christmas holiday I received my PCBs back from Olimex. They look very professionally made, it&#8217;s pretty neat knowing that I designed it completely myself. In the picture to the right you can see the board with a few of the components. I haven&#8217;t started soldering yet, but I&#8217;ve placed them on there so [...]]]></description>
			<content:encoded><![CDATA[<p><img align="right" src="http://davr.org/elec/game.s.jpg" width="247" height="400">Over the christmas holiday I received my PCBs back from Olimex. They look very professionally made, it&#8217;s pretty neat knowing that I designed it completely myself. In the picture to the right you can see the board with a few of the components. I haven&#8217;t started soldering yet, but I&#8217;ve placed them on there so you can get an idea of how it will look when finished. </p>
<p>I&#8217;m waiting on the parts from Allegro before I can finish, I&#8217;ve requested samples of their surface mount pieces (previously I only got the ones in the DIP packages).</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.davr.org/2008/01/04/pcb-received-from-olimex/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Designing my first PCB</title>
		<link>http://blog.davr.org/2007/12/11/designing-my-first-pcb/</link>
		<comments>http://blog.davr.org/2007/12/11/designing-my-first-pcb/#comments</comments>
		<pubDate>Wed, 12 Dec 2007 01:01:51 +0000</pubDate>
		<dc:creator>davr</dc:creator>
				<category><![CDATA[AVR]]></category>
		<category><![CDATA[Hardware]]></category>

		<guid isPermaLink="false">http://blog.davr.org/2007/12/11/designing-my-first-pcb/</guid>
		<description><![CDATA[So I built a pretty good prototype of my LED matrix, AVR-based toy (as you can see in my previous post, as well as this video). Now I&#8217;ve decided to get a PCB made, using mostly surface mount components, which will make it nice and compact. You can see to the right a 3D render [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://davr.org/elec/game.png" width="261" height="364" align=right>So I built a pretty good prototype of my LED matrix, AVR-based toy (as you can see in <a href="http://blog.davr.org/2007/09/24/avr-project-update/">my previous post</a>, as well as <a href="http://video.google.com/videoplay?docid=6768941331049278383">this video</a>). Now I&#8217;ve decided to get a PCB made, using mostly surface mount components, which will make it nice and compact. You can see to the right a 3D render of approximately what it will look like, right now <a href="http://olimex.com">a company in Bulgaria</a> is fabricating my PCB, hopefully I&#8217;ll get it within another week or two.</p>
<p>Whether or not it actually will work once I get it &#038; assemble it, remains to be seen. </p>
<p>I used <a href="http://cadsoft.de/">cadsoft&#8217;s Eagle</a> tool to design the PCB, and I used <a href="http://www.matwei.de/doku.php?id=en:eagle3d:eagle3d">this plugin</a> along with povray in order to create the 3d render. Also I sort of edited in the image of the LED matrix&#8230;since they didn&#8217;t already have a 3d part built for it. But it looks reasonable enough I think.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.davr.org/2007/12/11/designing-my-first-pcb/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>AVR Project update</title>
		<link>http://blog.davr.org/2007/09/24/avr-project-update/</link>
		<comments>http://blog.davr.org/2007/09/24/avr-project-update/#comments</comments>
		<pubDate>Mon, 24 Sep 2007 15:48:10 +0000</pubDate>
		<dc:creator>davr</dc:creator>
				<category><![CDATA[AVR]]></category>
		<category><![CDATA[Hardware]]></category>

		<guid isPermaLink="false">http://blog.davr.org/2007/09/24/avr-project-update/</guid>
		<description><![CDATA[I&#8217;ve had a little time to come back to working on my AVR ATMega-based project. First of all, I replaced a bunch of free wires with a ribbon cable, which makes things a lot easier to handle. I&#8217;ve also wired up the buttons, so now I can write little programs which can be controlled by [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://picasaweb.google.com/drorex/AVR/photo#5113568030717897954"><img src="http://lh6.google.com/drorex/RvcLB_W77OI/AAAAAAAAAEs/8zuV0EZ6PGg/s288/p1040816.jpg" align="right" border=1/></a>I&#8217;ve had a little time to come back to working on my AVR ATMega-based project. First of all, I replaced a bunch of free wires with a ribbon cable, which makes things a lot easier to handle. I&#8217;ve also wired up the buttons, so now I can write little programs which can be controlled by user input. Right now you can just move the dot around and change its color, next I think I will make a 1 or 2 player pong game.</p>
<p><a href="http://davr.org/avr_mover.avi">Download</a> a short video of it in action (~700KB), or view it here:<br />
<span id="more-71"></span><br />
<embed src="http://www.metacafe.com/fplayer/844162/avr_plus_led_matrix.swf" width="400" height="345" wmode="transparent" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash"> </embed><br /><font size = 1><a href="http://www.metacafe.com/watch/844162/avr_plus_led_matrix/">AVR Plus LED Matrix</a></p>
<p><b><font color="red">UPDATE:</font></b> I&#8217;ve got Pong running on it now. Check out the video:<br />
<embed style="width:400px; height:326px;" id="VideoPlayback" type="application/x-shockwave-flash" src="http://video.google.com/googleplayer.swf?docId=-4286965732985045793&#038;hl=en" flashvars=""> </embed></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.davr.org/2007/09/24/avr-project-update/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Schematics</title>
		<link>http://blog.davr.org/2006/03/29/schematics/</link>
		<comments>http://blog.davr.org/2006/03/29/schematics/#comments</comments>
		<pubDate>Wed, 29 Mar 2006 08:26:48 +0000</pubDate>
		<dc:creator>davr</dc:creator>
				<category><![CDATA[AVR]]></category>

		<guid isPermaLink="false">http://blog.davr.org/2006/03/29/schematics/</guid>
		<description><![CDATA[Here I am posting the schematic of the current design, and my proposed schematic for design revision 2. The main changes are:

Directly drive the ROW inputs with transistors, instead of using shift register. I have enough I/O pins that there is no need for a shift register here, and the transistors will allow a decent [...]]]></description>
			<content:encoded><![CDATA[<p>Here I am posting the schematic of the current design, and my proposed schematic for design revision 2. The main changes are:</p>
<ul>
<li>Directly drive the ROW inputs with transistors, instead of using shift register. I have enough I/O pins that there is no need for a shift register here, and the transistors will allow a decent amount of current through.</li>
<li>Limit the current coming out of the COLUMNS with resistors. This is needed now that there will be more current flowing through. Before I got away without them, probably because each row was being driven by a single output pin of the shift registers</li>
<li>Use shift registers on columns as before, but this time with a latch, so you wont see the data being shifted in. Thus the &#8216;off&#8217; LEDs will really be off, instead of the faint flicker/glow</li>
</ul>
<table cellspacing="5" cellpadding="5">
<tr>
<td align="center"><a href="http://davr.org/elec/schem1.png"><img width="223" height="194" border="1" alt="Schematic Rev. 1" src="http://davr.org/elec/schem1T.png" /><br />
Schematic Rev. 1</a><br />
(What I currently have built)</td>
<td align="center"><a href="http://davr.org/elec/schem2.png"><img width="242" height="201" border="1" alt="Schematic Rev. 2" src="http://davr.org/elec/schem2T.png" /><br />
Schematic Rev. 2</a><br />
(What I am planning to change next time)</td>
</tr>
</table>
]]></content:encoded>
			<wfw:commentRss>http://blog.davr.org/2006/03/29/schematics/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ported to C</title>
		<link>http://blog.davr.org/2006/03/19/ported-to-c/</link>
		<comments>http://blog.davr.org/2006/03/19/ported-to-c/#comments</comments>
		<pubDate>Sun, 19 Mar 2006 22:35:44 +0000</pubDate>
		<dc:creator>davr</dc:creator>
				<category><![CDATA[AVR]]></category>

		<guid isPermaLink="false">http://blog.davr.org/2006/03/19/ported-to-c/</guid>
		<description><![CDATA[I ported the code to C. Now it is easier for me to work with.
This makes it easy to scale things, so now I have 10 boucing lights instead of one:

bounce3.mpg &#8211; 3MB
I&#8217;m no ASM master, so I could probably be doing it the hard way, but this code in ASM:

mov tmp1, ballX
lsr tmp1
lsr tmp1
com [...]]]></description>
			<content:encoded><![CDATA[<p>I ported the code to C. Now it is easier for me to work with.</p>
<p>This makes it easy to scale things, so now I have 10 boucing lights instead of one:</p>
<p><a href="http://davr.org/elec/bounce3.mpg"><img alt="Bouncing lights" title="Bouncing lights" src="http://davr.org/elec/bounce3.jpg" /></a></p>
<p><a href="http://davr.org/elec/bounce3.mpg">bounce3.mpg</a> &#8211; 3MB</p>
<p>I&#8217;m no ASM master, so I could probably be doing it the hard way, but this code in ASM:</p>
<p><span id="more-10"></span></p>
<pre><code>mov tmp1, ballX
lsr tmp1
lsr tmp1
com tmp1
andi tmp1, 0b00000001
mov tmp2, ballY
lsl tmp2 ; multiply by 2
add tmp1, tmp2
ldi tmp2, 0x60
add tmp1, tmp2
ldi yh, 0x00
mov yl, tmp1 ; Y now points at loc in VRAM

mov tmp1, ballX
andi tmp1, 0b00000011
lsl tmp1
ldi tmp2, 1
cpi tmp1, 0
brne shiftit
rjmp shiftdone

shiftit:
lsl tmp2
dec tmp1
brne shiftit

shiftdone:

ld tmp1, y
or tmp2, tmp1
st y, tmp2</code></pre>
<p>Translates to this code in C:</p>
<p>VRAM[ballY] &#038;= ~(1 << (ballX*2));</p>
<p>As you can see, it&#8217;s a bit simpler now.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.davr.org/2006/03/19/ported-to-c/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
<enclosure url="http://davr.org/elec/bounce3.mpg" length="3158316" type="video/mpeg" />
		</item>
		<item>
		<title>Bouncy</title>
		<link>http://blog.davr.org/2006/03/15/bouncy/</link>
		<comments>http://blog.davr.org/2006/03/15/bouncy/#comments</comments>
		<pubDate>Wed, 15 Mar 2006 18:55:52 +0000</pubDate>
		<dc:creator>davr</dc:creator>
				<category><![CDATA[AVR]]></category>

		<guid isPermaLink="false">http://blog.davr.org/2006/03/15/bouncy/</guid>
		<description><![CDATA[I finally got the code worked out for bouncing a little ball around. Here&#8217;s a short movie:

bounce.avi &#8211; 200KB
 MPG1 format &#8211; 1.1MB
I think next, I am going to rewrite all this code in C. The ASM is getting too complex for me to manage efficiently, I spend too much time tracking down ASM bugs [...]]]></description>
			<content:encoded><![CDATA[<p>I finally got the code worked out for bouncing a little ball around. Here&#8217;s a short movie:<br />
<a href="http://davr.org/elec/bounce.avi"><img alt="A single bouncing LED" src="http://davr.org/elec/bounce.jpg" /><br />
bounce.avi</a> &#8211; 200KB<br />
<a href="http://davr.org/elec/bounce.mpg"> MPG1 format</a> &#8211; 1.1MB<br />
I think next, I am going to rewrite all this code in C. The ASM is getting too complex for me to manage efficiently, I spend too much time tracking down ASM bugs versus actually writing code.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.davr.org/2006/03/15/bouncy/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
<enclosure url="http://davr.org/elec/bounce.avi" length="202094" type="video/x-msvideo" />
<enclosure url="http://davr.org/elec/bounce.mpg" length="1031856" type="video/mpeg" />
		</item>
		<item>
		<title>Smiley</title>
		<link>http://blog.davr.org/2006/03/15/smiley/</link>
		<comments>http://blog.davr.org/2006/03/15/smiley/#comments</comments>
		<pubDate>Wed, 15 Mar 2006 17:38:02 +0000</pubDate>
		<dc:creator>davr</dc:creator>
				<category><![CDATA[AVR]]></category>

		<guid isPermaLink="false">http://blog.davr.org/2006/03/15/smiley/</guid>
		<description><![CDATA[I hardcoded this pattern to load into SRAM on bootup:

]]></description>
			<content:encoded><![CDATA[<p>I hardcoded this pattern to load into SRAM on bootup:</p>
<p><img alt="Smiley face" title="Smiley face" src="http://davr.org/elec/smily.jpg" /></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.davr.org/2006/03/15/smiley/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Patterns</title>
		<link>http://blog.davr.org/2006/03/14/patterns/</link>
		<comments>http://blog.davr.org/2006/03/14/patterns/#comments</comments>
		<pubDate>Wed, 15 Mar 2006 07:08:50 +0000</pubDate>
		<dc:creator>davr</dc:creator>
				<category><![CDATA[AVR]]></category>

		<guid isPermaLink="false">http://blog.davr.org/2006/03/14/patterns/</guid>
		<description><![CDATA[Ok, now I&#8217;ve written the code to display patterns from RAM, but I haven&#8217;t written the code to actually update those patterns. So I&#8217;m not sure exactly where this pattern is coming from. But it&#8217;s slightly more interesting looking now:

Still the same problem with the &#8216;off&#8217; leds lighting up slightly, but I think it&#8217;s not [...]]]></description>
			<content:encoded><![CDATA[<p>Ok, now I&#8217;ve written the code to display patterns from RAM, but I haven&#8217;t written the code to actually update those patterns. So I&#8217;m not sure exactly where this pattern is coming from. But it&#8217;s slightly more interesting looking now:</p>
<p><img title="Color patterns" alt="Color patterns" src="http://davr.org/elec/color2.jpg" /></p>
<p>Still the same problem with the &#8216;off&#8217; leds lighting up slightly, but I think it&#8217;s not too bad for now. Next up, I think I&#8217;ll animate a simple 1-pixel &#8216;ball&#8217; bouncing around or something.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.davr.org/2006/03/14/patterns/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Unlatched color</title>
		<link>http://blog.davr.org/2006/03/13/unlatched-color/</link>
		<comments>http://blog.davr.org/2006/03/13/unlatched-color/#comments</comments>
		<pubDate>Tue, 14 Mar 2006 07:29:33 +0000</pubDate>
		<dc:creator>davr</dc:creator>
				<category><![CDATA[AVR]]></category>

		<guid isPermaLink="false">http://blog.davr.org/2006/03/13/unlatched-color/</guid>
		<description><![CDATA[March 13th:
Here it is you can see the different colors possible:

One problem, is I am using shift registers without a latch. So as the data is shifted into place, it appears on the incorrect LEDs for a very short amount of time. Which causes them to light up a short amount of time. I&#8217;m not [...]]]></description>
			<content:encoded><![CDATA[<p>March 13th:<br />
Here it is you can see the different colors possible:<br />
<img alt="An 8x8 grid of off, red, green, and orange LEDs" src="http://davr.org/elec/color.jpg" /><br />
One problem, is I am using shift registers without a latch. So as the data is shifted into place, it appears on the incorrect LEDs for a very short amount of time. Which causes them to light up a short amount of time. I&#8217;m not sure there is anything I can do about this, besides shifting the data into place faster: currently my AVR is clocked at 8mhz, but it supports up to 16mhz (I just need to put in a different crystal). I think best solution is to use a latch though.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.davr.org/2006/03/13/unlatched-color/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
