<?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>Slashdev</title>
	<atom:link href="http://www.slashdev.ca/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.slashdev.ca</link>
	<description>Hardware, software, and just general tinkering</description>
	<lastBuildDate>Mon, 14 Jun 2010 01:54:47 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Wire Harness Lacing &#8211; A Dead Art?</title>
		<link>http://www.slashdev.ca/2010/06/13/wire-harness-lacing-a-dead-art/</link>
		<comments>http://www.slashdev.ca/2010/06/13/wire-harness-lacing-a-dead-art/#comments</comments>
		<pubDate>Mon, 14 Jun 2010 01:53:45 +0000</pubDate>
		<dc:creator>jiGGaK</dc:creator>
				<category><![CDATA[Make]]></category>

		<guid isPermaLink="false">http://www.slashdev.ca/?p=367</guid>
		<description><![CDATA[I don&#8217;t pretend to be a master of wire lacing. To be honest this is my first attempt but I am thoroughly pleased with the results. I was inspired by a recent article by Keith Neufeld in which he showed off his x0xb0x Wiring Harnesses.
This is my latest arcade joystick build incorporating my recent teensy++ [...]]]></description>
			<content:encoded><![CDATA[<div id="attachment_370" class="wp-caption aligncenter" style="width: 410px"><a href="http://www.slashdev.ca/wp-content/uploads/2010/06/IMG_2554.jpg"><img src="http://www.slashdev.ca/wp-content/uploads/2010/06/IMG_2554-400x300.jpg" alt="" title="IMG_2554" width="400" height="300" class="size-medium wp-image-370" /></a><p class="wp-caption-text">A wire harness promoting proper dental hygiene.</p></div>
<p>I don&#8217;t pretend to be a master of wire lacing. To be honest this is my first attempt but I am thoroughly pleased with the results. I was inspired by a recent article by <a href="http://www.neufeld.newton.ks.us/electronics/">Keith Neufeld</a> in which he showed off his <a href="http://www.neufeld.newton.ks.us/electronics/?p=1091">x0xb0x Wiring Harnesses</a>.</p>
<p>This is my latest arcade joystick build incorporating my recent <a href="/2010/05/25/ps3-gamepad-with-home-button/">teensy++ based controller</a>. Locating resources on the web describing the art of wire harness lacing can be tricky as it doesn&#8217;t seem to be a popular practice but I found a decent writeup <a href="http://www.dairiki.org/hammond/cable-lacing-howto/">here</a>. The wires on my controller are 24 gauge so the thick string Keith used would have been overkill. Instead I opted for waxed dental floss to wrap the wires (tip: waxed is important as it helps the knots stay tight).</p>
<p><span id="more-367"></span></p>
<div id="attachment_373" class="wp-caption aligncenter" style="width: 410px"><a href="http://www.slashdev.ca/wp-content/uploads/2010/06/IMG_2547.jpg"><img src="http://www.slashdev.ca/wp-content/uploads/2010/06/IMG_2547-400x300.jpg" alt="" title="IMG_2547" width="400" height="300" class="size-medium wp-image-373" /></a><p class="wp-caption-text">Full harness</p></div>
]]></content:encoded>
			<wfw:commentRss>http://www.slashdev.ca/2010/06/13/wire-harness-lacing-a-dead-art/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PS3 Gamepad With Home Button</title>
		<link>http://www.slashdev.ca/2010/05/25/ps3-gamepad-with-home-button/</link>
		<comments>http://www.slashdev.ca/2010/05/25/ps3-gamepad-with-home-button/#comments</comments>
		<pubDate>Tue, 25 May 2010 14:45:36 +0000</pubDate>
		<dc:creator>jiGGaK</dc:creator>
				<category><![CDATA[AVR]]></category>
		<category><![CDATA[Make]]></category>

		<guid isPermaLink="false">http://www.slashdev.ca/?p=353</guid>
		<description><![CDATA[It&#8217;s no secret the PS3 will work with most USB HID gamepads or joysticks. However the Home button is something special. If you connect your sixaxis controller to your PC and monitor button presses, the Home button comes up as button number 13. If you then create a standard gamepad with the same button mapping, [...]]]></description>
			<content:encoded><![CDATA[<div id="attachment_354" class="wp-caption aligncenter" style="width: 410px"><a href="http://www.slashdev.ca/wp-content/uploads/2010/05/IMG_2539.jpg"><img src="http://www.slashdev.ca/wp-content/uploads/2010/05/IMG_2539-400x300.jpg" alt="" title="ps3-teensy-shield" width="400" height="300" class="size-medium wp-image-354" /></a><p class="wp-caption-text">Teensy++ on a breakout board</p></div>
<p>It&#8217;s no secret the PS3 will work with most <a href="http://www.slashdev.ca/2010/05/22/simple-6-button-ps3-gamepad/">USB HID gamepads or joysticks</a>. However the Home button is something special. If you connect your sixaxis controller to your PC and monitor button presses, the Home button comes up as button number 13. If you then create a standard gamepad with the same button mapping, the PS3 will refuse to recognize the Home button.</p>
<p>After some tracing of the USB traffic from an official Madcatz Street Fighter IV FightStick I was able to come up with a solution! There are 8 bytes transfered during the enumeration phase, just after the device sends it&#8217;s report descriptor. Mimicking the same exchange results in the Home button functioning correctly when button 13 is pressed.</p>
<p>I used the amazingly awesome <a href="http://www.pjrc.com/teensy/">Teensy++</a> development board after being inspired by <a href="http://diy-machine.blogspot.com/">this guys work</a>. I also used the report descriptor from Toodles <a href="http://www.shoryuken.com/showthread.php?t=131230">UPCB</a> project which appears to come from the SEGA VIRTUA STICK. This descriptor is very similar to the one from the Madcatz controller, except their is one endpoint instead of two which simplifies things somewhat.</p>
<p>I also created a shield (pictured above) which brings several pins on the Teensy to convenient screw terminals.</p>
<p>Source code and Eagle files are available in a <a href="http://git.slashdev.ca/ps3-teensy-hid/">git repository</a>. Code is licensed under the <a href="http://www.gnu.org/licenses/">GPL v3</a> and the PCB design is distributed under a Creative Commons license <a href="http://creativecommons.org/licenses/by-sa/2.5/">Attribution-ShareAlike 2.5</a>.</p>
<div id="attachment_359" class="wp-caption aligncenter" style="width: 358px"><img src="http://www.slashdev.ca/wp-content/uploads/2010/05/ps3-teensy-hid-v11.png" alt="" title="ps3-teensy-hid-v11" width="348" height="243" class="size-full wp-image-359" /><p class="wp-caption-text">Terminal reference</p></div>
<p><a href='http://www.slashdev.ca/wp-content/uploads/2010/05/ps3-teensy-hid-v11.pdf'>This document</a> can be printed onto transparency for exposing your pre-sensitized copper clad. To use this for toner transfer, be sure to mirror the image first.</p>
<p>And a compiled version of the <a href="http://git.slashdev.ca/ps3-teensy-hid/tree/ps3-teensy-hid.hex">code in ihex</a>. This is for the teensy++ 2.0. The code might work with other versions of the teensy, but a re-compile will be required.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.slashdev.ca/2010/05/25/ps3-gamepad-with-home-button/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Simple 6-Button PS3 Gamepad</title>
		<link>http://www.slashdev.ca/2010/05/22/simple-6-button-ps3-gamepad/</link>
		<comments>http://www.slashdev.ca/2010/05/22/simple-6-button-ps3-gamepad/#comments</comments>
		<pubDate>Sat, 22 May 2010 23:56:45 +0000</pubDate>
		<dc:creator>jiGGaK</dc:creator>
				<category><![CDATA[AVR]]></category>
		<category><![CDATA[Make]]></category>

		<guid isPermaLink="false">http://www.slashdev.ca/?p=341</guid>
		<description><![CDATA[I built this board several months ago. It&#8217;s a USB gamepad circuit with 6 buttons mapped to correlate with the standard layout of a Street Fighter IV FightStick for the PS3.
It&#8217;s based on another design by Raphaël Assénat.
You&#8217;ll find the source code and Eagle files here, both licensed under the GPL.
PS: It&#8217;ll also work just [...]]]></description>
			<content:encoded><![CDATA[<p>I built this board several months ago. It&#8217;s a USB gamepad circuit with 6 buttons mapped to correlate with the standard layout of a Street Fighter IV FightStick for the PS3.</p>
<div id="attachment_342" class="wp-caption aligncenter" style="width: 410px"><a href="http://www.slashdev.ca/wp-content/uploads/2010/05/img_1735.jpg"><img src="http://www.slashdev.ca/wp-content/uploads/2010/05/img_1735-400x300.jpg" alt="" title="ps3-hid" width="400" height="300" class="size-medium wp-image-342" /></a><p class="wp-caption-text">Gamepad Circuit Board</p></div>
<div id="attachment_347" class="wp-caption aligncenter" style="width: 416px"><img src="http://www.slashdev.ca/wp-content/uploads/2010/05/ps3-usb-hid.png" alt="" title="ps3-usb-hid-eagle" width="406" height="270" class="size-full wp-image-347" /><p class="wp-caption-text">Export from EagleCAD with terminal labels</p></div>
<p>It&#8217;s based on <a href="http://www.slashdev.ca/2009/04/12/nes-usb-gamepad/">another design</a> by <a href="http://www.raphnet.net/electronique/usb_game12/index_en.php">Raphaël Assénat</a>.</p>
<p>You&#8217;ll find the source code and Eagle files <a href="http://git.slashdev.ca/ps3-usb-hid">here</a>, both licensed under the GPL.</p>
<p>PS: It&#8217;ll also work just fine on a Window/Linux/Mac OS X computer as well since all operating systems come with drivers for USB HID gamepads.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.slashdev.ca/2010/05/22/simple-6-button-ps3-gamepad/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Get USB Report Descriptor with Linux</title>
		<link>http://www.slashdev.ca/2010/05/08/get-usb-report-descriptor-with-linux/</link>
		<comments>http://www.slashdev.ca/2010/05/08/get-usb-report-descriptor-with-linux/#comments</comments>
		<pubDate>Sat, 08 May 2010 13:09:15 +0000</pubDate>
		<dc:creator>jiGGaK</dc:creator>
				<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://www.slashdev.ca/?p=329</guid>
		<description><![CDATA[Came across this handy little hack today googlin around the internetz. On several occasions I&#8217;ve had the need to get the full device and report descriptors from an attached USB device. Today was another one of those occasions. If you run lsusb with the -v flag you will get a nice verbose output, but if [...]]]></description>
			<content:encoded><![CDATA[<p>Came across this handy little hack today googlin around the internetz. On several occasions I&#8217;ve had the need to get the full device and report descriptors from an attached USB device. Today was another one of those occasions. If you run <a href="http://linuxmanpages.com/man8/lsusb.8.php">lsusb</a> with the <em>-v</em> flag you will get a nice verbose output, but if you locate the section that contains the report descriptor you&#8217;ll be welcomed with a typical Linux friendly message: <strong>** UNAVAILABLE **</strong>.</p>
<div id="attachment_331" class="wp-caption aligncenter" style="width: 462px"><a href="http://www.slashdev.ca/wp-content/uploads/2010/05/error.png"><img src="http://www.slashdev.ca/wp-content/uploads/2010/05/error-452x300.png" alt="" title="error" width="452" height="300" class="size-medium wp-image-331" /></a><p class="wp-caption-text">OH NOOZ!!1!</p></div>
<p>I thought to myself, self: &#8220;certainly there must be <em>some way</em> to tame this beast?&#8221;. Wouldn&#8217;t you know it, there certainly is.</p>
<p><span id="more-329"></span></p>
<p>Start by plugging in your fancy pants USB device and running <tt>dmesg</tt> to get the kernel output for the event. It will look something like this:</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">input: Sony PLAYSTATION(R)3 Controller as /devices/pci0000:00/0000:00:04.1/usb2/2-4/2-4.2/2-4.2:1.0/input/input16
sony 0003:054C:0268.000F: input,hiddev0,hidraw3: USB HID v1.11 Joystick [Sony PLAYSTATION(R)3 Controller] on usb-0000:00:04.1-4.2/input0</pre></div></div>

<p>The first line <em>input: &#8230;</em> is what we want. It contains the full device path and in this case we are interested in third last component of the path: <strong>2-4.2:1.0</strong>.</p>
<p>Now run <tt>lsusb</tt> and locate the entry for your device.</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">Bus 002 Device 024: ID 054c:0268 Sony Corp. Batoh Device</pre></div></div>

<p>Using the VendorID:ProductID pair from the output we can get verbose output from <tt>lsusb</tt> for just the device we are interested in and nothing else:</p>
<p><code>lsusb -vd 054c:0268</code></p>
<p>This is when we see that <tt>lsusb</tt> flat out refuses to show us the report descriptor. To get it, we need to <em>unbind</em> the device first (as root).</p>
<p><code>sudo bash -c "echo -n 2-4.2:1.0 >/sys/bus/usb/drivers/usbhid/unbind"</code></p>
<p>Now run <tt>lsusb</tt> again for the device and you should see the report descriptor in the output!</p>
<p><code>lsusb -vd 054c:0268</code></p>
]]></content:encoded>
			<wfw:commentRss>http://www.slashdev.ca/2010/05/08/get-usb-report-descriptor-with-linux/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Fixing Sigtool &#8211; Again</title>
		<link>http://www.slashdev.ca/2010/01/28/fixing-sigtool-again/</link>
		<comments>http://www.slashdev.ca/2010/01/28/fixing-sigtool-again/#comments</comments>
		<pubDate>Fri, 29 Jan 2010 03:40:56 +0000</pubDate>
		<dc:creator>jiGGaK</dc:creator>
				<category><![CDATA[BlackBerry]]></category>

		<guid isPermaLink="false">http://www.slashdev.ca/?p=298</guid>
		<description><![CDATA[A year or so ago I wrote out some instructions detailing how to make SignatureTool.jar work in Unix type systems. Soon after I got word that somewhere around JDE 4.6 or JDE 4.7, RIM actually fixed the mistake in the sigtool.  Sadly they missed one.
If you attempt to sign a .cod file larger than [...]]]></description>
			<content:encoded><![CDATA[<p>A year or so ago I wrote out some instructions detailing <a href="/2008/03/16/using-sigtool-in-linux/">how to make SignatureTool.jar work</a> in Unix type systems. Soon after I got word that somewhere around JDE 4.6 or JDE 4.7, RIM actually fixed the mistake in the sigtool.  Sadly they missed one.</p>
<p>If you attempt to sign a <tt>.cod</tt> file larger than 64KB (ie: contains sibling files or child files or whatever files) then you will likely get a file created in your current working directory that looks something like <tt>kd8m34jkf/my_lame_app-1.cod</tt>.  When you load the file to the device it will result in an error of some sort.  The fix for this is relatively simple.  Read on for the details.</p>
<p><span id="more-298"></span></p>
<h2>Edit class file</h2>
<p>Go back and read my <a href="/2008/03/16/using-sigtool-in-linux/">other post</a> for instructions on extracting the jar file and for packaging it up again.  I&#8217;m going to leave out some details here since they are covered previously.</p>
<p>Note: this is based on the SignatureTool.jar file from JDE 4.7.  I have not verified that this procedure is the same for other versions of the JDE.</p>
<p>We will use good old <a href="http://classeditor.sourceforge.net/">ClassEditor</a> again.  Open <tt>q.class</tt> and change string constant at index 253 from a back slash to a forward slash.</p>
<div id="attachment_307" class="wp-caption aligncenter" style="width: 410px"><a href="http://www.slashdev.ca/wp-content/uploads/2010/01/2010-01-28-233337_800x600_scrot.png"><img src="http://www.slashdev.ca/wp-content/uploads/2010/01/2010-01-28-233337_800x600_scrot-400x300.png" alt="Edit string constant at index 253 in q.class" title="2010-01-28-233337_800x600_scrot" width="400" height="300" class="size-medium wp-image-307" /></a><p class="wp-caption-text">Edit string constant at index 253 in q.class</p></div>
]]></content:encoded>
			<wfw:commentRss>http://www.slashdev.ca/2010/01/28/fixing-sigtool-again/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Signing Servers Down Again</title>
		<link>http://www.slashdev.ca/2010/01/28/signing-servers-down-again/</link>
		<comments>http://www.slashdev.ca/2010/01/28/signing-servers-down-again/#comments</comments>
		<pubDate>Fri, 29 Jan 2010 03:29:54 +0000</pubDate>
		<dc:creator>jiGGaK</dc:creator>
				<category><![CDATA[BlackBerry]]></category>
		<category><![CDATA[Rants]]></category>

		<guid isPermaLink="false">http://www.slashdev.ca/?p=292</guid>
		<description><![CDATA[It&#8217;s 10:00pm EST, Jan. 28th and RIM&#8217;s signing servers have been down for the last sixty minutes. This wouldn&#8217;t be such an issue if the rest of the BlackBerry development tool suite wasn&#8217;t such a steaming pile of crap!  Quite literally the only component that works &#8211; is the compiler.
The simulator doesn&#8217;t sim and [...]]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s 10:00pm EST, Jan. 28th and RIM&#8217;s signing servers have been down for the last sixty minutes. This wouldn&#8217;t be such an issue if the rest of the BlackBerry development tool suite wasn&#8217;t such a steaming pile of crap!  Quite literally the only component that works &#8211; is the compiler.</p>
<p>The simulator doesn&#8217;t sim and the signing tool doesn&#8217;t sign.  These two issues cause a serious problem.</p>
<p>First the simulator.  If you take an OS 4.3.1 simulator and a device also running OS 4.3.1 the two will behave very differently in a few subtle, but important ways.  My gripe is localized to the <a href="http://www.blackberry.com/developers/docs/4.3.0api/javax/microedition/media/package-frame.html">mmapi</a> api (handles audio/video playback).  Long story short, the simulator can&#8217;t be trusted so we have to debug device/OS idiosyncrasies on the device itself.</p>
<p>But hold on a second.  The signing servers aren&#8217;t working so I <strong>can&#8217;t</strong> debug on the device in all it&#8217;s developer friendly glory with lack of usable debugger and lack of even something as simple as a means to read text written to <strong>freaking</strong> <a href="http://en.wikipedia.org/wiki/Standard_output">standard output</a>!</p>
<p>Thank you RIM!  Thank you for wasting my valuable time.  Thank you for reminding me that no amount of money can justify writing software for this platform any longer.</p>
<p>(10:30, signing servers still not working)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.slashdev.ca/2010/01/28/signing-servers-down-again/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Introducing jQTemplate</title>
		<link>http://www.slashdev.ca/2009/06/16/introducing-jqtemplate/</link>
		<comments>http://www.slashdev.ca/2009/06/16/introducing-jqtemplate/#comments</comments>
		<pubDate>Tue, 16 Jun 2009 17:32:12 +0000</pubDate>
		<dc:creator>jiGGaK</dc:creator>
				<category><![CDATA[JavaScript]]></category>

		<guid isPermaLink="false">http://www.slashdev.ca/?p=261</guid>
		<description><![CDATA[Some time ago I started a little experiment to see what this whole &#8220;Web 2.0&#8243; development thing was all about.  The goal of the experiment was to develop a simple application without the help of any server side web framework, and instead use JSON as a data interchange format.  All HTML, CSS, and [...]]]></description>
			<content:encoded><![CDATA[<div id="attachment_264" class="wp-caption aligncenter" style="width: 380px"><img src="http://www.slashdev.ca/wp-content/uploads/2009/06/jqtemplate.png" alt="jQTemplate in action" title="jqtemplate" width="370" height="220" class="size-full wp-image-264" /><p class="wp-caption-text">jQTemplate in action</p></div>
<p>Some time ago I started a little experiment to see what this whole <a href="http://git.slashdev.ca/linkdb/">&#8220;Web 2.0&#8243; development</a> thing was all about.  The goal of the experiment was to develop a simple application without the help of any server side web framework, and instead use <a href="http://json.org/">JSON</a> as a data interchange format.  All HTML, CSS, and JavaScript should be cleanly separated.</p>
<p>Cleanly separating the HTML from the JavaScript posed a challenge and thus <a href="/jqtemplate">jQTemplate</a> was born.  The concept is simple: write snippets of HTML code with annotations (in the form of special XML attributes) that can be used to transform the snippet into elements in the DOM.</p>
<p>The result I think is actually quite nice, and I love me some pretty code!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.slashdev.ca/2009/06/16/introducing-jqtemplate/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>NES USB Gamepad</title>
		<link>http://www.slashdev.ca/2009/04/12/nes-usb-gamepad/</link>
		<comments>http://www.slashdev.ca/2009/04/12/nes-usb-gamepad/#comments</comments>
		<pubDate>Sun, 12 Apr 2009 06:25:21 +0000</pubDate>
		<dc:creator>jiGGaK</dc:creator>
				<category><![CDATA[Make]]></category>

		<guid isPermaLink="false">http://www.slashdev.ca/?p=228</guid>
		<description><![CDATA[This is mainly a show and tell post.  What we have here is a NES controller that has been converted into a USB HID device.  This means it can be connected to a computer without installing any drivers (Linux, Mac OS X, and Windows XP).
The circuit, PCB design, and firmware for the Atmega8 [...]]]></description>
			<content:encoded><![CDATA[<div id="attachment_229" class="wp-caption alignleft" style="width: 310px"><img src="http://www.slashdev.ca/wp-content/uploads/2009/04/img_1733-300x225.jpg" alt="Assembled controller" title="nes_usb" width="300" height="225" class="size-medium wp-image-229" /><p class="wp-caption-text">Assembled controller</p></div>
<p>This is mainly a show and tell post.  What we have here is a NES controller that has been converted into a USB HID device.  This means it can be connected to a computer without installing any drivers (Linux, Mac OS X, and Windows XP).</p>
<p>The circuit, PCB design, and firmware for the Atmega8 micro-controller are courtesy of <a href="http://www.raphnet.net/electronique/snes_nes_usb/index_en.php">Raphaël Assénat</a>.  His website is a veritable cornucopia of awesome circuitry.  And the best part?  All of his work is fully documented and provided for use under the GPL license where applicable.</p>
<p>Now the show part is over, time for the tell.</p>
<p><span id="more-228"></span></p>
<h2>PCB Fabrication</h2>
<p>First I would like to say I am no electrical engineer.  I love building circuits and playing with micro-controllers but I have very little knowledge of the theory behind a circuit.  That said, I learned a few things during this project that I would like to share.</p>
<p>The first lesson: surface mount PCB&#8217;s are painful!  The actual soldering isn&#8217;t so bad.  Search <a href="http://www.youtube.com">YouTube</a> for <em>surface mount soldering</em> and you will get a ton of great instructional videos.</p>
<div id="attachment_233" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.slashdev.ca/wp-content/uploads/2009/04/img_1728.jpg"><img src="http://www.slashdev.ca/wp-content/uploads/2009/04/img_1728-300x225.jpg" alt="Isn&#039;t it cute!" title="nes_usb_circuit" width="300" height="225" class="size-medium wp-image-233" /></a><p class="wp-caption-text">Isn't it cute!</p></div>
<p>The real issue for me was fabricating the PCB.  I usually use the <a href="http://www.mgchemicals.com/products/416k.html">photo fabrication</a> method but one of the tiny traces would get burned off every time.  It&#8217;s poossible through some trial and error with expossure time I might have been able to get this to work but each failure is expensive!  Pre-sensitized copper clad can cost up to $10 per sheet (aprox. 6&#215;6 inches).</p>
<p>I ended up using the <a href="http://www.fullnet.com/~tomg/gooteepc.htm">toner transfer</a> method which I found tedious at best.  I had to experiment several times over with different laser printers, print settings, iron temperature, iron pressure, and ironing time.  Too many variables!  That said, failures are cheep.  If the artwork did not stick to the copper correctly, just clean the copper and try again.</p>
<h2>Atmega8 Micro-controller</h2>
<p>I actually built this circuit a few months ago.  After assembling the circuit and connecting the ICSP programmer I successfully:</p>
<ol>
<li>flashed the firmware</li>
<li>burned the fuses</li>
</ol>
<p>Then I connected the USB cable to the computer but the device failed to register!  I was so frustrated that after all of that work, I just stuck the project on the shelf and forgot about it.</p>
<p>Recently I was working with another Atmega8 based board when I realized my error.  See, when you receive your AVR chip from the factory it is configured to use an internal oscilator.  This internal osilator circuit tells the AVR what speed to run at (eg: 1 MHz).</p>
<p>The <a href="http://www.engbedded.com/fusecalc">fuses</a> are a set of bytes in the flash that determine how the chip operates.  One of the fuse settings tell the chip to ignore the internal osilator circuit and look for an external one.  The NES USB board is an example of a circuit that uses an external oscilator in the form of a crystal.</p>
<p>Beside the crystal are two capacitors and here is where I went wrong.  These capacitors are 27pF on Raphaël&#8217;s circuit but I used a through hole crystal instead of the surface mount variety and these capacitor values are specific to the crystal!  You can find the appropriate values in the crystals datasheet, in my case 18pF.</p>
<p>This explains why I was able to flash the firmware and the fuses.  Once the fuses where flashed the AVR chip expected to have a working external oscilator but due to incorrect capacitors the external oscilator couldn&#8217;t function and neither could the chip.  After replacing the capacitors the circuit sprang to life.</p>
<p>So in closing I hope this helps another noob like me out there.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.slashdev.ca/2009/04/12/nes-usb-gamepad/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>A Notch in the Cross Platform Blackberry Development Belt</title>
		<link>http://www.slashdev.ca/2009/03/11/a-notch-in-the-cross-platform-blackberry-development-belt/</link>
		<comments>http://www.slashdev.ca/2009/03/11/a-notch-in-the-cross-platform-blackberry-development-belt/#comments</comments>
		<pubDate>Wed, 11 Mar 2009 14:03:06 +0000</pubDate>
		<dc:creator>jiGGaK</dc:creator>
				<category><![CDATA[BlackBerry]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://www.slashdev.ca/?p=212</guid>
		<description><![CDATA[In a previous post I listed 4 key items needed for BlackBerry development:

Rapc compiler
Signature tool
Simulator
Javaloader

At the time of writing the first two worked fine.  The third, Simulator, is if&#8217;y at best.  And the fourth was just not possible.
Until now.  In late December, a saviour by the name of Nicolas Vivien dropped by [...]]]></description>
			<content:encoded><![CDATA[<p>In a <a href="http://www.slashdev.ca/2008/04/03/blackberry-development-using-linux/">previous post</a> I listed 4 key items needed for BlackBerry development:</p>
<ol>
<li>Rapc compiler</li>
<li>Signature tool</li>
<li>Simulator</li>
<li>Javaloader</li>
</ol>
<p>At the time of writing the first two worked fine.  The third, Simulator, is <a href="http://www.slashdev.ca/2008/03/27/blackberry-simulator-in-linux-sort-of">if&#8217;y at best</a>.  And the fourth was just not possible.</p>
<p>Until now.  In late December, a saviour by the name of Nicolas Vivien dropped by the <a href="http://www.netdirect.ca/software/packages/barry/">barry</a> mailing list to let everyone know that he was hard at work on reverse engineering the Javaloader USB protocol.  Within a few weeks he had developed a proof of concept that enabled users to load cod files to the BlackBerry.</p>
<p>Since then several developers (including myself) have chipped in to implement all of the crucial aspects of the Javaloader needed for day-to-day use.</p>
<p><span id="more-212"></span></p>
<h2>Which Commands are Supported?</h2>
<ul>
<li>list modules on handheld, including siblings</li>
<li>get handheld info</li>
<li>load one or more cod files onto the handheld</li>
<li>save one or more cod files from the handheld</li>
<li>erase cod files from the handheld</li>
<li>dump the eventlog</li>
<li>clear the eventlog</li>
<li>get screenshot of the handheld and save as bmp</li>
<li>set time on the handheld</li>
<li>wipe the applications and/or file system on the handheld</li>
</ul>
<p>As you can see, most of the important stuff is already finished.  And more is being added all the time.</p>
<h2>I&#8217;ve Heard Enough&#8230; Gimme, Gimme, Gimme!</h2>
<p>The Javaloader is slated to be included in the next release of Barry; version 0.15.  If you would like to test it right now, you&#8217;ll need to compile from source or find a binary package for your OS/distro.</p>
<p>Here are some instructions for <a href="http://www.netdirect.ca/software/packages/barry/cvs.php">compiling from source</a>.  If you get stuck, someone on the <a href="http://sourceforge.net/mail/?group_id=153722">mailing list</a> might be able to lend a hand.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.slashdev.ca/2009/03/11/a-notch-in-the-cross-platform-blackberry-development-belt/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Bug Fixes &#8211; Arduino LCD Library</title>
		<link>http://www.slashdev.ca/2008/09/19/bug-fixes-arduino-lcd-library/</link>
		<comments>http://www.slashdev.ca/2008/09/19/bug-fixes-arduino-lcd-library/#comments</comments>
		<pubDate>Sat, 20 Sep 2008 02:26:14 +0000</pubDate>
		<dc:creator>jiGGaK</dc:creator>
				<category><![CDATA[Arduino]]></category>

		<guid isPermaLink="false">http://www.slashdev.ca/?p=200</guid>
		<description><![CDATA[Just a quick update on the Arduino LCD Library (bring it to version 0.3).  I have worked many hours to iron out all the bugs in the code that checks the LCD modules busy flag.  This is the part of the LCD modules controller that tells the arduino it&#8217;s in the middle of [...]]]></description>
			<content:encoded><![CDATA[<p>Just a quick update on the <a href="arduino-lcd-library">Arduino LCD Library</a> (bring it to version 0.3).  I have worked many hours to iron out all the bugs in the code that checks the LCD modules busy flag.  This is the part of the LCD modules controller that tells the arduino it&#8217;s in the middle of an internal operation.</p>
<p>Hopefully this fixes the sporadic behavior people have reported with their LCD&#8217;s.  It certainly fixes the problem with the two LCD&#8217;s I have tested.</p>
<p>I also added a <a href="http://svn.slashdev.ca/arduino/Lcd/trunk/ref/lcd_arduino.pdf">schematic</a> to the package.  It just outlines where to connect VCC, GND and where to put the 10K pot.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.slashdev.ca/2008/09/19/bug-fixes-arduino-lcd-library/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
