<?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>Stephen&#039;s Weblog &#187; Projects</title>
	<atom:link href="http://blog.akkit.org/category/projects/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.akkit.org</link>
	<description>Everything is hackable</description>
	<lastBuildDate>Sun, 25 Jul 2010 07:03:33 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Project: PCI Card</title>
		<link>http://blog.akkit.org/2010/06/13/project-pci-card/</link>
		<comments>http://blog.akkit.org/2010/06/13/project-pci-card/#comments</comments>
		<pubDate>Sun, 13 Jun 2010 07:00:56 +0000</pubDate>
		<dc:creator>Stephen</dc:creator>
				<category><![CDATA[Electronics]]></category>
		<category><![CDATA[Projects]]></category>

		<guid isPermaLink="false">http://blog.akkit.org/?p=213</guid>
		<description><![CDATA[Another week has gone by already? Well, I do at least have something to show for it. So the thing I spent the most spare time on this last week has been designing a FPGA-based PCI card. This is something I&#8217;ve wanted to do for some time now (and have an earlier unfinished attempt that [...]]]></description>
			<content:encoded><![CDATA[<p>Another week has gone by already? Well, I do at least have something to show for it.</p>
<p>So the thing I spent the most spare time on this last week has been designing a FPGA-based PCI card. This is something I&#8217;ve wanted to do for some time now (and have an earlier unfinished attempt that was far more complex), but I have recently encountered some inspiration for a board that will be somewhat useful, or at least interesting.</p>
<p>This board isn&#8217;t really much of anything special, but it will fill a specific niche, and will be sufficient to try out a lot of interesting things I&#8217;ve been thinking of in the PCI space.</p>
<p>So, This isn&#8217;t going to be an exceptionally impressive post, but I did collect screenshots from various stages of the board&#8217;s development, and  I&#8217;ll also discuss the design decisions behind this board.</p>
<p><span id="more-213"></span></p>
<p>On with the screenshots!</p>
<p><a href="http://blog.akkit.org/wp-content/uploads/2010/06/pcipost_wip1.png"><img class="alignnone size-medium wp-image-214" title="pcipost_wip1" src="http://blog.akkit.org/wp-content/uploads/2010/06/pcipost_wip1-300x185.png" alt="" width="300" height="185" /></a></p>
<p>(Just getting started, have finished the core of the schematic, have all the power and parts set up)</p>
<p><a href="http://blog.akkit.org/wp-content/uploads/2010/06/pcipost_wip2.png"><img class="alignnone size-medium wp-image-215" title="pcipost_wip2" src="http://blog.akkit.org/wp-content/uploads/2010/06/pcipost_wip2-300x191.png" alt="" width="300" height="191" /></a></p>
<p>(After working out the pin mappings from FPGA to PCI card, adding some PCI-related capacitors)</p>
<p><a href="http://blog.akkit.org/wp-content/uploads/2010/06/pcipost_wip3.png"><img class="alignnone size-medium wp-image-216" title="pcipost_wip3" src="http://blog.akkit.org/wp-content/uploads/2010/06/pcipost_wip3-300x186.png" alt="" width="300" height="186" /></a></p>
<p>(Fixed the PCI &#8211; fpga mappings slightly and started routing. This is a few hours of progress, but it takes a lot of effort&#8230;)</p>
<p><a href="http://blog.akkit.org/wp-content/uploads/2010/06/pcipost_wip4.png"><img class="alignnone size-medium wp-image-217" title="pcipost_wip4" src="http://blog.akkit.org/wp-content/uploads/2010/06/pcipost_wip4-300x188.png" alt="" width="300" height="188" /></a></p>
<p>(Continuing to route PCI-FPGA traces)</p>
<p><a href="http://blog.akkit.org/wp-content/uploads/2010/06/pcipost_wip5.png"><img class="alignnone size-medium wp-image-218" title="pcipost_wip5" src="http://blog.akkit.org/wp-content/uploads/2010/06/pcipost_wip5-300x183.png" alt="" width="300" height="183" /></a></p>
<p>(Ah. Done with that. A few things move around to pack better)</p>
<p><a href="http://blog.akkit.org/wp-content/uploads/2010/06/pcipost_wip6.png"><img class="alignnone size-medium wp-image-219" title="pcipost_wip6" src="http://blog.akkit.org/wp-content/uploads/2010/06/pcipost_wip6-300x161.png" alt="" width="300" height="161" /></a></p>
<p>(A lot of other stuff gets routed! It&#8217;s not as hard as the PCI stuff :)</p>
<p><a href="http://blog.akkit.org/wp-content/uploads/2010/06/pcipost_wip7.png"><img class="alignnone size-medium wp-image-221" title="pcipost_wip7" src="http://blog.akkit.org/wp-content/uploads/2010/06/pcipost_wip7-300x155.png" alt="" width="300" height="155" /></a></p>
<p>And the final part done: Routing the power pins on the FPGA. (And a few pesky remaining traces due to an error)</p>
<p>The signals on the board are now 100% routed, but the board is still not complete, I have a number of cosmetic things to do still, moving component text around and adding some descriptive text. Also planning to add ground fills to unused board space.</p>
<p>So, some of you may have guessed my inspiration for this board, it&#8217;s pretty similar to those &#8220;BIOS POST code display&#8221; boards &#8211; Yup, and that is one of the intended uses of this board, but by no means all it can do. This board has been designed so it can also easily work as a standalone development board for general purpose FPGA experimentation, and it is also my intention to build a full PCI Device using this board as well. Of course it&#8217;s not going to do much with this board alone, but the I/O header should allow for some interesting external devices if I want to try anything specific.</p>
<p>Some more specific details of the design:</p>
<ul>
<li>The PCB is routed with 8 mil traces (and 8 mil spacing) &#8211; this makes it pretty challenging to route, but it was fun.</li>
<li>If operating only as a PCI card, it would be possible to remove several components (the power supply stuff and clock  on the right side of the board), without affecting anything</li>
<li>The FPGA in this case is a Spartan-3AN (XC3S50AN &#8211; not incredibly big but will work here) &#8211; the 3AN series, as opposed to most other Spartan-3 FPGAs, have onboard flash memory to store configuration data (otherwise an external chip would be needed to configure from, eating up more I/O pins)</li>
<li>There are 4 I/O pushbutton switches, and an 8-switch dipswitch</li>
<li>The PRSNT1# and PRSNT2# lines on the PCI connector are used to indicate to the system board whether or not a PCI card is present in a given slot. This board has solder-bridge jumpers potentially connecting those to ground (to indicate presence); In the case of a BIOS POST card we don&#8217;t actually want to indicate to the system that there is a board present, as we can get what we want without being a &#8220;full&#8221; pci device. But bridging those jumpers will also allow a full PCI device to be designed.</li>
<li>The PCI connector has been routed by flipping back-side signals to the top side, and trying to align the PCI signals to the FPGA pins before even starting that; On the back side, I have a thick 3.3V trace running along the length of the connector, and a GND trace above that, which makes it relatively easy to keep all the power lines connected properly. This is the fourth or so revision of my process for doing this, and it&#8217;s pretty effective &#8211; but I noticed yet another optimization&#8230; If I also were to match up the FPGA 3.3V pins with the front-side PCI 3.3V pins, it would further reduce the complexity of routing the connector, and I&#8217;d get better connected power pins as well &#8211; Something to consider for next time, the time that goes into planning and routing the PCI connector to a FPGA is pretty significant.</li>
</ul>
<p>I am planning to finish up the design work and get some of these boards produced in the next few days &#8211; and when I get them back and get some stuff working on them, I&#8217;ll post again on how it went, how PCI works, and other sorts of interesting things :)</p>
<p>Update: After a little bit more effort, I have deemed the board &#8220;complete&#8221;. Now working on getting it fabricated&#8230;</p>
<p><a href="http://blog.akkit.org/wp-content/uploads/2010/06/pcipost_rev1.png"><img class="alignnone size-medium wp-image-227" title="pcipost_rev1" src="http://blog.akkit.org/wp-content/uploads/2010/06/pcipost_rev1-300x151.png" alt="" width="300" height="151" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.akkit.org/2010/06/13/project-pci-card/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Project: AVR USB Stick</title>
		<link>http://blog.akkit.org/2010/06/06/project-avr-usb-stick/</link>
		<comments>http://blog.akkit.org/2010/06/06/project-avr-usb-stick/#comments</comments>
		<pubDate>Sun, 06 Jun 2010 07:00:30 +0000</pubDate>
		<dc:creator>Stephen</dc:creator>
				<category><![CDATA[Electronics]]></category>
		<category><![CDATA[Projects]]></category>

		<guid isPermaLink="false">http://blog.akkit.org/?p=202</guid>
		<description><![CDATA[Hi again, As promised, this week&#8217;s project entry is much less entertaining; I did attempt to get this project a bit further today but distractions have taken their toll. Expect this one to come up again in the future :) So, not too long ago I had the bright idea to build a little USB [...]]]></description>
			<content:encoded><![CDATA[<p>Hi again,</p>
<p><a href="http://blog.akkit.org/2010/05/30/project-chip-decapping/">As promised</a>, this week&#8217;s project entry is much less entertaining;</p>
<p>I did attempt to get this project a bit further today but distractions have taken their toll. Expect this one to come up again in the future :)</p>
<p>So, not too long ago I had the bright idea to build a little USB stick; My motives at the time were apparently highly questionable, so I am here about a month later with a fairly limited use USB stick</p>
<p>One of my major goals behind this project was to have an excuse to work out the details of USB, and try some stuff out, which I&#8217;m still doing now. Once I get that done with, I will attempt to explain just how all that works; USB is a bit elaborate, but it&#8217;s increasingly interesting and important these days, as serial and parallel ports are becoming more rare. I have another project along these lines too, but it&#8217;s quite a bit more low-level.</p>
<p>For this post though, I&#8217;m just talking about the hardware design of this project. <span id="more-202"></span></p>
<p>The board was really quickly designed; I thought (for some reason) that it would be neat to have a little USB stick that had an RGB LED, and a speaker to output audio. So, that&#8217;s what I made :)</p>
<p>This stick is based around a <a href="http://www.atmel.com/dyn/products/product_card_v2.asp?part_id=4602">Atmel ATMega32U2 microcontroller</a>, which has  built-in USB device support. It requires a pretty stable clock source in order to use USB, so I picked an 8MHz crystal for it. I found a <a href="http://search.digikey.com/scripts/DkSearch/dksus.dll?Detail&amp;name=475-2855-1-ND">reasonably cheap RGB LED</a> on digikey, and added some passives, an op amp, and a tiny speaker I had around for sound.</p>
<p><a href="http://blog.akkit.org/wp-content/uploads/2010/06/usb_play1.png"><img class="alignnone size-medium wp-image-203" title="usb_play1" src="http://blog.akkit.org/wp-content/uploads/2010/06/usb_play1-300x124.png" alt="" width="300" height="124" /></a></p>
<p>PCB design for the board (It looks confusing because I&#8217;ve included a lot of layers, but you don&#8217;t usually work with all of those layers on, you can just look at the front/back individually)</p>
<p><a href="http://blog.akkit.org/wp-content/uploads/2010/06/usb_playbrd1.jpg"><img class="alignnone size-medium wp-image-204" title="usb_playbrd1" src="http://blog.akkit.org/wp-content/uploads/2010/06/usb_playbrd1-300x105.jpg" alt="" width="300" height="105" /></a></p>
<p><a href="http://blog.akkit.org/wp-content/uploads/2010/06/usb_playbrd2.jpg"><img class="alignnone size-medium wp-image-205" title="usb_playbrd2" src="http://blog.akkit.org/wp-content/uploads/2010/06/usb_playbrd2-300x98.jpg" alt="" width="300" height="98" /></a></p>
<p>And, actual implementation of the board!</p>
<p>I&#8217;m sure you can see the mistakes in this one, but probably not quite all of them. Things to check for next time I make a really rushed design:</p>
<ul>
<li>Make sure TFQFP package reflects reality. Not sure how but my pads start at the very tip of the pins :) I must have been looking at the wrong package type for spacing info.</li>
<li>Enhance font size on 0402 components (see the 2 tiny capacitors by the crystal? They&#8217;re C1 and C2 in the PCB design image.)</li>
<li>Make sure crystal doesn&#8217;t overlap other components (fortunately the crystal body isn&#8217;t connected to anything, so it can be near / short against USB V+ without issue.)</li>
<li>Pay closer attention to drill sizes. USB header shield doesn&#8217;t actually fit through the holes I designed it for. I have a caliper so these sorts of mistakes are just silly :)</li>
</ul>
<p>Some other miscellaneous design notes</p>
<ul>
<li>This AVR has a 3 PWM channels based on one 16bit timer &#8211; this is being used for the RGB LED</li>
<li>The audio output is a PWM channel on another 8bit timer &#8211; it&#8217;s feeding through a resistor into a cap, which produces a pretty stable voltage level based on the PWM duty cycle. Then the opamp is buffering that voltage level and outputting it to the speaker. It should be able to do 8bit audio with good quality, though it&#8217;s certainly not a perfect DAC.</li>
</ul>
<p>So, not bad for a few hours of looking for parts and hacking some weekend, I&#8217;m not actually sure if the utter lack of any serious purpose makes this a good or bad project :)</p>
<p>Anyway, I&#8217;m off now, as I have some other project ideas calling me now&#8230;  Perhaps this motivation drought has ended.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.akkit.org/2010/06/06/project-avr-usb-stick/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Project: Chip decapping</title>
		<link>http://blog.akkit.org/2010/05/30/project-chip-decapping/</link>
		<comments>http://blog.akkit.org/2010/05/30/project-chip-decapping/#comments</comments>
		<pubDate>Sun, 30 May 2010 07:00:08 +0000</pubDate>
		<dc:creator>Stephen</dc:creator>
				<category><![CDATA[Electronics]]></category>
		<category><![CDATA[Hardware Hacking]]></category>
		<category><![CDATA[Projects]]></category>

		<guid isPermaLink="false">http://blog.akkit.org/?p=167</guid>
		<description><![CDATA[3 blog posts already, amazing &#8211; though very shortly I may have to start talking about far less interesting projects, or post less frequently. This is starting to take quite a bit of time, and I&#8217;m running out of interesting things I&#8217;ve been doing. :) So, recently I&#8217;ve started looking into ASIC design &#8211; it&#8217;s [...]]]></description>
			<content:encoded><![CDATA[<p>3 blog posts already, amazing &#8211; though very shortly I may have to start talking about far less interesting projects, or post less frequently. This is starting to take quite a bit of time, and I&#8217;m running out of interesting things I&#8217;ve been doing. :)<br />
So, recently I&#8217;ve started looking into ASIC design &#8211; it&#8217;s will still be quite a long time before I can practically start thinking about trying to design my own chip, however, in the meantime some chip reverse engineering has attracted my attention.<br />
Now, I mostly operate from a home-lab environment, and it&#8217;s not really safe to involve things like&#8230; high concentrations of Nitric acid. But, having recently acquired a decent cheap USB microscope (the <a href="http://www.amazon.com/gp/product/B0025U0L8Y?ie=UTF8&amp;tag=stepswebl-20&amp;linkCode=as2&amp;camp=1789&amp;creative=390957&amp;creativeASIN=B0025U0L8Y">Veho VMS004DELUXE USB Powered Microscope</a><img style="border: none !important; margin: 0px !important;" src="http://www.assoc-amazon.com/e/ir?t=stepswebl-20&amp;l=as2&amp;o=1&amp;a=B0025U0L8Y" border="0" alt="" width="1" height="1" />), I decided to give chip disassembly a shot for the amusement value. Given my lack of professional tools this has little potential to be really educational, but it was pretty interesting. This is a pretty picture-heavy post,  if that wasn&#8217;t clear enough already&#8230;<span id="more-167"></span></p>
<p>I went and found a few chips I had around, and got some sandpaper; For this test I just used 220, 600, 1500, and 2500 grit sandpaper; I had a few others around but these worked pretty well. The microscope is pretty nice, and has essentially two zoom settings, at around 20x and around 400x (or so is claimed). As such, a lot of the &#8220;chip-size&#8221; images are taken at the 20x level, and then I have zoomed in to the 400x level, taken sets of images, and stitched them together for full die images. Die images were stitched together using <a href="http://research.microsoft.com/en-us/um/redmond/groups/ivm/ice/">Microsoft ICE</a>, a free tool that does stuff like that, it has worked pretty well for me here.</p>
<p><a href="http://blog.akkit.org/wp-content/uploads/2010/05/setup.jpg"><img class="alignnone size-medium wp-image-168" title="setup" src="http://blog.akkit.org/wp-content/uploads/2010/05/setup-300x129.jpg" alt="" width="300" height="129" /></a></p>
<p>The first of the chips was some chip I had desoldered from a board I had around a very long time ago; I had no idea what it was, but it appears to be a <a href="http://www.onsemi.com/PowerSolutions/product.do?id=MC34072">MC34072 dual op-amp</a></p>
<p><a href="http://blog.akkit.org/wp-content/uploads/2010/05/c1.jpg"><img class="alignnone size-medium wp-image-144" title="c1" src="http://blog.akkit.org/wp-content/uploads/2010/05/c1-300x225.jpg" alt="" width="300" height="225" /></a></p>
<p>On with the sandpaper; It takes a bit of time to sand down to the die layer, so patience is important here.</p>
<p><a href="http://blog.akkit.org/wp-content/uploads/2010/05/c2.jpg"><img class="alignnone size-medium wp-image-145" title="c2" src="http://blog.akkit.org/wp-content/uploads/2010/05/c2-300x225.jpg" alt="" width="240" height="180" /></a><a href="http://blog.akkit.org/wp-content/uploads/2010/05/c3.jpg"><img class="alignnone size-medium wp-image-146" title="c3" src="http://blog.akkit.org/wp-content/uploads/2010/05/c3-300x225.jpg" alt="" width="240" height="180" /></a></p>
<p>I didn&#8217;t see any of the bond wires in this chip, possibly because I wasn&#8217;t sure what to be looking for. They aren&#8217;t obvious in these pictures either, I&#8217;m not sure why. After much sanding  though I could see the die</p>
<p><a href="http://blog.akkit.org/wp-content/uploads/2010/05/c4.jpg"><img class="alignnone size-medium wp-image-147" title="c4" src="http://blog.akkit.org/wp-content/uploads/2010/05/c4-300x225.jpg" alt="" width="300" height="225" /></a></p>
<p>I took a full set of images at the higher magnification level at this point, though it&#8217;s pretty clear the chip packaging material is still covering a lot of the die. (this is a big image! click to zoom in!). The die is upside-down in the chip orientation I chose, so I&#8217;ve rotated the die images.</p>
<p><a href="http://blog.akkit.org/wp-content/uploads/2010/05/die1_stitch.jpg"><img class="alignnone size-medium wp-image-149" title="die1_stitch" src="http://blog.akkit.org/wp-content/uploads/2010/05/die1_stitch-300x281.jpg" alt="" width="300" height="281" /></a></p>
<p>That&#8217;s pretty neat, though I&#8217;ve taken a little bit of the corner of the die off already. I spent a bit more time sanding with high grit (1500) to try to clean up the rest of the die- and while I lost some of the corners I&#8217;ve made the rest of the die a lot more visible.</p>
<p><a href="http://blog.akkit.org/wp-content/uploads/2010/05/c5.jpg"><img class="alignnone size-medium wp-image-148" title="c5" src="http://blog.akkit.org/wp-content/uploads/2010/05/c5-300x240.jpg" alt="" width="240" height="192" /></a><a href="http://blog.akkit.org/wp-content/uploads/2010/05/die1_stitch4.jpg"><img class="alignnone size-medium wp-image-150" title="die1_stitch4" src="http://blog.akkit.org/wp-content/uploads/2010/05/die1_stitch4-300x282.jpg" alt="" width="240" height="226" /></a></p>
<p>That one is pretty easy to follow, it&#8217;s a very big process as it was designed apparently a long time ago (I wonder if the &#8220;72&#8243; is the year the design was created). Unfortunately none of the other chips in this set are quite so nice :)</p>
<p>Also, even though you can very clearly see the metal traces in this die, what you don&#8217;t really see are the doped regions of the silicon underneath, so it&#8217;s difficult at best to infer the transistors being used. In some regions it&#8217;s possible to tell that something is different underneath (see some areas where the blue changes to dark gray), but I&#8217;m not sure what to infer from that (possibly that is material being used for resistors).</p>
<p>The next chip I set out to decap is one of my favorites, the <a href="http://www.xilinx.com/support/documentation/data_sheets/ds057.pdf">Xilinx XC9572XL CPLD</a>:</p>
<p><a href="http://blog.akkit.org/wp-content/uploads/2010/05/x1.jpg"><img class="alignnone size-medium wp-image-157" title="x1" src="http://blog.akkit.org/wp-content/uploads/2010/05/x1-300x240.jpg" alt="" width="240" height="192" /></a><a href="http://blog.akkit.org/wp-content/uploads/2010/05/x2.jpg"><img class="alignnone size-medium wp-image-158" title="x2" src="http://blog.akkit.org/wp-content/uploads/2010/05/x2-300x240.jpg" alt="" width="240" height="192" /></a></p>
<p>Bond wires! They actually serve as a reasonably good guide to know how well you are aligned with the die, and what areas you need to sand further so the die is more parallel to your sanded surface.</p>
<p><a href="http://blog.akkit.org/wp-content/uploads/2010/05/x3.jpg"><img class="alignnone size-medium wp-image-159" title="x3" src="http://blog.akkit.org/wp-content/uploads/2010/05/x3-300x240.jpg" alt="" width="240" height="192" /></a><a href="http://blog.akkit.org/wp-content/uploads/2010/05/x4.jpg"><img class="alignnone size-medium wp-image-160" title="x4" src="http://blog.akkit.org/wp-content/uploads/2010/05/x4-300x240.jpg" alt="" width="240" height="192" /></a></p>
<p>You can see that my alignment has improved but isn&#8217;t perfect yet; Also at this point I took a closer look at the bond wires (at 400x)</p>
<p><a href="http://blog.akkit.org/wp-content/uploads/2010/05/x5.jpg"><img class="alignnone size-medium wp-image-161" title="x5" src="http://blog.akkit.org/wp-content/uploads/2010/05/x5-300x240.jpg" alt="" width="300" height="240" /></a></p>
<p>Can&#8217;t see the die at all yet, just the bond wires and packaging material. Continuing to sand&#8230;</p>
<p><a href="http://blog.akkit.org/wp-content/uploads/2010/05/x6.jpg"><img class="alignnone size-medium wp-image-162" title="x6" src="http://blog.akkit.org/wp-content/uploads/2010/05/x6-300x240.jpg" alt="" width="240" height="192" /></a><a href="http://blog.akkit.org/wp-content/uploads/2010/05/x7.jpg"><img class="alignnone size-medium wp-image-163" title="x7" src="http://blog.akkit.org/wp-content/uploads/2010/05/x7-300x240.jpg" alt="" width="240" height="192" /></a></p>
<p>Getting closer and starting to see the die&#8230;</p>
<p><a href="http://blog.akkit.org/wp-content/uploads/2010/05/x8.jpg"><img class="alignnone size-medium wp-image-164" title="x8" src="http://blog.akkit.org/wp-content/uploads/2010/05/x8-300x240.jpg" alt="" width="240" height="192" /></a><a href="http://blog.akkit.org/wp-content/uploads/2010/05/x9.jpg"><img class="alignnone size-medium wp-image-165" title="x9" src="http://blog.akkit.org/wp-content/uploads/2010/05/x9-300x240.jpg" alt="" width="240" height="192" /></a></p>
<p>And finally breaking through the filler material to exposing the actual die surface! I then sanded a bit further with really high grit and took a few sets of images for the full die image. Ultimately I wound up using a slightly rotated orientation for taking pictures of this die, as I noticed the LED illumination at that angle made it easier to see many of the details. This method is far from perfect though &#8211; there&#8217;s still a lot of filler on the die which is only partly transparent, but I didn&#8217;t want to sand the edges away (also, too lazy now.).</p>
<p><a href="http://blog.akkit.org/wp-content/uploads/2010/05/x10.jpg"><img class="alignnone size-medium wp-image-166" title="x10" src="http://blog.akkit.org/wp-content/uploads/2010/05/x10-300x240.jpg" alt="" width="300" height="240" /></a><a href="http://blog.akkit.org/wp-content/uploads/2010/05/die2_stitch2.jpg"><img class="alignnone size-medium wp-image-175" title="die2_stitch2b" src="http://blog.akkit.org/wp-content/uploads/2010/05/die2_stitch2b-203x300.jpg" alt="" width="162" height="240" /></a></p>
<p>Partly due to the microscope&#8217;s cheap optics and camera, and also due to the material remaining on the die, it&#8217;s very hard to discern details at this level, but you can see the larger elements in use and how they are generally connected together.</p>
<p>And now a very cheap AVR Chip I had around, this is an <a href="http://www.atmel.com/dyn/products/product_card_v2.asp?PN=ATtiny48">ATTiny48</a>:</p>
<p><a href="http://blog.akkit.org/wp-content/uploads/2010/05/avr1.jpg"><img class="alignnone size-medium wp-image-138" title="avr1" src="http://blog.akkit.org/wp-content/uploads/2010/05/avr1-300x240.jpg" alt="" width="240" height="192" /></a><a href="http://blog.akkit.org/wp-content/uploads/2010/05/avr2.jpg"><img class="alignnone size-medium wp-image-139" title="avr2" src="http://blog.akkit.org/wp-content/uploads/2010/05/avr2-300x240.jpg" alt="" width="240" height="192" /></a></p>
<p><a href="http://blog.akkit.org/wp-content/uploads/2010/05/avr3.jpg"><img class="alignnone size-medium wp-image-140" title="avr3" src="http://blog.akkit.org/wp-content/uploads/2010/05/avr3-300x240.jpg" alt="" width="240" height="192" /></a> <a href="http://blog.akkit.org/wp-content/uploads/2010/05/avr4.jpg"><img class="alignnone size-medium wp-image-141" title="avr4" src="http://blog.akkit.org/wp-content/uploads/2010/05/avr4-300x240.jpg" alt="" width="240" height="192" /></a></p>
<p>I got down to the die level without too much trouble, though I exposed one corner a lot earlier than the rest of it. After looking at that one corner closer, I decided it was important to take more of the filler material off</p>
<p><a href="http://blog.akkit.org/wp-content/uploads/2010/05/avr5.jpg"><img class="alignnone size-medium wp-image-142" title="avr5" src="http://blog.akkit.org/wp-content/uploads/2010/05/avr5-300x240.jpg" alt="" width="240" height="192" /></a><a href="http://blog.akkit.org/wp-content/uploads/2010/05/avr6.jpg"><img class="alignnone size-medium wp-image-143" title="avr6" src="http://blog.akkit.org/wp-content/uploads/2010/05/avr6-300x240.jpg" alt="" width="240" height="192" /></a></p>
<p>After taking more material off I do have a much clearer view of the die but  managed to badly mess up the one corner. I did get a (mostly) complete die image &#8211; there&#8217;s a black area I somehow managed to miss :)</p>
<p><a href="http://blog.akkit.org/wp-content/uploads/2010/05/die3_stitch.jpg"><img class="alignnone size-medium wp-image-152" title="die3_stitch" src="http://blog.akkit.org/wp-content/uploads/2010/05/die3_stitch-228x300.jpg" alt="" width="228" height="300" /></a></p>
<p>It&#8217;s a pretty small process, but you can generally identify the regions and their purposes. I&#8217;m not an expert on this stuff yet, but my current assumption is the shiny stuff in the bottom center is flash, the nice structured grid in the upper middle of the chip is sram, and most of the stuff above/around it is the uC logic (But I may be completely incorrect, I can see other possible interpretations.)</p>
<p>That leaves one more chip&#8230; This chip was ill fated in many ways; first it&#8217;s a bit too big for me to be able to move the microscope around above it well &#8211; but I was a bit less than patient with decapping it, and managed to seriously scratch up the die. The die showed up earlier than I thought it would, but I&#8217;ll let the images tell the story:</p>
<p><a href="http://blog.akkit.org/wp-content/uploads/2010/05/intel1.jpg"><img class="alignnone size-medium wp-image-153" title="intel1" src="http://blog.akkit.org/wp-content/uploads/2010/05/intel1-300x240.jpg" alt="" width="240" height="192" /></a><a href="http://blog.akkit.org/wp-content/uploads/2010/05/intel2.jpg"><img class="alignnone size-medium wp-image-154" title="intel2" src="http://blog.akkit.org/wp-content/uploads/2010/05/intel2-300x240.jpg" alt="" width="240" height="192" /></a></p>
<p><a href="http://blog.akkit.org/wp-content/uploads/2010/05/intel3.jpg"><img class="alignnone size-medium wp-image-155" title="intel3" src="http://blog.akkit.org/wp-content/uploads/2010/05/intel3-300x240.jpg" alt="" width="240" height="192" /></a> <a href="http://blog.akkit.org/wp-content/uploads/2010/05/intel4.jpg"><img class="alignnone size-medium wp-image-156" title="intel4" src="http://blog.akkit.org/wp-content/uploads/2010/05/intel4-300x240.jpg" alt="" width="240" height="192" /></a></p>
<p>Oops. I cleaned up the remaining die a bit and tried to get some decent pictures, but this chip is on a much smaller process than the others and I couldn&#8217;t see much of anything that was big enough to see the structure of.</p>
<p>Overall this has been a pretty entertaining project for me. I think I will definitely have to try this using an acid rather than sandpaper some time in the future, and I&#8217;m already looking at better microscopes for when I get more serious with this.</p>
<p>In the meantime though, I hope you&#8217;ve found this as interesting as I have &#8211; thanks for reading!</p>
<p>Tune in next week for&#8230; Something obviously less awesome :)</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.akkit.org/2010/05/30/project-chip-decapping/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Project: 8&#215;8 LED Matrix Controller</title>
		<link>http://blog.akkit.org/2010/05/23/8x8-led-matrix-controller/</link>
		<comments>http://blog.akkit.org/2010/05/23/8x8-led-matrix-controller/#comments</comments>
		<pubDate>Sun, 23 May 2010 06:00:49 +0000</pubDate>
		<dc:creator>Stephen</dc:creator>
				<category><![CDATA[Electronics]]></category>
		<category><![CDATA[Projects]]></category>

		<guid isPermaLink="false">http://blog.akkit.org/?p=113</guid>
		<description><![CDATA[Another week has gone by, and it&#8217;s time for another project! This week&#8217;s project is a little bit more complex than the last one, but it&#8217;s still pretty small. It&#8217;s a small board that drives an 8&#215;8 LED matrix. It&#8217;s actually a pretty silly project because I only have a dozen or so of these [...]]]></description>
			<content:encoded><![CDATA[<p>Another week has gone by, and it&#8217;s time for another project!</p>
<p>This week&#8217;s project is a little bit more complex than the last one, but it&#8217;s still pretty small. It&#8217;s a small board that drives an 8&#215;8 LED matrix. It&#8217;s actually a pretty silly project because I only have a dozen or so of these LED Matrices around (I&#8217;m not sure I can even buy these specific matrices anymore) &#8211; I actually bought them back in 2005 &#8211; they&#8217;re 8&#215;8 arrays of red/green LEDs. They&#8217;re organized with a common anode per row, and then red/green cathodes per column. (<a href="http://blog.davr.org/2006/03/15/smiley/">Davr also got some</a>, and has a number of entries on his blog about his efforts)</p>
<p>Just for fun, I set out to design a board that would sit on the back of the LED matrix and make it easy to drive from a small microcontroller. My design goals were to have current drivers on the common anodes, and provide a shift register to easily configure the other LEDs. I also wanted to be able to easily chain multiple boards together to make a much longer array. (Read on for more details about the design&#8230;)<span id="more-113"></span></p>
<p>So, after measuring the part and setting up a part in eagle for the LED matrix, I set to work on a circuit board.</p>
<p>This part I actually generated a timelapse video of &#8211; you can see it here:  <a href="http://www.youtube.com/watch?v=pB9d3X24IA4">PCB design: An LED Matrix Controller board </a></p>
<p>The video may be a little boring (perhaps I should add music or something), but my process went as follows:</p>
<p>First I had to design an interface, a set of pins that would let me control the board, specifying what to display and how. I settled on a pretty simple design: There is a power and ground pin, 3 pins for selecting one of the 8 rows, and finally a serial interface into a shift register for providing the graphical data. The serial interface consists of SCLK, SDATA, and LATCH &#8211; Upon a rising edge of SCLK, the internal shift register will be advanced as the value of SDATA is pushed in. LATCH serves dual duty; a rising edge of LATCH causes the shift register&#8217;s value to be latched to the display output, and also LATCH serves as an output enable, LEDs only light up when LATCH is high.</p>
<p>Additionally, since I wanted this module to be chainable, I also need a second interface on the other side of the board to attach to a second board &#8211; Most of the signals are the same, but the data signal on the other side has to be an output from the shift register &#8211; just another thing to consider. I used a CPLD (the XC9572XL again!)  to actually do all the intelligent work, and for switching the power to the common anodes, I used some P-FETs which are switched by the CPLD.</p>
<p>After getting the circuit straight, it was a bit of a challenge to actually decide what CPLD pins to use, and how exactly to lay out the board. This is always an interesting problem, and sometimes difficult, but when you keep your priorities straight it is reasonably easy to get past. In my case, power/GND and the Jtag pins dictated how certain parts of my board needed to work, and as with most cpld and fpga designs,  most of the signals could have been connected to any of the pins on the CPLD. I took care to connect the serial clock pin to one of the global clock pins on the CPLD, but the majority of the pins were just connected to nearby CPLD pins for convenience. Ultimately I ended up using a 45-degree  orientation for my CPLD, which I think simplified a lot of the routing.</p>
<p>Once the pin mappings were decided, routing was pretty simple, and didn&#8217;t take too much time; I was able to quickly route the majority of the traces, only having to move some things around for the last few traces &#8211; And that&#8217;s where the timelapse video ends. Afterwards I did wind up increasing the trace width just a bit, adding a bypass cap for the CPLD (which is important enough normally, but really important when switching power), and just cleaning some things up.</p>
<div id="attachment_122" class="wp-caption alignnone" style="width: 310px"><a href="http://blog.akkit.org/wp-content/uploads/2010/05/ledmatrix_pcbdesign.png"><img class="size-medium wp-image-122 " title="ledmatrix_pcbdesign" src="http://blog.akkit.org/wp-content/uploads/2010/05/ledmatrix_pcbdesign-300x297.png" alt="" width="300" height="297" /></a><p class="wp-caption-text">PCB Design for the LED Matrix board</p></div>
<p>So, I submitted some PCBs to be produced via <a href="http://batchpcb.com/index.php/Products">BatchPCB</a>, and  waited a few weeks for them to show up.</p>
<p>A few weeks pass, and they do finally show up!</p>
<p>It did not take long to solder one together, so the second phase of this project began: designing the CPLD code. While I designed the interface with the possibility of implementing PWM in mind (to vary the brightness of the LEDs), I opted to start with the simplest usable design first. My VHDL code which controls the CPLD performs essentially the following operations:</p>
<ul>
<li>Decodes the ROW0..2 to enable one of the 8 common row FETs (sets one line to low, all others to high)</li>
<li>Has an internal 16bit array for the row data (8 red, 8 green LEDs). If LATCH is high, the inverse of these values will be exposed to the LEDs (as low = on), otherwise the LEDs will be off (pulled high)</li>
<li>Has an internal 16bit shift register which is shifted on the rising edge of SCK (new bit is shifted in from SDATA, and the last bit is always exposed as SDATA on the other side of the board)</li>
<li>When Latch transitions from low-&gt;high, the shift register is latched into the internal LED data array.</li>
</ul>
<p>And, that&#8217;s the complete system! It is ntended to be controlled with 6 I/O pins, but you can, if you don&#8217;t mind a little bit of light bleeding, even connect SCK and Latch together and drive it with only 5 pins, which I did for testing (using an ATTiny85 chip). My ideas for improvement are a bit limited because there isn&#8217;t really much space available on this CPLD for elaborate designs&#8230; I could abandon the idea of having a separate shift register and internal display register, and use a few bits per pixel to hold a several-bit-per-pixel value, and use the LATCH signal both as a display enable and also to advance a PWM clock. The problem with this though is then setup time becomes pretty high per row (as you can no longer shift new data in the background &#8211; shifted data would be immediately visible), so you have to update at a lower frequency.</p>
<p>The JTAG connector on the bottom edge works pretty well, though it took a few attempts before I held the connector against it firmly and consistently enough to program the CPLD.</p>
<p><a href="http://blog.akkit.org/wp-content/uploads/2010/05/ledmatrix_1.jpg"><img class="alignnone size-medium wp-image-131" title="ledmatrix_1" src="http://blog.akkit.org/wp-content/uploads/2010/05/ledmatrix_1-294x300.jpg" alt="LED Matrix board, soldered - Complete with cat hair!" width="294" height="300" /></a><a href="http://blog.akkit.org/wp-content/uploads/2010/05/ledmatrix_2.jpg"><img class="alignnone size-medium wp-image-132" title="ledmatrix_2" src="http://blog.akkit.org/wp-content/uploads/2010/05/ledmatrix_2-300x237.jpg" alt="Picture of the LED matrix with the tiny chip controlling it. Hard to get much grainier than this." width="300" height="237" /></a></p>
<p>(Some pictures above&#8230; The soldered board, and also a test pattern &#8211; I could make a happy face, but davr already did so what&#8217;s the point? ;) The red LEDs are only on due to bleeding as the line is visible as the data is being shifted. This would be avoided if I were using 6 I/O pins and using LATCH as intended, but using the attiny85, I only have 5 practical I/O pins)</p>
<p>Overall, it was a pretty entertaining project, though I probably won&#8217;t do much further with it. It was very much a spur of the moment project, so I didn&#8217;t really have any deep plans. While I could chain many of these together I would start to have serious problems supplying the power easily, as the estimated maximum of 400mA per board is actually a significant amount of power &#8211; my present lab equipment doesn&#8217;t include a proper power supply, so maybe a future project will be to build some higher power 3.3V power supplies :)</p>
<p><strong>Some Theory &#8211; A closer look at the details</strong></p>
<p>(For those of you who aren&#8217;t deeply familiar with this stuff, which might be most of you.)</p>
<p>This matrix is an 8&#215;8 array of bicolor Red/Green LEDs; to make it easier to deal with, instead of just giving you pins for each LED, they give you buses; In this case they connect the Anodes (positive terminals) of each row and give you one pin per row-anode-bus. Then they also  connect the red and green Cathodes (independently) to column buses, and expose those buses. You can&#8217;t tell this sort of system to &#8220;hold&#8221; a specific image, it&#8217;s designed for you to only draw one row at a time &#8211; however, due to <a href="http://en.wikipedia.org/wiki/Persistence_of_vision">Persistence of Vision</a> effects, you can quickly alternate between driving each row with a different pattern, and it will appear that the entire matrix is on at once. The points behind this are signal management and cost&#8230; This module gives you 8 pins for common row anodes, 8 pins for common red cathodes, and 8 pins for common green cathodes &#8211; a total of 24 pins. Actually wiring each LED independently would give you 64 LEDs * 3 pins per LED = 192 pins&#8230; Not nearly as easy to connect; and most sane designers would just connect the rows and columns together in a logical fashion on the PCB. Driving each LED independently is arguably just a bit less than 8 times as expensive as driving 8 sets of 8 LEDs and switching between them (even before you consider the PCB routing logistics to drive each LED independently!) In some systems (like giant full color LED display signs, and such) it does make sense to use per-LED driver circuitry in order to be as bright as possible, and they are rather expensive due to this and other factors :)</p>
<p>Some logistics have to be considered in a design like this &#8211; such as, just how much current is it going to draw? Assuming the CPLD is well programmed, at most 16 individual LEDs will be on at once. The LEDs have forward voltages of about 1.7-1.9V, and this board is driving them at 3.3V in series with 50 Ohm current limiting resistors. Walking through the power calculation, I&#8217;ll assume the LED has a 2.0V forward voltage drop (which is a worst case estimate), so the resistor will drop 1.3V when the LED circuit is switched on (as 2.0V + 1.3V = 3.3V); and as the voltage across the resistor is 1.3V, the current through the resistor (and as such, through the LED) will be 26mA (V = IR, or I = V/R, where V=1.3V, and R=50Ohm) &#8211; the reality is a little bit more complicated because LED voltage drops vary, and the CPLD will only allow so much current.</p>
<p>The CPLD needs to also turn individual rows on and off &#8211; but it can&#8217;t actually switch very much current on it&#8217;s own. As such, this design uses a FET that does the electrical heavy work, and the CPLD tells the FET to turn on and off. So how much current might a row take if it&#8217;s turned on? Assuming a worst case current of about 25mA per LED, the system will use 400mA if all 16 LEDs are on at once! (The CPLD by itself can only practically switch 20-30mA) I found a capable FET to handle this load though (Digikey part number <a href="http://search.digikey.com/scripts/DkSearch/dksus.dll?Detail&amp;name=DMP2004KDICT-ND">DMP2004KDICT-ND</a>) &#8211; which is a P-Channel FET capable of switching 600mA. All FETs essentially switch current flow on and off based on the voltage between the Gate and Source pins, but being a P-Channel FET means that the Source pin should be the highest voltage of the three, and it will switch on (&#8220;connect&#8221; the Source pin to the Drain pin) when the Gate&#8217;s voltage is less than the Source pin voltage by a certain amount. This FET has a switching voltage of 1V, so it&#8217;s &#8220;off&#8221; when the Gate voltage is &gt; 2.3V, and &#8220;on&#8221; when the Gate voltage is &lt; 2.3V &#8211; as such a logic low applied to the Gate pin turns the FET on.</p>
<p>Final note: A lot of these technical details are pretty shallow explanations; Things really do work this way, but there be dragons and missed details in all of the numbers I&#8217;ve given; here&#8217;s a small list of examples: The CPLD driving voltage actually depends on current, so it won&#8217;t be quite 3.3V &#8211; my example is a worst case estimate. You can see these pin driving traces sometimes in CPLD datasheets (And other times they&#8217;re linked: <a href="http://www.xilinx.com/support/documentation/application_notes/xapp150.pdf">Xilinx FPGA/CPLD I/V Curves</a>, see page 6 for XC9500XL family. Also, see Page 13 of the  <a href="http://www.xilinx.com/support/documentation/user_guides/ug445.pdf">CPLD I/O User Guide</a> for more information on I/V curves). The FETs, too, add a resistance to the load passing through them (about 0.9 ohm in this case &#8211; this is shown on the Digikey page as &#8220;Rds On&#8221;, and will also be specified in the part datasheets), so that further reduces the 3.3V that I was assuming. On a completely different tangent, FETs are capable of a lot more than just turning on and off, though they are in fact really good just for switching on/off, which is why they&#8217;re used so extensively in modern electronics (CMOS digital logic is typically almost all FETs). If you want a good book that explains all the minute details for discrete circuit design, I highly recommend <a href="http://www.amazon.com/gp/product/0521370957?ie=UTF8&amp;tag=stepswebl-20&amp;linkCode=as2&amp;camp=1789&amp;creative=390957&amp;creativeASIN=0521370957">The Art of Electronics</a><img style="border: none !important; margin: 0px !important;" src="http://www.assoc-amazon.com/e/ir?t=stepswebl-20&amp;l=as2&amp;o=1&amp;a=0521370957" border="0" alt="" width="1" height="1" />- It&#8217;s a little bit older, but presents most of the important concepts in electronics very clearly and in an easily approachable way.</p>
<p>(It&#8217;s over! Phew- that was long. Now I&#8217;m thinking about what to write about for next week&#8230; I have a good idea for next week, but beyond that it&#8217;s a bit hazy&#8230; I have literally piles of projects around here, the problem is almost none of them are done&#8230; Perhaps this will be an incentive to work harder! That can only be a good thing, right?)</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.akkit.org/2010/05/23/8x8-led-matrix-controller/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Project: AVR Programmer</title>
		<link>http://blog.akkit.org/2010/05/16/project-avr-programmer/</link>
		<comments>http://blog.akkit.org/2010/05/16/project-avr-programmer/#comments</comments>
		<pubDate>Sun, 16 May 2010 06:00:47 +0000</pubDate>
		<dc:creator>Stephen</dc:creator>
				<category><![CDATA[Electronics]]></category>
		<category><![CDATA[Projects]]></category>

		<guid isPermaLink="false">http://blog.akkit.org/?p=103</guid>
		<description><![CDATA[Here&#8217;s the first installment of my weekly project report thing :) Wish me luck! So, not terribly long ago I decided it was really time to give microcontrollers another go; My history with microcontrollers in general has been a little sketchy, because not only are they pretty limited systems, but they don&#8217;t really allow a [...]]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s the first installment of my weekly project report thing :) Wish me luck!</p>
<p>So, not terribly long ago I decided it was really time to give microcontrollers another go; My history with microcontrollers in general has been a little sketchy, because not only are they pretty limited systems, but they don&#8217;t really allow a lot of creativity in solving your problems. Being mostly self-taught on ARM and x86 CPU architectures, the little 8-bit uCs generally seemed more like a pain than anything else.</p>
<p>However,  I was determined not to let my history deter me, and to try again. I ordered some AVR DIP chips for prototyping and a serial programming cable. Unforuntately, like so many well laid out plans, this didn&#8217;t wind up working out &#8211; not knowing too much about the AVR landscape, I had inadvertently ordered a serial programmer that requires an actual native serial port to work (it wouldn&#8217;t do anything with my USB-serial converter&#8230; And seriously, who has a native serial port around these days?)</p>
<p>Being incredibly stubborn and unwilling to  wait further to order yet another programmer, I decided to take matters into my own hands &#8211; After reading the AVR documentation on programming their chips (which is actually quite good), I put together a small CPLD based programmer which has served my needs. Read on for the full details&#8230;</p>
<p><span id="more-103"></span></p>
<p>The original version of the programmer was a tangled ball of wirewrap wire, tightly coupling the core components, and was fortunately soldered well enough to hold together for several weeks before the first PCB arrived. I built the programmer out of materials I had readily lying around, it consists of: A 3.3V regulator (At the time, I was going to run the AVR chips at 5V &#8211; and my CPLD is 3.3V with 5V tolerant IO), a CPLD (XC9572XL), a 50MHz clock generator, and a MAX3232 equivalent serial level shifter (and a few caps for good measure). I wrote some basic VHDL to speak serial and accept some basic commands to control some pins as GPIO, and then a powershell script (yes, a powershell script) that interfaced the serial port and performed the high level programming commands. It didn&#8217;t take too terribly long, and it did finally work! I got my AVR to blink an LED, such a worthy task of all this effort :)</p>
<p>Below is the evolution of versions of this project &#8211; First the tangled mess; Second was the first PCB revision, it added an LED and had a few minor pcb errors; And third is the second PCB revision &#8211; which has 2 LEDs (one red, one green) for status.</p>
<p><a href="http://blog.akkit.org/wp-content/uploads/2010/05/avr_cpld_rev0.jpg"><img class="alignnone size-medium wp-image-106" title="avr_cpld_rev0" src="http://blog.akkit.org/wp-content/uploads/2010/05/avr_cpld_rev0-264x300.jpg" alt="" width="264" height="300" /></a> <a href="http://blog.akkit.org/wp-content/uploads/2010/05/avr_cpld_rev1.png"><img class="alignnone size-medium wp-image-108" title="avr_cpld_rev1" src="http://blog.akkit.org/wp-content/uploads/2010/05/avr_cpld_rev1-253x300.png" alt="" width="253" height="300" /></a><a href="http://blog.akkit.org/wp-content/uploads/2010/05/avr_cpld_rev2.png"><img class="alignnone size-medium wp-image-107" title="avr_cpld_rev2" src="http://blog.akkit.org/wp-content/uploads/2010/05/avr_cpld_rev2-251x300.png" alt="" width="251" height="300" /></a></p>
<p>(Can you spot the PCB errors in rev 1?)</p>
<p>Another hurdle that had to be overcome was that of programming speed &#8211; using the CPLD just as GPIO worked, but manually sending a byte for each clock transition was pretty slow and tedious. So I revisited the CPLD firmware and added another mode for AVR programming, It&#8217;s a special command that operates on the following 4 bytes: for each of these bytes it will automatically generate clock transitions in sync with the serial state machine, and also send back the data received from the chip (which is also in sync with the serial state machine). This makes programming the chip approximately 16 times faster than it was &#8211; it&#8217;s not as fast as it can be but it&#8217;s pretty quick and only limited by the serial connection speed at this point.</p>
<p>So, while this project hasn&#8217;t precisely been a necessary one, it has actually been pretty interesting and useful. One of the nice things about having a few GPIO pins around is that I&#8217;ve actually reused this for other things as well, like dumping a serial eeprom :) (in fact I even wound up using the 4-byte serial mode for the EEProm serial transfer as well, it&#8217;s pretty much just a 32bit serial mode) &#8211; And I imagine this device may come in handy in the future too for similar things (though, it will probably become obsolete around the time my current big project is done&#8230; I&#8217;ll leave that one to your imagination for now.)</p>
<p>And finally, this project did indeed serve my original goal, I&#8217;ve continued to do some development for the AVR uC platform, and while I still would prefer a much more beefy CPU, I have to admit that these little chips are pretty intelligent choices for small cheap projects that need something &#8220;smart&#8221; but don&#8217;t need much in the way of power. As such, I have a few projects based around them &#8211; and while I don&#8217;t have too many projects involving uCs at the moment, they are likely to get more attention in the future.</p>
<p>Okay! So that&#8217;s the first one; I hope you found this entertaining, and who knows where this will go next week :)</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.akkit.org/2010/05/16/project-avr-programmer/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Project: NDS Test Apps</title>
		<link>http://blog.akkit.org/2007/06/07/project-nds-test-apps/</link>
		<comments>http://blog.akkit.org/2007/06/07/project-nds-test-apps/#comments</comments>
		<pubDate>Thu, 07 Jun 2007 16:57:27 +0000</pubDate>
		<dc:creator>Stephen</dc:creator>
				<category><![CDATA[DS Development]]></category>
		<category><![CDATA[Projects]]></category>

		<guid isPermaLink="false">http://blog.akkit.org/2007/06/07/project-nds-test-apps/</guid>
		<description><![CDATA[The first project I&#8217;m going to use this &#8220;system&#8221; for is a set of testing apps for DS, primarily to verify emulator correctness. The project page is at http://wiki.akkit.org/Nds_test_apps. The page itself describes the project pretty well, but here&#8217;s a quick summary: Two applications for DS will be written, one is a Graphics test, one [...]]]></description>
			<content:encoded><![CDATA[<p>The first project I&#8217;m going to use this &#8220;system&#8221; for is a set of testing apps for DS, primarily to verify emulator correctness. The project page is at <a href="http://wiki.akkit.org/Nds_test_apps">http://wiki.akkit.org/Nds_test_apps</a>. The page itself describes the project pretty well, but here&#8217;s a quick summary:<br />
Two applications for DS will be written, one is a Graphics test, one is a CPU/Memory test. The idea behind both, is to evaluate the correctness of emulation for all graphical and CPU features, and periodically release the applications and information about how well the emulators do in the tests in order to promote improvements in emulation.<br />
This project is nice in that it&#8217;s easy to add more users to the development without people stepping on each other&#8217;s toes, so I&#8217;m happy to add several more people to the project.</p>
<p>Not all of the framework is in place for this project yet. I have a Subversion server and a bugtracker that are both partly ready, I expect to have both of them running correctly soon &#8211; they&#8217;ll be responsible for making this teamwork possible.<br />
The code for this project will be closed source during development, until a certain level of completeness is reached (this has yet to be decided) &#8211; after which point, all the code will be released under the MIT source code license (this, too, is just the current plan, if the team has other ideas, it can change)<br />
We will release binaries periodically, to allow people to test on their own, and to allow emu authors to get a good look at what problems exist.<br />
If you would like to be involved with this project, please email me at sgstair [at] akkit [dot] org.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.akkit.org/2007/06/07/project-nds-test-apps/feed/</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
		<item>
		<title>Changes in plans&#8230;</title>
		<link>http://blog.akkit.org/2007/06/07/changes-in-plans/</link>
		<comments>http://blog.akkit.org/2007/06/07/changes-in-plans/#comments</comments>
		<pubDate>Thu, 07 Jun 2007 16:45:04 +0000</pubDate>
		<dc:creator>Stephen</dc:creator>
				<category><![CDATA[Projects]]></category>

		<guid isPermaLink="false">http://blog.akkit.org/2007/06/07/changes-in-plans/</guid>
		<description><![CDATA[So, this apprentice thing hasn&#8217;t exactly been working out the way I expected it to&#8230; The second exam, while a neat idea suffers from a few fatal flaws. Firstly, I&#8217;ve been lazy, and when not lazy, I&#8217;ve been wrapped up in a multitude of other things. The second problem I come up with is trying [...]]]></description>
			<content:encoded><![CDATA[<p>So, this apprentice thing hasn&#8217;t exactly been working out the way I expected it to&#8230; The second exam, while a neat idea suffers from a few fatal flaws.<br />
Firstly, I&#8217;ve been lazy, and when not lazy, I&#8217;ve been wrapped up in a multitude of other things. The second problem I come up with is trying to write a test like this without it just becoming more about &#8220;what I know&#8221; than about actually teaching people. Lastly, the type of people I would want to target are exactly the sort of people who could learn all this stuff on their own, without a test to verify their knowledge &#8211; just given the right direction to look for information in.</p>
<p>So, here&#8217;s the plan: I&#8217;m dropping the apprentice idea. If you wanted to be involved and wanted to learn something, you&#8217;re still welcome to ask me; I&#8217;m still interested in answering questions and pointing people in the right direction.<br />
I still have a number of projects going on, and I would still like to allow members of the community to be involved with them, and I will still have high entry standards for joining such projects.</p>
<p>I&#8217;ll post on this blog when I have projects going on; I have one now (that I&#8217;ll post right after this post). If you want to be involved in a project, email me: sgstair [at] akkit [dot] org.<br />
My criteria for allowing people onto projects is going to be entirely subjective, but things that I expect from people who are interested are: a good knowledge of C/C++, some understanding of the workings of the DS, and some understanding of how to write secure code. Other requirements will be present for more complex projects, of course&#8230; and some of those will be starting eventually.</p>
<p>Also, to all of you who participated in the first round of the apprentice exam &#8211; thanks! Sorry it didn&#8217;t go further in that form, but if you&#8217;re still interested.. that&#8217;s what this is for! I&#8217;m presently hesitating to send out the &#8220;results&#8221; of the first round, mainly due to the high subjectivity of my ratings; however if someone convinces me otherwise, I might reverse my position. I do hope to get to work with some of you in these coming projects :)</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.akkit.org/2007/06/07/changes-in-plans/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
