<?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>Sphere.ws</title>
	<atom:link href="http://www.sphere.ws/blog/?feed=rss2" rel="self" type="application/rss+xml" />
	<link>http://www.sphere.ws/blog</link>
	<description>Techlog</description>
	<lastBuildDate>Mon, 22 Feb 2010 17:03:47 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>FreeRTOS port for XMOS XS1 processors</title>
		<link>http://www.sphere.ws/blog/?p=278</link>
		<comments>http://www.sphere.ws/blog/?p=278#comments</comments>
		<pubDate>Mon, 22 Feb 2010 17:03:47 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[electronics]]></category>
		<category><![CDATA[Operating Systems]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[projects]]></category>
		<category><![CDATA[XMOS]]></category>

		<guid isPermaLink="false">http://www.sphere.ws/blog/?p=278</guid>
		<description><![CDATA[I have ported FreeRTOS to the XMOS architecture. The project can be downloaded from the project page on the XCore website. This page will always hold the newest release of the port. A mirror for the current release can be found here.]]></description>
			<content:encoded><![CDATA[<p>I have ported <a href="http://www.freertos.org">FreeRTOS</a> to the <a href="http://www.xmos.com/technology/architecture">XMOS architecture</a>.</p>
<p>The project can be downloaded from the <a href="http://www.xcore.com/projects/freertos-port">project page</a> on the XCore website. This page will always hold the newest release of the port.</p>
<p>A mirror for the current release can be found <a href="http://www.sphere.ws/xmos/FreeRTOS/FreeRTOS_XMOS_XS1_r01.zip">here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sphere.ws/blog/?feed=rss2&#038;p=278</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Converting video for my DVD player</title>
		<link>http://www.sphere.ws/blog/?p=261</link>
		<comments>http://www.sphere.ws/blog/?p=261#comments</comments>
		<pubDate>Tue, 05 Jan 2010 22:40:13 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[software]]></category>

		<guid isPermaLink="false">http://www.sphere.ws/blog/?p=261</guid>
		<description><![CDATA[The movies i shoot with my digital camera have to be converted to play on my TV using my DVD player (using the USB functionionality of the DVD player). My DVD player accepts video encoded in DivX and audio in MP3. The movies shot by my digital camera are encoded using Motion JPEG and the [...]]]></description>
			<content:encoded><![CDATA[<p>The movies i shoot with my digital camera have to be converted to play on my TV using my DVD player (using the USB functionionality of the DVD player).<br />
My DVD player accepts video encoded in DivX and audio in MP3. The movies shot by my digital camera are encoded using Motion JPEG and the audio is PCM (yes even PCM is not supported!)</p>
<div id="attachment_263" class="wp-caption alignnone" style="width: 334px"><a href="http://www.sphere.ws/blog/wp-content/uploads/2010/01/video_convert1.jpg"><img class="size-full wp-image-263" title="Digital camera output format" src="http://www.sphere.ws/blog/wp-content/uploads/2010/01/video_convert1.jpg" alt="Digital camera output format" width="324" height="472" /></a><p class="wp-caption-text">Digital camera output format</p></div>
<p>To convert the video to DivX and MP3 i use the following tools:</p>
<ul>
<li><a href="http://www.virtualdub.org/">VirtualDub</a></li>
<li><a href="http://winff.org/html_new/">ffmpeg</a></li>
</ul>
<p>Before converting make sure the <a href="http://www.divxmovies.com/codec/">DivX codec</a> is installed.</p>
<p>Converting video&#8217;s is done in two steps:</p>
<ol>
<li>Converting the audio to MP3</li>
<li>Converting the video to DivX</li>
</ol>
<p>This could be done with VirtualDub only but for some reason i could not encode the audio to MP3 (using the default Fraunhofer MP3 codec which is installed on Windows). I also tried the Lame MP3 codec without results. The codecs show up when you select the audio compression but you have to check the &#8216;show all formats&#8217; checkbox to see the different output modes.  If they don&#8217;t show up without checking it (in my case), encoding will not work.</p>
<p>I have installed WinFF, which is a frontend for ffmpeg but also installs ffmpeg.</p>
<p>The first step in decoding is converting the audio to MP3. This is done using ffmpeg on the commandline:</p>
<pre>C:\Program Files\WinFF&gt;ffmpeg.exe -i input.avi -vcodec copy -acodec libmp3lam
e -ar 11025 output.avi</pre>
<p>This will convert the audio to MP3 with a output sample rate of 11.025KHz (the same as in the input file) and will not touch the video stream (just copy it).</p>
<p>After that start up VirtualDub and open the video file  (File-&gt;open).<br />
VirtualDub might give a warning that the audio has a variable bitrate. If it does we will also rewrite the MP3 stream. First we are going to change the video codec. Make sure that Video -&gt; Full Processing Mode is selected. After that go to Video -&gt; Compression&#8230;</p>
<p>A popup will apear with the video compression options.<br />
Select DivX Codec from the list. To change any options, click configure.<br />
In my case this was not nessesary. Finally click OK.</p>
<div id="attachment_270" class="wp-caption alignnone" style="width: 541px"><a href="http://www.sphere.ws/blog/wp-content/uploads/2010/01/vdub_vcompression.jpg"><img class="size-full wp-image-270" title="vdub_vcompression" src="http://www.sphere.ws/blog/wp-content/uploads/2010/01/vdub_vcompression.jpg" alt="VirtualDub Video Compression Options" width="531" height="312" /></a><p class="wp-caption-text">VirtualDub Video Compression Options</p></div>
<p>If VirtualDub gave a warning that the audio has a variable bitrate we also change the audio.</p>
<p>Make sure Audio -&gt; Full Processing Mode is selected (not by default).</p>
<p>Click Audio &#8211; &gt; Compression&#8230;</p>
<p>A popup will apear with a list of codecs. Select &#8216;MPEG Layer 3&#8242; and select one of the output formats in the list at the right. Hit OK when done.</p>
<div id="attachment_271" class="wp-caption alignnone" style="width: 541px"><a href="http://www.sphere.ws/blog/wp-content/uploads/2010/01/vdub_acompresssion.jpg"><img class="size-full wp-image-271" title="VirtualDub Audio Compression Options" src="http://www.sphere.ws/blog/wp-content/uploads/2010/01/vdub_acompresssion.jpg" alt="VirtualDub Audio Compression Options" width="531" height="406" /></a><p class="wp-caption-text">VirtualDub Audio Compression Options</p></div>
<p>Now we can start converting the file.</p>
<p>Click File -&gt; Save as AVI&#8230; and start converting&#8230;</p>
<div id="attachment_272" class="wp-caption alignnone" style="width: 334px"><a href="http://www.sphere.ws/blog/wp-content/uploads/2010/01/video_convert2.jpg"><img class="size-full wp-image-272" title="video_convert2" src="http://www.sphere.ws/blog/wp-content/uploads/2010/01/video_convert2.jpg" alt="Result after converting" width="324" height="472" /></a><p class="wp-caption-text">Result after converting</p></div>
]]></content:encoded>
			<wfw:commentRss>http://www.sphere.ws/blog/?feed=rss2&#038;p=261</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Simple Minix 3 driver</title>
		<link>http://www.sphere.ws/blog/?p=259</link>
		<comments>http://www.sphere.ws/blog/?p=259#comments</comments>
		<pubDate>Fri, 25 Dec 2009 17:45:49 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[C]]></category>
		<category><![CDATA[Operating Systems]]></category>
		<category><![CDATA[projects]]></category>

		<guid isPermaLink="false">http://www.sphere.ws/blog/?p=259</guid>
		<description><![CDATA[I have made a simple driver for Minix 3 (Tested on Minix 3.1.4, should work on 3.1.5). This driver controls the caps lock led by writing: write a 0 to /dev/capslockled to turn it off and a 1 to turn it on. Note: this driver is not thread safe as it might interfere with the [...]]]></description>
			<content:encoded><![CDATA[<p>I have made a simple driver for Minix 3 (Tested on Minix 3.1.4, should work on 3.1.5).<br />
This driver controls the caps lock led by writing: write a 0 to /dev/capslockled to turn it off and a 1 to turn it on. Note: this driver is not thread safe as it might interfere with the TTY driver.</p>
<p>The driver can be downloaded <a href="http://www.rtminix3.org/capslockled/capslockled.tar">here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sphere.ws/blog/?feed=rss2&#038;p=259</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>OpenLaserFrag Base System PCB designs finished</title>
		<link>http://www.sphere.ws/blog/?p=249</link>
		<comments>http://www.sphere.ws/blog/?p=249#comments</comments>
		<pubDate>Fri, 25 Dec 2009 17:37:11 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[electronics]]></category>
		<category><![CDATA[OpenLaserFrag]]></category>
		<category><![CDATA[projects]]></category>

		<guid isPermaLink="false">http://www.sphere.ws/blog/?p=249</guid>
		<description><![CDATA[I have finished the designs for the OpenLaserFrag Base System modules. 20 set&#8217;s of PCB&#8217;s are ordered. The design files will be published as soon as the PCB&#8217;s arrive.]]></description>
			<content:encoded><![CDATA[<p>I have finished the designs for the OpenLaserFrag Base System modules.<br />
20 set&#8217;s of PCB&#8217;s are ordered.<br />
The design files will be published as soon as the PCB&#8217;s arrive.</p>
<p><a href="http://www.sphere.ws/blog/wp-content/uploads/2009/12/base_system.jpg"><img class="size-full wp-image-250 alignnone" title="base_system_small" src="http://www.sphere.ws/blog/wp-content/uploads/2009/12/base_system_small.jpg" alt="OpenLaserFrag Base System PCB's" width="400" height="277" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.sphere.ws/blog/?feed=rss2&#038;p=249</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>3.5&#8243; TFT module driven by XMOS processor</title>
		<link>http://www.sphere.ws/blog/?p=236</link>
		<comments>http://www.sphere.ws/blog/?p=236#comments</comments>
		<pubDate>Fri, 25 Dec 2009 17:22:36 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[electronics]]></category>
		<category><![CDATA[XMOS]]></category>

		<guid isPermaLink="false">http://www.sphere.ws/blog/?p=236</guid>
		<description><![CDATA[I have recently bought an 3.5&#8243; TFT module (18 bit, 262K colors) from ebay. The TFT display is mounted on a PCB with all data lines fanned out to 0.1&#8243; connectors. The display is (i think) a Crystalfontz CFAF320240F-T-TS (datasheet). The display has also a touchscreen. The PCB has a SPI touchscreen controller, SD card [...]]]></description>
			<content:encoded><![CDATA[<p>I have recently bought an 3.5&#8243; TFT module (18 bit, 262K colors) from ebay. The TFT display is mounted on a PCB with all data lines fanned out to 0.1&#8243; connectors. The display is (i think) a <a href="http://www.crystalfontz.com/product/CFAF320240F-T-TS.html">Crystalfontz CFAF320240F-T-TS</a> (<a href="http://www.sphere.ws/xmos/ssd2119/docs/CFAF320240FTTS.pdf">datasheet</a>). The display has also a touchscreen.<br />
The PCB has a SPI touchscreen controller, SD card holder and place to solder a SPI flash chip.<br />
The LCD controller is a <a href="http://www.sphere.ws/xmos/ssd2119/docs/SSD2119.pdf">Solomon SSD2119</a> chip.</p>
<p>You can interface the display using a parallel 8080-series bus using either 8 or 16 bits or SPI using 3 or 4 wires.<br />
This is limited by the PCB, the controller can also do 9/18 bit parallel 8080-series bus and 8/9/16/18 bit parallel 6800-series bus.</p>
<p>I have hooked this display up to my XMOS XC-1 development board and i am using the 16 bit 8080 interface.<br />
The controller starts up in 16 bit mode (65K colors). I am currently still using this mode as it is way more efficient than the 18 bit mode because i am using a 16 bit parallel bus. My initial code can refresh the display with about 50FPS. My code is nowhere near mature at the moment and i am planning to write a driver for it, which i will publish later.</p>
<p><a href="http://www.sphere.ws/xmos/ssd2119/ssd2119_test.jpg"><img src="http://www.sphere.ws/xmos/ssd2119/ssd2119_test_small.jpg" alt="color test" /></a></p>
<p><a href="http://www.sphere.ws/xmos/ssd2119/ssd2119_test2.jpg"><img src="http://www.sphere.ws/xmos/ssd2119/ssd2119_test2_small.jpg" alt="color test" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.sphere.ws/blog/?feed=rss2&#038;p=236</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Video playback on Nokia 6100 display</title>
		<link>http://www.sphere.ws/blog/?p=230</link>
		<comments>http://www.sphere.ws/blog/?p=230#comments</comments>
		<pubDate>Fri, 25 Dec 2009 16:48:09 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[electronics]]></category>
		<category><![CDATA[projects]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[XMOS]]></category>

		<guid isPermaLink="false">http://www.sphere.ws/blog/?p=230</guid>
		<description><![CDATA[Using a XMOS processor and a FTDI vinculum embedded USB host chip i have managed to play video on a nokia 6100 (knockoff) display with a frame rate of 16.66 FPS. Playing 2012 trailer at 16.66FPS (the RAW file was created for 12FPS and thus the movie plays a little bit too fast): Playing Family [...]]]></description>
			<content:encoded><![CDATA[<p>Using a <a href="http://www.xmos.com">XMOS</a> processor and a FTDI <a href="http://www.vinculum.com/">vinculum</a> embedded USB host chip i have managed to play video on a nokia 6100 (knockoff) display with a frame rate of 16.66 FPS.</p>
<p>Playing 2012 trailer at 16.66FPS (the RAW file was created for 12FPS and thus the movie plays a little bit too fast):<br />
<object width="425" height="344"><param name="movie" value="http://www.youtube.com/v/AO8yctCSUU0&#038;hl=en_US&#038;fs=1&#038;"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/AO8yctCSUU0&#038;hl=en_US&#038;fs=1&#038;" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="344"></embed></object></p>
<p>Playing Family Guy at 16.66FPS<br />
<object width="425" height="344"><param name="movie" value="http://www.youtube.com/v/vmKrLcJGlmI&#038;hl=en_US&#038;fs=1&#038;"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/vmKrLcJGlmI&#038;hl=en_US&#038;fs=1&#038;" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="344"></embed></object></p>
<p>I have <a href="http://www.jhepple.com/FramCap/FramCap.htm">converted</a> the video to still images and converted them to a 12 bit RAW format.<br />
The RAW file is uploaded to an USB stick with FAT16 file system.</p>
<p>The FTDI vinculum chip can reads from the USB stick and also implements the FAT16 file system, so the XMOS processor can easily open and read/write files without having to take care of the file system or USB stack.</p>
<p>The concept of the FTDI vinculum is very good, only the implementation could be a lot better.<br />
The vinculum chip is in fact just a microcontroller with special USB hardware and runs a firmware.<br />
There are several firmwares available for somewhat different functionality.</p>
<p>Unfortunately these firmwares (I only used the VDAP firmware though) aren&#8217;t that stable.<br />
For example the SPI interface seems to have a bug which makes it totally unusable.<br />
I have been able to read from the SPI interfaces but when i try to write to it the device locks up.<br />
How do i know that the device locks up? Normally if you remove or add an USB device (USB stick) it will write a message to the transfer buffer that can be read. However when it locks up it does not responds to removing/adding a device and you will not read any new data.</p>
<p>Luckily the chip has two more interfaces: UART and parallel.<br />
They both seem to work as expected. I have used the parallel interface because it can have higher transfer rates (The UART is limited to 3Mbit/sec).</p>
<p>Now the vinculum chip has two different protocols: a human optimized ASCII protocol (extended command set) and a machine optimized &#8216;binary&#8217; protocol (short command set). Unfortunately this machine optimized protocol isn&#8217;t that machine friendly at all and in fact is just a shortened ASCII protocol.</p>
<p>Unfortunately my code is nowhere near mature so i won&#8217;t publish it at this moment.<br />
Besides that the vinculum chips is limited to about 400KB/sec (good for 16FPS with 25KB RAW frames).<br />
I think a SD card will be a better solution to play video from a RAW format.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sphere.ws/blog/?feed=rss2&#038;p=230</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Nokia 6100 display driver (PCF8833 controller) for XMOS processors</title>
		<link>http://www.sphere.ws/blog/?p=226</link>
		<comments>http://www.sphere.ws/blog/?p=226#comments</comments>
		<pubDate>Fri, 25 Dec 2009 16:16:26 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[electronics]]></category>
		<category><![CDATA[projects]]></category>
		<category><![CDATA[software]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[XMOS]]></category>

		<guid isPermaLink="false">http://www.sphere.ws/blog/?p=226</guid>
		<description><![CDATA[I have created a driver for the Nokia 6100 (knockoff) display using the NXP PCF8833 controller. This driver is targeted at the XMOS processor architecture. This driver is largely based on Jamie P. Lynch&#8217;s driver. For more information and downloading the project see my project page on XCore Exchange, the community for XMOS processor enthusiasts.]]></description>
			<content:encoded><![CDATA[<p>I have created a driver for the Nokia 6100 (knockoff) display using the NXP PCF8833 controller.<br />
This driver is targeted at the <a href="http://www.xmos.com">XMOS</a> processor architecture.<br />
This driver is largely based on <a href="http://www.sphere.ws/xmos/nokia6100/Nokia_6100_LCD_Display_Driver.pdf">Jamie P. Lynch&#8217;s</a> driver.</p>
<p>For more information and downloading the project see my <a href="http://www.xcore.com/projects/nokia-6100-display-driver-pcf8833-controller">project page</a> on XCore Exchange, the community for XMOS processor enthusiasts.</p>
<p><object width="425" height="344"><param name="movie" value="http://www.youtube.com/v/-qipkPjkV0c&#038;hl=en_US&#038;fs=1&#038;"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/-qipkPjkV0c&#038;hl=en_US&#038;fs=1&#038;" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="344"></embed></object></p>
<p><a href="http://www.sphere.ws/xmos/nokia6100/demo.jpg"><img src="http://www.sphere.ws/xmos/nokia6100/demo_small.jpg" alt="Demo's" /></a></p>
<p><a href="http://www.sphere.ws/xmos/nokia6100/n6100_demo_12.jpg"><img src="http://www.sphere.ws/xmos/nokia6100/n6100_demo_12_small.jpg" alt="Color test" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.sphere.ws/blog/?feed=rss2&#038;p=226</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Real-time Minix 3</title>
		<link>http://www.sphere.ws/blog/?p=221</link>
		<comments>http://www.sphere.ws/blog/?p=221#comments</comments>
		<pubDate>Fri, 25 Dec 2009 15:20:00 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Operating Systems]]></category>
		<category><![CDATA[projects]]></category>
		<category><![CDATA[software]]></category>

		<guid isPermaLink="false">http://www.sphere.ws/blog/?p=221</guid>
		<description><![CDATA[I&#8217;ve been working on a real-time Minix 3 distribution as i have posted about a while ago. The results of this project can be found on the following website: rtminix3.org. In short the following was accomplished: Rate-Monotonic scheduling Earliest Deadline First scheduling Run-time switching of real-time scheduler Prioritized message passing Semaphores]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been working on a real-time <a href="http://www.minix3.org">Minix 3</a> distribution as i have <a href="http://www.sphere.ws/blog/?p=52">posted</a> about a while ago.</p>
<p>The results of this project can be found on the following website: <a href="http://www.rtminix3.org">rtminix3.org</a>.</p>
<p>In short the following was accomplished:</p>
<ul>
<li>Rate-Monotonic scheduling</li>
<li>Earliest Deadline First scheduling</li>
<li>Run-time switching of real-time scheduler</li>
<li>Prioritized message passing</li>
<li>Semaphores</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.sphere.ws/blog/?feed=rss2&#038;p=221</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Gyroscope as Human Interface Device</title>
		<link>http://www.sphere.ws/blog/?p=201</link>
		<comments>http://www.sphere.ws/blog/?p=201#comments</comments>
		<pubDate>Fri, 25 Dec 2009 00:26:30 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[electronics]]></category>
		<category><![CDATA[projects]]></category>

		<guid isPermaLink="false">http://www.sphere.ws/blog/?p=201</guid>
		<description><![CDATA[Intro For a small electronics contest (Dutch)  i&#8217;ve made a gyroscope based device that can interface with a PC as an USB HID keyboard. The intention is to use this device with your feets as extra input device for First Person Shooter games. Design Hardware I&#8217;ve used the Sure Electronics XV-3500CB gyroscope module. This module [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Intro</strong><br />
For a small <a href="http://gathering.tweakers.net/forum/list_messages/1360805">electronics contest</a> (Dutch)  i&#8217;ve made a gyroscope based device that can interface with a PC as an USB HID keyboard. The intention is to use this device with your feets as extra input device for First Person Shooter games.</p>
<p><strong>Design</strong></p>
<p><img src="http://www.sphere.ws/got/elcontests/200907_usbgyro/usbgyro_diagram.png" alt="Design" /></p>
<p><strong>Hardware</strong><br />
I&#8217;ve used the Sure Electronics <a href="http://www.sphere.ws/got/elcontests/200907_usbgyro/DC-SS010_Ver1.0_EN.pdf">XV-3500CB</a> gyroscope module. This module has both an analog output and an onboard ADC which has an I2C interface. I have only used the analog output but using the onboard ADC converter might be better (less noise).</p>
<p>I hooked this module up to an Atmel AVR ATmega8 microcontroller running at 12MHz.<br />
The analog output of the gyroscope module is connected to one of the ADC converter channels of the ATmega8. The ATmega8 has no USB interface. Instead of using a hardware USB interface i used a bit bang software USB stack. The PHY of this interface is just a few resistors and two zener diodes to keep the potential of the USB data lines under 3.6V (the microcontroller is USB powered and runs at 5V).</p>
<p>Schematics can be found <a href="http://www.sphere.ws/got/elcontests/200907_usbgyro/usbgyro.pdf">here</a>.</p>
<p><a href="http://www.sphere.ws/got/elcontests/200907_usbgyro/usbgyro1.jpg"><img src="http://www.sphere.ws/got/elcontests/200907_usbgyro/usbgyro1_small.jpg" alt="Gyroscope module and microcontroller" /></a></p>
<p><a href="http://www.sphere.ws/got/elcontests/200907_usbgyro/usbgyro2.jpg"><img src="http://www.sphere.ws/got/elcontests/200907_usbgyro/usbgyro2_small.jpg" alt="Gyroscope module and microcontroller" /></a></p>
<p><a href="http://www.sphere.ws/got/elcontests/200907_usbgyro/usbgyro3.jpg"><img src="http://www.sphere.ws/got/elcontests/200907_usbgyro/usbgyro3_small.jpg" alt="Gyroscope module and microcontroller" /></a></p>
<p><strong>Software</strong><br />
The firmware that runs on <a href="http://obdev.at/products/vusb/index.html">V-USB</a> a software USB stack for Atmel AVR microcontrollers. This software stack is only able to do USB 1.1 low speed (1.5mbit/s). This is not very fast but more than enough for sending some key strokes to the PC.</p>
<p>More specific my device is based on the <a href="http://www.obdev.at/products/vusb/hidkeys.html">HIDKeys</a> example project. This examples project takes input from 17 buttons and sends key strokes to the PC when the buttons are pressed. I modified this project to use results from the ADC (and thus the gyroscope) as input instead of buttons. If the gyroscope is moved to the left, a particular key stroke is send to the PC and the same happens for moving to the right. Due to the fact that the device emulates a keyboard it is very easy to use it in games. Just bind the two different keys that the device can send (left/right) to the functions in the game configuration!</p>
<p><strong>Demonstration</strong></p>
<p>The device shows up as USB HID device:<br />
<img src="http://www.sphere.ws/got/elcontests/200907_usbgyro/USBDeview.jpg" alt="USBDeview" /></p>
<p>Leaning in Medal of Honor: Allied Assault:<br />
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="425" height="344" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowFullScreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="src" value="http://www.youtube.com/v/eeULfmUGnB0&amp;hl=en_US&amp;fs=1&amp;" /><param name="allowfullscreen" value="true" /><embed type="application/x-shockwave-flash" width="425" height="344" src="http://www.youtube.com/v/eeULfmUGnB0&amp;hl=en_US&amp;fs=1&amp;" allowscriptaccess="always" allowfullscreen="true"></embed></object></p>
<p>Turning in Medal of Honor: Allied Assault:<br />
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="425" height="344" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowFullScreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="src" value="http://www.youtube.com/v/hfrFmKUWrnY&amp;hl=en_US&amp;fs=1&amp;" /><param name="allowfullscreen" value="true" /><embed type="application/x-shockwave-flash" width="425" height="344" src="http://www.youtube.com/v/hfrFmKUWrnY&amp;hl=en_US&amp;fs=1&amp;" allowscriptaccess="always" allowfullscreen="true"></embed></object></p>
<p>Look mom, without hands!<br />
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="425" height="344" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowFullScreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="src" value="http://www.youtube.com/v/Eqr9CX7oSF0&amp;hl=en_US&amp;fs=1&amp;" /><param name="allowfullscreen" value="true" /><embed type="application/x-shockwave-flash" width="425" height="344" src="http://www.youtube.com/v/Eqr9CX7oSF0&amp;hl=en_US&amp;fs=1&amp;" allowscriptaccess="always" allowfullscreen="true"></embed></object></p>
<p>Status LED&#8217;s:<br />
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="425" height="344" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowFullScreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="src" value="http://www.youtube.com/v/WFSlWuZswdg&amp;hl=en_US&amp;fs=1&amp;" /><param name="allowfullscreen" value="true" /><embed type="application/x-shockwave-flash" width="425" height="344" src="http://www.youtube.com/v/WFSlWuZswdg&amp;hl=en_US&amp;fs=1&amp;" allowscriptaccess="always" allowfullscreen="true"></embed></object></p>
<p><strong>Download</strong><br />
My project can be downloaded <a href="http://www.sphere.ws/got/elcontests/200907_usbgyro/USBGyro.zip">here</a> and used under the GPLv2 license.</p>
<p>The ZIP file contains the following:</p>
<ul>
<li>Schematic</li>
<li>Source code firmware</li>
<li>Hex file firmware</li>
<li>Altium Designer work files for schematic, PCB (not finished) and lib</li>
<li>Used datasheets</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.sphere.ws/blog/?feed=rss2&#038;p=201</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Salt water battery powerin Atmel AVR</title>
		<link>http://www.sphere.ws/blog/?p=193</link>
		<comments>http://www.sphere.ws/blog/?p=193#comments</comments>
		<pubDate>Mon, 07 Dec 2009 19:17:01 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[electronics]]></category>
		<category><![CDATA[projects]]></category>

		<guid isPermaLink="false">http://www.sphere.ws/blog/?p=193</guid>
		<description><![CDATA[For a small electronics contest i made a salt water battery (Dutch). To demonstrate the battery i used an Atmel ATtiney2313 which blinks a LED. I&#8217;ve also tried to use a NE555 based blink-a-led, unfortunately the NE555 drew too much current. The salt water battery has 18 cells and i used copper and alluminium electrodes. [...]]]></description>
			<content:encoded><![CDATA[<p>For a small electronics contest i made a <a href="http://gathering.tweakers.net/forum/list_message/32133145">salt water battery</a> (Dutch). To demonstrate the battery i used an Atmel ATtiney2313 which blinks a LED. I&#8217;ve also tried to use a NE555 based blink-a-led, unfortunately the NE555 drew too much current.</p>
<p>The salt water battery has 18 cells and i used copper and alluminium electrodes. The copper electrodes are made of desolder wick and the alluminium electrodes are alluminium foil.</p>
<div class="wp-caption alignnone" style="width: 460px"><a href="http://www.sphere.ws/got/elcontests/200906_saltwaterbattery/system.png"><img title="Setup" src="http://www.sphere.ws/got/elcontests/200906_saltwaterbattery/system_small.jpg" alt="Setup of the expiriment" width="450" height="619" /></a><p class="wp-caption-text">Setup of the expiriment</p></div>
<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="425" height="344" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowFullScreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="src" value="http://www.youtube.com/v/CjAVV6rz-mI&amp;hl=en_US&amp;fs=1&amp;" /><param name="allowfullscreen" value="true" /><embed type="application/x-shockwave-flash" width="425" height="344" src="http://www.youtube.com/v/CjAVV6rz-mI&amp;hl=en_US&amp;fs=1&amp;" allowscriptaccess="always" allowfullscreen="true"></embed></object></p>
]]></content:encoded>
			<wfw:commentRss>http://www.sphere.ws/blog/?feed=rss2&#038;p=193</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

