<?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>ElectroSizzle.com &#187; Hardware</title>
	<atom:link href="http://www.electrosizzle.com/category/hardware/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.electrosizzle.com</link>
	<description>No one reads your blog...</description>
	<lastBuildDate>Tue, 29 Nov 2011 03:11:31 +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>Review of Bitwise System&#8217;s QuickUSB 2.0 Module</title>
		<link>http://www.electrosizzle.com/2008/05/review-of-bitwise-systems-quickusb-20-module/</link>
		<comments>http://www.electrosizzle.com/2008/05/review-of-bitwise-systems-quickusb-20-module/#comments</comments>
		<pubDate>Wed, 14 May 2008 03:01:50 +0000</pubDate>
		<dc:creator>TheSizzle</dc:creator>
				<category><![CDATA[Hardware]]></category>
		<category><![CDATA[USB]]></category>
		<category><![CDATA[2.0]]></category>
		<category><![CDATA[c#]]></category>
		<category><![CDATA[quickusb]]></category>
		<category><![CDATA[review]]></category>
		<category><![CDATA[usb]]></category>

		<guid isPermaLink="false">http://www.electrosizzle.com/?p=5</guid>
		<description><![CDATA[I&#8217;ve been working on a project for about a year which requires a high speed digital data link between a GUI (running on a generic windows computer) and an Altera Cyclone II FPGA. I wanted to implement this link with a high-speed USB 2.0 connection, a hardware task I was sure I could undertake. However, [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been working on a project for about a year which requires a high speed digital data link between a GUI (running on a generic windows computer) and an Altera Cyclone II FPGA.  I wanted to implement this link with a high-speed USB 2.0 connection, a hardware task I was sure I could undertake.  However, I didn&#8217;t want to spend a whole lot of time writing windows USB drivers and implementing the USB standard in an FPGA.  Enter the Bitwise Systems <a href="http://www.quickusb.net/store/" target="_blank">QuickUSB 2.0 Module</a>.</p>
<p><span id="more-5"></span></p>
<p>The module is available for $150 and offers a wealth of features.  The module implements a high-speed USB 2.0 connection using the Cypress EZ-USB FX2LP microcontroller.  The microcontroller provides a 16-bit bi-directional data port synchronized to an onboard 48MHz clock.  An optional auto-incrementing address bus is also available.  This makes it extremely easy to connect the QuickUSB module to a RAM block in an FPGA for simple data transfers.  Additionally, the pins on the Cypress microcontroller which are not used for the data bus can be configured on a pin-by-pin basis as basic I/O.</p>
<p>The two most important features which separated the QuickUSB from other solutions during the planning stages of the project were the availability of a complete programming API and the ability to program an Altera FPGA using passive serial.  The programming API (when the project was started, and I believe this is still accurate) is available for the windows platform in C (as well as other languages in the documentation), but I was interested in creating a graphical user interface in C#.  While the QuickUSB API I used was written in C, I was able to marshal just about all of the functions available in the library into managed C# code.  Three examples of how this works are given below.  I&#8217;m not a great programmer, but I had some help from a <a href="http://www.thevalerios.net/matt/">friend</a>.</p>

<div class="wp_syntax"><div class="code"><pre class="csharp" style="font-family:monospace;"><span style="color: #008080; font-style: italic;">//extern int WINAPI QuickUsbOpen( HANDLE *hDevice, char *deviceName );</span>
<span style="color: #008000;">&#91;</span>DllImport<span style="color: #008000;">&#40;</span><span style="color: #666666;">&quot;QuickUsb.dll&quot;</span>, EntryPoint <span style="color: #008000;">=</span> <span style="color: #666666;">&quot;QuickUsbOpen&quot;</span>, ExactSpelling <span style="color: #008000;">=</span> <span style="color: #0600FF; font-weight: bold;">false</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">&#93;</span>
<span style="color: #0600FF; font-weight: bold;">internal</span> <span style="color: #0600FF; font-weight: bold;">static</span> <span style="color: #0600FF; font-weight: bold;">extern</span> <span style="color: #6666cc; font-weight: bold;">int</span> QuickUsbOpen<span style="color: #008000;">&#40;</span> <span style="color: #0600FF; font-weight: bold;">out</span> IntPtr hDevice, <span style="color: #008000;">&#91;</span>MarshalAs<span style="color: #008000;">&#40;</span>UnmanagedType<span style="color: #008000;">.</span><span style="color: #0000FF;">LPArray</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">&#93;</span> <span style="color: #6666cc; font-weight: bold;">Byte</span><span style="color: #008000;">&#91;</span><span style="color: #008000;">&#93;</span> devName <span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
&nbsp;
<span style="color: #008080; font-style: italic;">//extern int WINAPI QuickUsbClose( HANDLE hDevice );</span>
<span style="color: #008000;">&#91;</span>DllImport<span style="color: #008000;">&#40;</span><span style="color: #666666;">&quot;QuickUsb.dll&quot;</span>, EntryPoint <span style="color: #008000;">=</span> <span style="color: #666666;">&quot;QuickUsbClose&quot;</span>, ExactSpelling <span style="color: #008000;">=</span> <span style="color: #0600FF; font-weight: bold;">false</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">&#93;</span>
<span style="color: #0600FF; font-weight: bold;">internal</span> <span style="color: #0600FF; font-weight: bold;">static</span> <span style="color: #0600FF; font-weight: bold;">extern</span> <span style="color: #6666cc; font-weight: bold;">int</span> QuickUsbClose<span style="color: #008000;">&#40;</span> IntPtr hDevice <span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
&nbsp;
<span style="color: #008080; font-style: italic;">//extern int WINAPI QuickUsbReadData( HANDLE hDevice, unsigned char *data, unsigned long *length );</span>
<span style="color: #008000;">&#91;</span>DllImport<span style="color: #008000;">&#40;</span><span style="color: #666666;">&quot;QuickUsb.dll&quot;</span>, EntryPoint <span style="color: #008000;">=</span> <span style="color: #666666;">&quot;QuickUsbReadData&quot;</span>, ExactSpelling <span style="color: #008000;">=</span> <span style="color: #0600FF; font-weight: bold;">false</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">&#93;</span>
<span style="color: #0600FF; font-weight: bold;">internal</span> <span style="color: #0600FF; font-weight: bold;">static</span> <span style="color: #0600FF; font-weight: bold;">extern</span> <span style="color: #6666cc; font-weight: bold;">int</span> QuickUsbReadData<span style="color: #008000;">&#40;</span> IntPtr hDevice, <span style="color: #008000;">&#91;</span>MarshalAs<span style="color: #008000;">&#40;</span>UnmanagedType<span style="color: #008000;">.</span><span style="color: #0000FF;">LPArray</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">&#93;</span> UInt16<span style="color: #008000;">&#91;</span><span style="color: #008000;">&#93;</span> data, <span style="color: #008000;">&#91;</span>MarshalAs<span style="color: #008000;">&#40;</span>UnmanagedType<span style="color: #008000;">.</span><span style="color: #0000FF;">LPArray</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">&#93;</span> UInt32<span style="color: #008000;">&#91;</span><span style="color: #008000;">&#93;</span> length <span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span></pre></div></div>

<p>By creating a wrapper for the QuickUSB library, I was able to write a C# GUI for my application in managed code.  On the other end of the USB cable, I used Altium Designer to lay out a printed circuit board with an Altera Cyclone II FPGA and the connector required for the QuickUSB module.  A footprint and schematic library are available from Bitwise Systems to simplify this process.  The finished PCB with and without the module is show below.</p>

<div class="ngg-galleryoverview" id="ngg-gallery-1-5">


	
	<!-- Thumbnails -->
		
	<div id="ngg-image-1" class="ngg-gallery-thumbnail-box"  >
		<div class="ngg-gallery-thumbnail" >
			<a href="http://www.electrosizzle.com/wp-content/gallery/quickusb/unpop.jpg" title="Unpopulated QuickUSB mounting point." class="highslide" onclick="return hs.expand(this, { slideshowGroup: 'set_1' })" >
								<img title="Unpopulated QuickUSB mounting point." alt="Unpopulated QuickUSB mounting point." src="http://www.electrosizzle.com/wp-content/gallery/quickusb/thumbs/thumbs_unpop.jpg"  />
							</a>
		</div>
	</div>
	
		
 		
	<div id="ngg-image-2" class="ngg-gallery-thumbnail-box"  >
		<div class="ngg-gallery-thumbnail" >
			<a href="http://www.electrosizzle.com/wp-content/gallery/quickusb/pop.jpg" title="QuickUSB module mounted on PCB." class="highslide" onclick="return hs.expand(this, { slideshowGroup: 'set_1' })" >
								<img title="QuickUSB module mounted on PCB." alt="QuickUSB module mounted on PCB." src="http://www.electrosizzle.com/wp-content/gallery/quickusb/thumbs/thumbs_pop.jpg"  />
							</a>
		</div>
	</div>
	
		
 	 	
	<!-- Pagination -->
 	<div class='ngg-clear'></div>
 	
</div>


<p>Using this setup, I was able to easily implement some RAM blocks in the FPGA which I could read from and write data to in a very convenient manner.  Using the library in managed code also works flawlessly with no detectable loss of functionality.  After playing with this thing for a couple of months, I&#8217;ve come up with the following lists of Pros and Cons which I believe are fairly important.</p>
<p><strong>Pros:</strong></p>
<ol>
<li>The QuickUSB module contains all the hardware necessary to implement the high speed USB 2.0 link in a small, complete package.</li>
<li>All of the analog layout required for the USB link is already done for you.</li>
<li>All of the embedded programming in the Cypress microcontroller needed to implement the USB endpoints and 2.0 specification is already done.</li>
<li>The library is easy to use and can be ported to managed code for .NET 2.0</li>
<li>Bitwise Systems provides a schematic and footprint library for a few different types of PCB layout software simplifying host board design.</li>
<li>The ability to program Altera and Xilinx FPGAs over USB is a great feature.</li>
<li>No windows USB l33t driver writing skills are required.</li>
</ol>
<p><strong>Cons:</strong></p>
<ol>
<li>It costs $150, which could be prohibitively expensive for hobbyists.</li>
<li>The library implements minimal error reporting.  Basically, it either worked or it didn&#8217;t.</li>
<li>This one was a big one for me:  If the computer is hibernated, on return from hibernation, the QuickUSB device would have to be physically unplugged and plugged back in for it to work.</li>
</ol>
<p>If you can afford the $150 pricetag, the module really does work as advertised.  It is capable of extremely high data transfer speeds (in a quick test, I was measuring about 20MB/s just transferring a counter value from the FPGA as quickly as possible), and the general purpose I/O pins which are controllable over USB are also very useful.  The ability to program an FPGA over USB means you don&#8217;t necessarily have to include eeprom on your PCB  for RAM-based FPGAs if you don&#8217;t want to.  A tough one for me was the hibernation issue though.  My project is battery-powered and relies on putting the computer into hibernation.  I found that if I could unload all classes which used the QuickUSB library, I could programatically disable the device in the windows hardware device manager, and then reenable the device upon return from hibernation.  This is a major pain in the neck though, and shouldn&#8217;t be necessary since just about every USB device I&#8217;ve ever owned works just fine after hibernation.  Hopefully they&#8217;ll release an update to their library and everything will just work in the future.</p>
<div class='bookmarkify'><a name='bookmarkify'></a><div class='linkbuttons'><a href='http://del.icio.us/post?url=http://www.electrosizzle.com/2008/05/review-of-bitwise-systems-quickusb-20-module/&amp;title=Review of Bitwise System&#8217;s QuickUSB 2.0 Module' title='Save to del.icio.us' onclick='target="_blank";' rel='nofollow'><img src='http://www.electrosizzle.com/wp-content/plugins/bookmarkify/delicious.png' style='width:16px; height:16px;' alt='[del.icio.us] ' /></a> <a href='http://digg.com/submit?phase=2&amp;url=http://www.electrosizzle.com/2008/05/review-of-bitwise-systems-quickusb-20-module/&amp;title=Review of Bitwise System&#8217;s QuickUSB 2.0 Module' title='Digg It!' onclick='target="_blank";' rel='nofollow'><img src='http://www.electrosizzle.com/wp-content/plugins/bookmarkify/digg.png' style='width:16px; height:16px;' alt='[Digg] ' /></a> <a href='http://www.facebook.com/share.php?u=http://www.electrosizzle.com/2008/05/review-of-bitwise-systems-quickusb-20-module/' title='Save to Facebook' onclick='target="_blank";' rel='nofollow'><img src='http://www.electrosizzle.com/wp-content/plugins/bookmarkify/facebook.png' style='width:16px; height:16px;' alt='[Facebook] ' /></a> <a href='http://www.furl.net/storeIt.jsp?u=http://www.electrosizzle.com/2008/05/review-of-bitwise-systems-quickusb-20-module/&amp;t=Review of Bitwise System&#8217;s QuickUSB 2.0 Module' title='Save to Furl' onclick='target="_blank";' rel='nofollow'><img src='http://www.electrosizzle.com/wp-content/plugins/bookmarkify/furl.png' style='width:16px; height:16px;' alt='[Furl] ' /></a> <a href='http://www.google.com/bookmarks/mark?op=edit&amp;output=popup&amp;bkmk=http://www.electrosizzle.com/2008/05/review-of-bitwise-systems-quickusb-20-module/&amp;title=Review of Bitwise System&#8217;s QuickUSB 2.0 Module' title='Save to Google Bookmarks' onclick='target="_blank";' rel='nofollow'><img src='http://www.electrosizzle.com/wp-content/plugins/bookmarkify/google.png' style='width:16px; height:16px;' alt='[Google] ' /></a> <a href='http://slashdot.org/bookmark.pl?url=http://www.electrosizzle.com/2008/05/review-of-bitwise-systems-quickusb-20-module/&amp;title=Review of Bitwise System&#8217;s QuickUSB 2.0 Module' title='Slashdot It!' onclick='target="_blank";' rel='nofollow'><img src='http://www.electrosizzle.com/wp-content/plugins/bookmarkify/slashdot.png' style='width:16px; height:16px;' alt='[Slashdot] ' /></a> <a href='http://technorati.com/faves?add=http://www.electrosizzle.com/2008/05/review-of-bitwise-systems-quickusb-20-module/' title='Add to my Technorati Favorites' onclick='target="_blank";' rel='nofollow'><img src='http://www.electrosizzle.com/wp-content/plugins/bookmarkify/technorati.png' style='width:16px; height:16px;' alt='[Technorati] ' /></a> <a href='http://bookmarks.yahoo.com/toolbar/savebm?opener=tb&amp;u=http://www.electrosizzle.com/2008/05/review-of-bitwise-systems-quickusb-20-module/&amp;t=Review of Bitwise System&#8217;s QuickUSB 2.0 Module' title='Save to Yahoo! Bookmarks' onclick='target="_blank";' rel='nofollow'><img src='http://www.electrosizzle.com/wp-content/plugins/bookmarkify/yahoo.png' style='width:16px; height:16px;' alt='[Yahoo!] ' /></a> <a href='http://www.feedburner.com/fb/a/emailFlare?itemTitle=Review of Bitwise System&#8217;s QuickUSB 2.0 Module&amp;uri=http://www.electrosizzle.com/2008/05/review-of-bitwise-systems-quickusb-20-module/&amp;loc=en_US' title='Email this to a friend' onclick='target="_blank";' rel='nofollow'><img src='http://www.electrosizzle.com/wp-content/plugins/bookmarkify/email.png' style='width:16px; height:16px;' alt='[Email] ' /></a> </div></div>]]></content:encoded>
			<wfw:commentRss>http://www.electrosizzle.com/2008/05/review-of-bitwise-systems-quickusb-20-module/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
	</channel>
</rss>

