<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Hack a Day &#187; bus</title>
	<atom:link href="http://hackaday.com/tag/bus/feed/" rel="self" type="application/rss+xml" />
	<link>http://hackaday.com</link>
	<description>Fresh hacks every day</description>
	<lastBuildDate>Fri, 10 Feb 2012 06:18:04 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='hackaday.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://1.gravatar.com/blavatar/5560f98f805877b0e332f191cb9e0af3?s=96&#038;d=http%3A%2F%2Fs2.wp.com%2Fi%2Fbuttonw-com.png</url>
		<title>Hack a Day &#187; bus</title>
		<link>http://hackaday.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://hackaday.com/osd.xml" title="Hack a Day" />
	<atom:link rel='hub' href='http://hackaday.com/?pushpress=hub'/>
		<item>
		<title>Adding persistent memory and Ethernet to vintage arcade machines</title>
		<link>http://hackaday.com/2011/05/27/adding-persistent-memory-and-ethernet-to-vintage-arcade-machines/</link>
		<comments>http://hackaday.com/2011/05/27/adding-persistent-memory-and-ethernet-to-vintage-arcade-machines/#comments</comments>
		<pubDate>Fri, 27 May 2011 13:08:41 +0000</pubDate>
		<dc:creator>Mike Nathan</dc:creator>
				<category><![CDATA[classic hacks]]></category>
		<category><![CDATA[news]]></category>
		<category><![CDATA[arcade]]></category>
		<category><![CDATA[AVR]]></category>
		<category><![CDATA[bus]]></category>
		<category><![CDATA[ethernet]]></category>
		<category><![CDATA[tcpip]]></category>
		<category><![CDATA[video games]]></category>
		<category><![CDATA[z80]]></category>

		<guid isPermaLink="false">http://hackaday.com/?p=43850</guid>
		<description><![CDATA[If you are a frequent reader, you are undoubtedly familiar with hacker [Sprite_tm]. He has been working with fellow members of the TkkrLab hackerspace to get things ready for their official grand opening on May 28th, and wrote in to share a project he recently completed to kick things off. As part of their preparations, [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hackaday.com&amp;blog=4779443&amp;post=43850&amp;subd=hackadaycom&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><img class="alignnone size-full wp-image-43851" title="z80_bus_tapper" src="http://hackadaycom.files.wordpress.com/2011/05/z80_bus_tapper.jpg" alt="z80_bus_tapper" width="470" height="332" /></p>
<p>If you are a frequent reader, you are undoubtedly familiar with hacker [Sprite_tm]. He has been working with fellow members of the TkkrLab hackerspace to get things ready for their official grand opening on May 28th, and wrote in to share <a href="http://spritesmods.com/?art=twitter1943&amp;amp;f=had" target="_blank">a project he recently completed to kick things off</a>.</p>
<p>As part of their preparations, they have been stocking the joint with all sorts of hacker-friendly goodies including plenty of tools and Club Mate, as well as a vintage ‘1943’ arcade cabinet. The game is a group favorite, though every time the power is turned off, it loses all of the hard-earned high scores. [Sprite_tm] knew he could improve on the current paper-based score register, so he pulled the machine open to see what could be done.</p>
<p>He used an AVR to tap into the machine’s Z80 logic board, allowing him to read and write to the entirety of the game’s RAM whenever he pleased. This enabled him to keep tabs on the high scores, restoring them to memory whenever the machine is powered back on. The addition of the AVR also allowed him to add a TCP/IP interface, which is used to send high scores to Twitter whenever someone beats the previous record.</p>
<p>His modular bus tap can be used in all sorts of Z80-based hardware, so if you have some vintage equipment laying around, be sure to swing by his site for a more detailed look at the build process.</p>
<br />Filed under: <a href='http://hackaday.com/category/classic-hacks/'>classic hacks</a>, <a href='http://hackaday.com/category/news/'>news</a>  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/hackadaycom.wordpress.com/43850/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/hackadaycom.wordpress.com/43850/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/hackadaycom.wordpress.com/43850/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/hackadaycom.wordpress.com/43850/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/hackadaycom.wordpress.com/43850/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/hackadaycom.wordpress.com/43850/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/hackadaycom.wordpress.com/43850/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/hackadaycom.wordpress.com/43850/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/hackadaycom.wordpress.com/43850/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/hackadaycom.wordpress.com/43850/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/hackadaycom.wordpress.com/43850/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/hackadaycom.wordpress.com/43850/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/hackadaycom.wordpress.com/43850/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/hackadaycom.wordpress.com/43850/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hackaday.com&amp;blog=4779443&amp;post=43850&amp;subd=hackadaycom&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://hackaday.com/2011/05/27/adding-persistent-memory-and-ethernet-to-vintage-arcade-machines/feed/</wfw:commentRss>
		<slash:comments>13</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">mikenathanathackaday</media:title>
		</media:content>

		<media:content url="http://hackadaycom.files.wordpress.com/2011/05/z80_bus_tapper.jpg" medium="image">
			<media:title type="html">z80_bus_tapper</media:title>
		</media:content>
	</item>
		<item>
		<title>IDE bus sniffing and hard drive password recovery</title>
		<link>http://hackaday.com/2011/04/28/ide-bus-sniffing-and-hard-drive-password-recovery/</link>
		<comments>http://hackaday.com/2011/04/28/ide-bus-sniffing-and-hard-drive-password-recovery/#comments</comments>
		<pubDate>Thu, 28 Apr 2011 13:04:00 +0000</pubDate>
		<dc:creator>Mike Nathan</dc:creator>
				<category><![CDATA[pcs hacks]]></category>
		<category><![CDATA[security hacks]]></category>
		<category><![CDATA[bus]]></category>
		<category><![CDATA[hard drive]]></category>
		<category><![CDATA[ide]]></category>
		<category><![CDATA[openbench]]></category>
		<category><![CDATA[password]]></category>
		<category><![CDATA[recovery]]></category>
		<category><![CDATA[sniffing]]></category>

		<guid isPermaLink="false">http://hackaday.com/?p=41670</guid>
		<description><![CDATA[shackspace member [@dop3j0e] found himself in a real bind when trying to recover some data after his ThinkPad’s fingerprint scanner died. You see, he stored his hard drive password in the scanner, and over time completely forgot what it was. Once the scanner stopped working, he had no way to get at his data. He [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hackaday.com&amp;blog=4779443&amp;post=41670&amp;subd=hackadaycom&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><img class="alignnone size-full wp-image-41672" title="hdd_password_recovery" src="http://hackadaycom.files.wordpress.com/2011/04/hdd_password_recovery.jpg" alt="hdd_password_recovery" width="470" height="251" /></p>
<p>shackspace member [@dop3j0e] <a href="http://shackspace.de/?p=1976" target="_blank">found himself in a real bind when trying to recover some data after his ThinkPad’s fingerprint scanner died</a>. You see, he stored his hard drive password in the scanner, and over time completely forgot what it was. Once the scanner stopped working, he had no way to get at his data.</p>
<p>He brainstormed, trying to figure out the best way to recover his data. He considered reverse engineering the BIOS, which was an interesting exercise, but it did not yield any password data. He also thought about swapping the hard drive’s logic board with that of a similar drive, but it turns out that the password is stored on the platters, not the PCB.</p>
<p>With his options quickly running out, he turned to <a href="http://hackaday.com/2010/02/28/open-source-logic-analyzer-2/" target="_blank">a piece of open-source hardware we&#8217;ve covered here in the past</a>, the OpenBench Logic Sniffer. The IDE bus contains 16 data pins, and lucky for [@dop3j0e] the OpenBench has 16 5v pins as well &#8211; a perfect match. He wired the sniffer up to the laptop and booted the computer, watching SUMP for the unlock command to be issued. Sure enough he captured the password with ease, after which he unlocked and permanently removed it using hdparm.</p>
<p>Be sure to check out <a href="http://prezi.com/k1xduox30soj/open-sesame/" target="_blank">[@dop3j0e's] presentation on the subject</a> if you are interested in learning more about how the recovery was done.</p>
<br />Filed under: <a href='http://hackaday.com/category/pcs-hacks/'>pcs hacks</a>, <a href='http://hackaday.com/category/security-hacks/'>security hacks</a>  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/hackadaycom.wordpress.com/41670/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/hackadaycom.wordpress.com/41670/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/hackadaycom.wordpress.com/41670/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/hackadaycom.wordpress.com/41670/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/hackadaycom.wordpress.com/41670/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/hackadaycom.wordpress.com/41670/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/hackadaycom.wordpress.com/41670/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/hackadaycom.wordpress.com/41670/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/hackadaycom.wordpress.com/41670/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/hackadaycom.wordpress.com/41670/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/hackadaycom.wordpress.com/41670/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/hackadaycom.wordpress.com/41670/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/hackadaycom.wordpress.com/41670/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/hackadaycom.wordpress.com/41670/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hackaday.com&amp;blog=4779443&amp;post=41670&amp;subd=hackadaycom&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://hackaday.com/2011/04/28/ide-bus-sniffing-and-hard-drive-password-recovery/feed/</wfw:commentRss>
		<slash:comments>33</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">mikenathanathackaday</media:title>
		</media:content>

		<media:content url="http://hackadaycom.files.wordpress.com/2011/04/hdd_password_recovery.jpg" medium="image">
			<media:title type="html">hdd_password_recovery</media:title>
		</media:content>
	</item>
		<item>
		<title>Public transportation notifier</title>
		<link>http://hackaday.com/2010/04/12/public-transportation-notifier/</link>
		<comments>http://hackaday.com/2010/04/12/public-transportation-notifier/#comments</comments>
		<pubDate>Mon, 12 Apr 2010 19:42:47 +0000</pubDate>
		<dc:creator>Mike Szczys</dc:creator>
				<category><![CDATA[transportation hacks]]></category>
		<category><![CDATA[arduino]]></category>
		<category><![CDATA[bus]]></category>
		<category><![CDATA[public transportation]]></category>
		<category><![CDATA[twitter]]></category>

		<guid isPermaLink="false">http://hackaday.com/?p=23169</guid>
		<description><![CDATA[[Knuckles904] was tired of waiting for the bus. His town had installed GPS units on the buses so that riders could track their locations via the Internet so he knew there should be a way to avoid the wait while also never missing the bus. He developed a sketch for an Arduino to check the [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hackaday.com&amp;blog=4779443&amp;post=23169&amp;subd=hackadaycom&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><img class="alignnone size-full wp-image-23170" title="bus-notifier" src="http://hackadaycom.files.wordpress.com/2010/04/bus-notifier.jpg" alt="" width="470" height="402" /></p>
<p>[Knuckles904] was tired of waiting for the bus. His town had installed GPS units on the buses so that riders could track their locations via the Internet so he knew there should be a way to avoid the wait while also never missing the bus. He developed a sketch for <a href="http://randomhacksofboredom.blogspot.com/2010/04/most-useful-mess-of-wires-gps-bus.html">an Arduino to check the bus location</a> and notify him when it was on its way.</p>
<p>This method saves him from leaving his computer running. It parses the text data from the public transportation website and updates both an LED display, as well as a Twitter feed. Now he can monitor several different bus lines via the hardware at home, or though a cell phone if he&#8217;s on the go.</p>
<br />Filed under: <a href='http://hackaday.com/category/transportation-hacks/'>transportation hacks</a>  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/hackadaycom.wordpress.com/23169/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/hackadaycom.wordpress.com/23169/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/hackadaycom.wordpress.com/23169/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/hackadaycom.wordpress.com/23169/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/hackadaycom.wordpress.com/23169/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/hackadaycom.wordpress.com/23169/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/hackadaycom.wordpress.com/23169/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/hackadaycom.wordpress.com/23169/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/hackadaycom.wordpress.com/23169/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/hackadaycom.wordpress.com/23169/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/hackadaycom.wordpress.com/23169/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/hackadaycom.wordpress.com/23169/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/hackadaycom.wordpress.com/23169/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/hackadaycom.wordpress.com/23169/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hackaday.com&amp;blog=4779443&amp;post=23169&amp;subd=hackadaycom&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://hackaday.com/2010/04/12/public-transportation-notifier/feed/</wfw:commentRss>
		<slash:comments>29</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">Mike Szczys</media:title>
		</media:content>

		<media:content url="http://hackadaycom.files.wordpress.com/2010/04/bus-notifier.jpg" medium="image">
			<media:title type="html">bus-notifier</media:title>
		</media:content>
	</item>
		<item>
		<title>Visual hardware identification guide</title>
		<link>http://hackaday.com/2009/07/18/visual-hardware-identification-guide/</link>
		<comments>http://hackaday.com/2009/07/18/visual-hardware-identification-guide/#comments</comments>
		<pubDate>Sat, 18 Jul 2009 19:51:14 +0000</pubDate>
		<dc:creator>Eliot</dc:creator>
				<category><![CDATA[pcs hacks]]></category>
		<category><![CDATA[tool hacks]]></category>
		<category><![CDATA[bus]]></category>
		<category><![CDATA[computer hardware]]></category>
		<category><![CDATA[cpu]]></category>
		<category><![CDATA[deviantart]]></category>
		<category><![CDATA[gizmodo]]></category>
		<category><![CDATA[isa]]></category>
		<category><![CDATA[memory]]></category>
		<category><![CDATA[pci]]></category>
		<category><![CDATA[ram]]></category>
		<category><![CDATA[socket]]></category>
		<category><![CDATA[sonic840]]></category>

		<guid isPermaLink="false">http://hackaday.com/?p=12806</guid>
		<description><![CDATA[Check out this visual hardware guide from deviantART member [Sonic840]. It has everything from memory modules, to bus sockets, to power connectors, to an entire array of CPU sockets that have been used over the years. You&#8217;re bound to see something in there you didn&#8217;t know existed. [via Gizmodo] Posted in pcs hacks, tool hacks<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hackaday.com&amp;blog=4779443&amp;post=12806&amp;subd=hackadaycom&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><img class="alignnone size-full wp-image-12807" title="hardwareguide" src="http://hackadaycom.files.wordpress.com/2009/07/hardwareguide.jpg" alt="hardwareguide" width="470" height="665" /></p>
<p>Check out this <a href="http://sonic840.deviantart.com/art/Computer-hardware-poster-1-7-111402099">visual hardware guide</a> from deviantART member [Sonic840]. It has everything from memory modules, to bus sockets, to power connectors, to an entire array of CPU sockets that have been used over the years. You&#8217;re bound to see something in there you didn&#8217;t know existed.</p>
<p>[via <a href="http://gizmodo.com/5317642/a-pictorial-guide-to-computer-hardware">Gizmodo</a>]</p>
<br />Posted in pcs hacks, tool hacks  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/hackadaycom.wordpress.com/12806/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/hackadaycom.wordpress.com/12806/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/hackadaycom.wordpress.com/12806/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/hackadaycom.wordpress.com/12806/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/hackadaycom.wordpress.com/12806/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/hackadaycom.wordpress.com/12806/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/hackadaycom.wordpress.com/12806/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/hackadaycom.wordpress.com/12806/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/hackadaycom.wordpress.com/12806/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/hackadaycom.wordpress.com/12806/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/hackadaycom.wordpress.com/12806/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/hackadaycom.wordpress.com/12806/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/hackadaycom.wordpress.com/12806/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/hackadaycom.wordpress.com/12806/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hackaday.com&amp;blog=4779443&amp;post=12806&amp;subd=hackadaycom&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://hackaday.com/2009/07/18/visual-hardware-identification-guide/feed/</wfw:commentRss>
		<slash:comments>32</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">RobotSkirts</media:title>
		</media:content>

		<media:content url="http://hackadaycom.files.wordpress.com/2009/07/hardwareguide.jpg" medium="image">
			<media:title type="html">hardwareguide</media:title>
		</media:content>
	</item>
		<item>
		<title>Electric VW mobile photobooth</title>
		<link>http://hackaday.com/2009/05/30/electric-vw-mobile-photobooth/</link>
		<comments>http://hackaday.com/2009/05/30/electric-vw-mobile-photobooth/#comments</comments>
		<pubDate>Sat, 30 May 2009 21:30:28 +0000</pubDate>
		<dc:creator>Eliot</dc:creator>
				<category><![CDATA[digital cameras hacks]]></category>
		<category><![CDATA[transportation hacks]]></category>
		<category><![CDATA[bus]]></category>
		<category><![CDATA[electric vehicle]]></category>
		<category><![CDATA[ev]]></category>
		<category><![CDATA[hi-torque electric]]></category>
		<category><![CDATA[sorn coughlin-glaser]]></category>
		<category><![CDATA[volkswagen]]></category>
		<category><![CDATA[vw]]></category>
		<category><![CDATA[vw bus]]></category>

		<guid isPermaLink="false">http://hackaday.com/?p=11338</guid>
		<description><![CDATA[[Soren Coughlin-Glaser] runs a mobile photobooth in the Portland area. It&#8217;s built inside of an electric Volkswagen bus. The conversion to electric hasn&#8217;t been easy though. He&#8217;s spent most of the last few months rebuilding it after an electrical fire. Last fall he installed a 9 inch electric motor from Hi-Torque Electric after his smaller [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hackaday.com&amp;blog=4779443&amp;post=11338&amp;subd=hackadaycom&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><img class="alignnone size-full wp-image-11339" title="evbus" src="http://hackadaycom.files.wordpress.com/2009/05/evbus.jpg" alt="evbus" width="450" height="243" /></p>
<p>[Soren Coughlin-Glaser] runs a mobile photobooth in the Portland area. It&#8217;s built inside of an <a title="Electric VW Bus Blog" href="http://electricbus.blogspot.com/">electric Volkswagen bus</a>. The conversion to electric hasn&#8217;t been easy though. He&#8217;s spent most of the last few months rebuilding it after an <a title="Electric VW Bus Blog: Major Set Back! ;-(" href="http://electricbus.blogspot.com/2008/11/major-set-back.html">electrical fire</a>. Last fall he installed a <a title="Electric VW Bus Blog: New Engine almost done!" href="http://electricbus.blogspot.com/2008/09/new-engine-almost-done.html">9 inch electric motor</a> from Hi-Torque Electric after his smaller one <a title="Electric VW Bus Blog: Melt Down" href="http://electricbus.blogspot.com/2008/08/melt-down.html">blew up</a>. We really like this project and look forward to seeing it back on the road&#8230; once he replaces his stripped transmission coupler.</p>
<p>[via <a title="Electric-Powered VW Bus Photobooth | Boing Boing Gadgets" href="http://gadgets.boingboing.net/2009/05/30/electric-powered-vw.html">Boing Boing Gadgets</a>]</p>
<br />Posted in digital cameras hacks, transportation hacks  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/hackadaycom.wordpress.com/11338/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/hackadaycom.wordpress.com/11338/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/hackadaycom.wordpress.com/11338/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/hackadaycom.wordpress.com/11338/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/hackadaycom.wordpress.com/11338/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/hackadaycom.wordpress.com/11338/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/hackadaycom.wordpress.com/11338/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/hackadaycom.wordpress.com/11338/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/hackadaycom.wordpress.com/11338/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/hackadaycom.wordpress.com/11338/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/hackadaycom.wordpress.com/11338/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/hackadaycom.wordpress.com/11338/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/hackadaycom.wordpress.com/11338/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/hackadaycom.wordpress.com/11338/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hackaday.com&amp;blog=4779443&amp;post=11338&amp;subd=hackadaycom&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://hackaday.com/2009/05/30/electric-vw-mobile-photobooth/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">RobotSkirts</media:title>
		</media:content>

		<media:content url="http://hackadaycom.files.wordpress.com/2009/05/evbus.jpg" medium="image">
			<media:title type="html">evbus</media:title>
		</media:content>
	</item>
		<item>
		<title>WaitLess bus tracking system</title>
		<link>http://hackaday.com/2009/05/03/waitless-bus-tracking-system/</link>
		<comments>http://hackaday.com/2009/05/03/waitless-bus-tracking-system/#comments</comments>
		<pubDate>Sun, 03 May 2009 15:43:48 +0000</pubDate>
		<dc:creator>Caleb Kraft</dc:creator>
				<category><![CDATA[arduino hacks]]></category>
		<category><![CDATA[classic hacks]]></category>
		<category><![CDATA[bus]]></category>
		<category><![CDATA[campus]]></category>
		<category><![CDATA[tram]]></category>
		<category><![CDATA[trolley]]></category>

		<guid isPermaLink="false">http://hackaday.com/?p=10944</guid>
		<description><![CDATA[Bus systems on campus can often be frustrating. You&#8217;re standing at the stop waiting and you don&#8217;t know if it would just be faster to walk. If you have a WaitLess tracking system at your stop, you can see exactly where the bus is and make that decision much easier. The unit is self contained, [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hackaday.com&amp;blog=4779443&amp;post=10944&amp;subd=hackadaycom&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><img class="alignnone size-full wp-image-10945" title="waitless" src="http://hackadaycom.files.wordpress.com/2009/05/waitless.jpg" alt="waitless" width="450" height="325" /></p>
<p>Bus systems on campus can often be frustrating. You&#8217;re standing at the stop waiting and you don&#8217;t know if it would just be faster to walk. If you have a <a href="http://www.ece.gatech.edu/academic/courses/ece4007/09spring/ece4007l04/dk2/">WaitLess tracking system</a> at your stop, you can see exactly where the bus is and make that decision much easier. The unit is self contained, solar, and equipped with wireless internet. With an Arduino at it&#8217;s core, it displays the current location of the bus by lighting an LED on a map. You can see a video of it in action after the break.</p>
<p><span id="more-10944"></span></p>
<span style="text-align:center; display: block;"><a href="http://hackaday.com/2009/05/03/waitless-bus-tracking-system/"><img src="http://img.youtube.com/vi/RRgORkZiOio/2.jpg" alt="" /></a></span>
<br />Posted in arduino hacks, classic hacks  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/hackadaycom.wordpress.com/10944/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/hackadaycom.wordpress.com/10944/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/hackadaycom.wordpress.com/10944/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/hackadaycom.wordpress.com/10944/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/hackadaycom.wordpress.com/10944/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/hackadaycom.wordpress.com/10944/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/hackadaycom.wordpress.com/10944/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/hackadaycom.wordpress.com/10944/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/hackadaycom.wordpress.com/10944/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/hackadaycom.wordpress.com/10944/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/hackadaycom.wordpress.com/10944/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/hackadaycom.wordpress.com/10944/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/hackadaycom.wordpress.com/10944/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/hackadaycom.wordpress.com/10944/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hackaday.com&amp;blog=4779443&amp;post=10944&amp;subd=hackadaycom&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://hackaday.com/2009/05/03/waitless-bus-tracking-system/feed/</wfw:commentRss>
		<slash:comments>32</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">Caleb Kraft</media:title>
		</media:content>

		<media:content url="http://hackadaycom.files.wordpress.com/2009/05/waitless.jpg" medium="image">
			<media:title type="html">waitless</media:title>
		</media:content>
	</item>
		<item>
		<title>Bus Pirate firmware update (v.0c), JTAG and more</title>
		<link>http://hackaday.com/2008/12/01/bus-pirate-firmware-update-v0c-jtag-and-more/</link>
		<comments>http://hackaday.com/2008/12/01/bus-pirate-firmware-update-v0c-jtag-and-more/#comments</comments>
		<pubDate>Mon, 01 Dec 2008 20:37:35 +0000</pubDate>
		<dc:creator>Ian</dc:creator>
				<category><![CDATA[classic hacks]]></category>
		<category><![CDATA[hardware]]></category>
		<category><![CDATA[news]]></category>
		<category><![CDATA[tool hacks]]></category>
		<category><![CDATA[bench tools]]></category>
		<category><![CDATA[bus]]></category>
		<category><![CDATA[bus pirate]]></category>
		<category><![CDATA[electronics]]></category>
		<category><![CDATA[i2c]]></category>
		<category><![CDATA[interface]]></category>
		<category><![CDATA[jtag]]></category>
		<category><![CDATA[projects]]></category>

		<guid isPermaLink="false">http://hackadaycom.wordpress.com/?p=6457</guid>
		<description><![CDATA[Download: buspirate.v0c.zip A few weeks ago we wrote about our Bus Pirate universal serial interface tool. We used the recent holiday to add some new features, like a JTAG programmer, macros, frequency measurement, and more. A major code reorganization makes everything easier to read and update. Check out the a demonstration of the new features [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hackaday.com&amp;blog=4779443&amp;post=6457&amp;subd=hackadaycom&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><img class="alignnone size-full wp-image-6496" title="stat" src="http://hackadaycom.files.wordpress.com/2008/12/stat.jpg" alt="stat" width="450" height="323" /></p>
<p><strong>Download:</strong> <a href="http://blog.mahalo.com/hackaday/howto/buspirate.v0c.zip">buspirate.v0c.zip</a></p>
<p>A few weeks ago we wrote about our <a href="http://hackaday.com/2008/11/19/how-to-the-bus-pirate-universal-serial-interface/">Bus Pirate universal serial interface tool</a>. We used the recent holiday to add some new features, like a JTAG programmer, macros, frequency measurement, and more. A major code reorganization makes everything easier to read and update.</p>
<p>Check out the a demonstration of the new features below. We&#8217;re compiling a roadmap and wish list, so share your ideas in the comments. You can also see how we used the Bus Pirate to <a href="http://hackaday.com/2008/11/25/how-to-read-a-fedex-kinkos-smart-card-sle4442/">read a smart card</a> and <a href="http://hackaday.com/2008/11/28/parts-133mhz-162khz-programmable-oscillator-ds1077/">test-drive an I2C crystal oscillator</a>.</p>
<p><span id="more-6457"></span><strong>New protocols<br />
</strong></p>
<blockquote><p>I2C&gt;m <strong>&lt;&#8211;setup mode</strong><br />
1. HiZ <strong>&lt;&#8211; high impedance pins (safe mode)</strong><br />
2. 1-WIRE <strong>&lt;&#8211; not ready for this release</strong><br />
3. UART<br />
4. I2C<br />
5. SPI<br />
6. JTAG <strong>&lt;&#8211; interface and programmer</strong><br />
7. RAW2WIRE<br />
8. RAW3WIRE<br />
MODE&gt;1<br />
900 MODE SET<br />
HiZ&gt;</p></blockquote>
<p>This firmware release lists three new protocols.</p>
<p>Hi-Z makes all pins <a href="http://en.wikipedia.org/wiki/High_impedance">high impedance</a>/input, a safe state that won&#8217;t damage an attached circuit. To be safe, the Bus Pirate now starts in this mode.</p>
<p>1-Wire is listed, but we couldn&#8217;t include it in this release because we still don&#8217;t have any parts to test with our library. This is just a placeholder for now, but it will be added as soon as we get a 1-Wire part to test.</p>
<p>We wrote a simplified JTAG interface that includes a XSVF player for programming JTAG device chains.</p>
<p>**We included a hardware I2C library, but according to the device errata <a href="http://forum.microchip.com/tm.aspx?m=271183&amp;mpage=1">there&#8217;s a bug in the 24FJ64GA002 rev3 I2C module</a>. This will work with a different chip (e.g. a 28pin dsPIC33).</p>
<p><em>Connection table</em></p>
<table border="0">
<tbody>
<tr>
<td>
<div><strong>PIN</strong></div>
</td>
<td><strong>1-Wire</strong></td>
<td>
<div><strong>I2C*</strong></div>
</td>
<td>
<div><strong>SPI</strong>**</div>
</td>
<td>
<div><strong>RS232</strong></div>
</td>
<td><strong>JTAG</strong></td>
</tr>
<tr>
<td>
<div><strong>B9</strong></div>
</td>
<td>SDA</td>
<td>
<div>SDA</div>
</td>
<td>
<div>MOSI</div>
</td>
<td>
<div>-</div>
</td>
<td>TDI</td>
</tr>
<tr>
<td>
<div><strong>B8</strong></div>
</td>
<td>-</td>
<td>
<div>SCL</div>
</td>
<td>
<div>CLK</div>
</td>
<td>
<div>-</div>
</td>
<td>TCK</td>
</tr>
<tr>
<td>
<div><strong>B7</strong></div>
</td>
<td>-</td>
<td>
<div>-</div>
</td>
<td>
<div>MISO</div>
</td>
<td>
<div>RX</div>
</td>
<td>TDO</td>
</tr>
<tr>
<td>
<div><strong>B6</strong></div>
</td>
<td>-</td>
<td>
<div>-</div>
</td>
<td>
<div>CS</div>
</td>
<td>
<div>TX</div>
</td>
<td>TMS</td>
</tr>
<tr>
<td>
<div><strong>B5</strong></div>
</td>
<td>AUX</td>
<td>
<div>AUX</div>
</td>
<td>
<div>AUX</div>
</td>
<td>
<div>AUX</div>
</td>
<td>AUX</td>
</tr>
<tr>
<td>
<div><strong>Ground</strong></div>
</td>
<td>GND</td>
<td>
<div>GND</div>
</td>
<td>
<div>GND</div>
</td>
<td>
<div>GND</div>
</td>
<td>GND</td>
</tr>
</tbody>
</table>
<p>*also raw 2 wire. **also raw 3 wire.</p>
<p>The new modes connect to the Bus Pirate as outlined in the table.</p>
<p><strong>New features and settings</strong></p>
<p><em>Frequency measurement</em></p>
<blockquote><p>HiZ&gt;F <strong>&lt;&#8211; do a frequency count</strong><br />
9xx FREQ COUNT ON AUX: 22199552Hz (22MHz)<br />
HiZ&gt;</p></blockquote>
<p>As seen in the <a href="http://hackaday.com/2008/11/28/parts-133mhz-162khz-programmable-oscillator-ds1077/">DS1077 demonstration</a>, we added a frequency counter to the Bus Pirate&#8217;s AUX pin.  &#8216;F&#8217; measures frequency, maximum of about 50MHz.</p>
<p><em>Assign axillary control</em></p>
<blockquote><p>HiZ&gt;c <strong>&lt;&#8211; menu c</strong><br />
AUX PIN<br />
1. AUX (DEFAULT)<br />
2. CS/TMS<br />
MODE&gt;1 <strong>&lt;&#8211; set AUX control mode</strong><br />
9xx AUX: DEFAULT SETTING (AUX PIN)<br />
HiZ&gt;</p></blockquote>
<p>Sometimes we need to control the chip select (CS) /JTAG state machine (TMS) pins manually. &#8216;c&#8217; toggles the pin control between the axillary pin and the chip select pin.</p>
<p><em>Set terminal speed</em></p>
<blockquote><p>HiZ&gt;b <strong>&lt;&#8211; menu b</strong><br />
Set serial port speed: (bps)<br />
1. 300<br />
&#8230;<br />
9. 115200<br />
SPEED&gt;9 <strong>&lt;&#8211; set speed</strong><br />
Adjust your terminal and press space to continue<br />
HiZ&gt;</p></blockquote>
<p>&#8216;b&#8217; adjusts the PC-side serial port speed.</p>
<p><strong>Macros</strong></p>
<p>A new syntax addition, &#8216;(#)&#8217;, triggers protocol dependent macros.</p>
<blockquote><p>JTAG&gt;(0) <strong>&lt;&#8211;macro 0</strong><br />
0.Macro menu<br />
1.Reset chain<br />
2.Probe chain<br />
3.XSVF player<br />
JTAG&gt;</p></blockquote>
<p>In any mode, use the macro (0) to display a menu of available macros.</p>
<p><em>I2C address search </em></p>
<blockquote><p>I2C&gt;(1) <strong>&lt;&#8211;scan I2C addresses macro</strong><br />
xxx Searching 7bit I2C address space.<br />
Found devices at:<br />
0xB0 0xB1 <strong>&lt;&#8211;DS1077 responds to write and read address</strong><br />
I2C&gt;</p></blockquote>
<p>The I2C library includes a macro to automatically search the I2C address range for devices. Helpful when you work with an unknown chip.</p>
<p><em>Raw2wire smart card ISO 7813-3 ATR</em></p>
<blockquote><p>RAW2WIRE&gt;(1)<strong>&lt;&#8211;ATR and decode macro</strong><br />
ISO 7813-3 ATR<br />
950 AUX LOW<br />
951 AUX HIGH<br />
4xx RAW2WIRE 0&#215;01 CLOCK TICKS<br />
950 AUX LOW<br />
ISO 7813-3 reply: 0xA2 0&#215;13 0&#215;10 0&#215;91<strong>&lt;&#8211;ATR bytes</strong><br />
Protocol: 2 wire <strong>&lt;&#8211;decoded ATR data</strong><br />
Read type: to end<strong>&lt;&#8211;</strong><br />
Data units: 256 <strong>&lt;&#8211;</strong><br />
Data unit length: 8 bits <strong>&lt;&#8211;</strong><br />
RAW2WIRE&gt;</p></blockquote>
<p>Macro 1 resets and identifies a smart card. For more about the ISO7813-3 ATR, see how we <a href="http://hackaday.com/2008/11/25/how-to-read-a-fedex-kinkos-smart-card-sle4442/">used the Bus Pirate to read a smart card</a>.</p>
<p><strong>JTAG</strong></p>
<p><a href="http://www.fpga4fun.com/JTAG.html">JTAG</a> is a debugging and programming interface for all kinds of electronics. The raw hardware interface can be accessed with the Bus Pirate&#8217;s raw 3 wire library, but we added a few features to make it much easier.</p>
<p><strong><img class="alignnone size-full wp-image-6468" title="jtagstate" src="http://hackadaycom.files.wordpress.com/2008/12/jtagstate.png" alt="jtagstate" width="450" height="312" /></strong></p>
<p>JTAG has different modes where data entry does different things. Modes are navigated with the JTAG TMS signal; there are a <a href="http://www.fpga4fun.com/JTAG2.html">bunch of JTAG modes</a>, called states.The Bus Pirate&#8217;s JTAG library is just the raw 3 wire library, enhanced to help with JTAG state changes.</p>
<p>We only implemented the JTAG states we need to get data in and out of a JTAG device chain: reset, idle, data register, and instruction register. Macro (1) issues a JTAG chain reset, and initializes the chain to the idle state. { puts the JTAG chain in data register mode. [ puts the chain in instruction register mode. ] or } return the chain to the idle state. The Bus Pirate has an internal state machine tracker that is smart enough to manage the chain without explicitly returning the chain to idle; in other words, you don&#8217;t have to close your tags. The state machine tracker reports every state change to help debug problems.</p>
<blockquote><p>JTAG&gt;[0xfe {rrrr} <strong>&lt;-- same as [0xfe]{rrrr}</strong><br />
xxx JTAGSM: ALREADY IDLE<br />
xxx JTAGSM: IDLE-&gt;Instruction Register (DELAYED ONE BIT FOR TMS)<br />
610 JTAG READY TO WRITE IR <strong>&lt;&#8211; JTAG chain instruction register</strong><br />
620 JTAG WRITE: 0xFE <strong>&lt;&#8211; request ID</strong><br />
xxx JTAGSM: (WROTE DELAYED BIT) IR-&gt;IDLE<strong> &lt;&#8211;back to IDLE</strong><br />
xxx JTAGSM: IDLE-&gt;Data Register <strong>&lt;&#8211;IDLE to data register</strong><br />
611 JTAG READY TO READ/WRITE DR<br />
630 JTAG READ: 0&#215;93 <strong>&lt;&#8211;device ID</strong><br />
630 JTAG READ: 0&#215;40<br />
630 JTAG READ: 0&#215;60<br />
630 JTAG READ: 0&#215;59<br />
xxx JTAGSM: DR-&gt;IDLE <strong>&lt;&#8211;back to idle</strong><br />
640 JTAG IDLE<br />
JTAG&gt;</p></blockquote>
<p>Here is a short interaction with a <a href="http://www.xilinx.com/products/xc9500xl/index.htm">Xilinx XC9572 CPLD</a>. We go to the instruction register ( [ ), and send the device ID request command (0xfe). Then, we go the the data register( { ), read four bytes (rrrr, or r:4 shorthand), and return to idle ( } ).</p>
<p><em>What are delayed bit writes?</em></p>
<p>JTAG requires that the last data bit written to the instruction register be entered at the same time as the state change. Since the Bus Pirate has no way of predicting when we'll actually change states, it delays the last bit of each byte write until one of three things happens:</p>
<ul>
<li>Exit the instruction register with a }, ], or { command</li>
<li>Write another byte value</li>
<li>A read command</li>
</ul>
<p>Pending bits are not cleared by bitwise operations (like ! or ^). Do these before writing your last byte, or change the code. We haven&#8217;t implemented pending writes to the data register, but it&#8217;s probably needed. You might need to implement this if you&#8217;re writing the data register, rather just reading, like we did.</p>
<p><em>JTAG Macros</em></p>
<blockquote><p>JTAG&gt;(1) <strong>&lt;&#8211;macro 1</strong><br />
xxx JTAGSM: RESET<br />
xxx JTAGSM: RESET-&gt;IDLE<br />
JTAG&gt;</p></blockquote>
<p>JTAG macro (1) resets the JTAG chain and then advances it to the idle state.</p>
<blockquote><p>JTAG&gt;(2) <strong>&lt;&#8211;macro 2</strong><br />
xxx JTAG INIT CHAIN<br />
xxx JTAGSM: RESET<br />
xxx JTAGSM: RESET-&gt;IDLE<br />
xxx JTAGSM: IDLE-&gt;Instruction Register (DELAYED ONE BIT FOR TMS)<br />
xxx JTAGSM: IR-&gt;IDLE<br />
xxx JTAGSM: IDLE-&gt;Data Register<br />
xxx JTAGSM: DR-&gt;IDLE<br />
xxx JTAGSM: RESET<br />
xxx JTAGSM: RESET-&gt;IDLE<br />
xxx JTAGSM: IDLE-&gt;Data Register<br />
xxx JTAG CHAIN REPORT: <strong>&lt;&#8211;start of report</strong><br />
0&#215;01 DEVICE(S)<br />
#0&#215;01 : 0&#215;93 0&#215;40 0&#215;60 0&#215;59 <strong>&lt;&#8211;device IDs</strong><br />
xxx JTAGSM: DR-&gt;IDLE<br />
JTAG&gt;</p></blockquote>
<p>Macro (2) resets the chain, counts the devices, and reports all the device IDs.</p>
<p><img class="alignnone size-full wp-image-6470" title="xsfv" src="http://hackadaycom.files.wordpress.com/2008/12/xsfv.png" alt="xsfv" width="450" height="350" /></p>
<blockquote><p>JTAG&gt;(3) <strong>&lt;&#8211;macro 3</strong><br />
6xx JTAG XSVF PLAYER<br />
xxx XON/XOFF FLOW CONTROL REQUIRED <strong>&lt;&#8211;required!</strong><br />
xxx PRESS z TO CONTINUE <strong>&lt;&#8211; press z</strong><br />
xxx BEGIN XSVF UPLOAD <strong>&lt;&#8211; upload the file</strong><br />
6&#215;0 XSVF OK <strong>&lt;&#8211; result or error</strong><br />
YOUR PC DRIBBLED MAX 0&#215;05 BYTES AFTER XOFF (THAT&#8217;S OK)<br />
6xx PRESS z 5 TIMES TO CONTINUE <strong>&lt;&#8211; continue</strong><br />
JTAG&gt;</p></blockquote>
<p>Macro 3 is an XSVF player/programmer using code from Xilinx. XSVF is byte format <a href="http://www.asset-intertech.com/support/svf.html">SVF</a>, <a href="http://www.xilinx.com/support/documentation/application_notes/xapp058.pdf">as described by Xilinx</a> (pdf). XSVF files can be compiled for any chain with the correct <a href="http://www.xilinx.com/products/design_resources/config_sol/isp_standards_specs.htm">generic JTAG definition files</a>, even non-Xilinx devices. We successfully used the <em>binary</em> transfer features in <a href="http://www.hw-group.com/products/hercules/index_en.html">Hercules</a> and <a href="http://www.ayera.com/teraterm/">Tera Term</a> to send XSVF files to the programmer.</p>
<p>JTAG sometimes pauses longer than it takes the PC to transfer a byte of data, so we implemented <a href="http://en.wikipedia.org/wiki/XON">XON/XOFF software flow control</a> for the XSVF player. Your terminal must be in XON/XOFF flow control mode before you upload the XSVF file, or the programmer will fail. Even with software flow control, a modern PC has already send several bytes through the layers of operating system before it receives the flow control signals. We deal with this by catching these bytes before moving on, this is reported as the maximum number of bytes &#8220;dribbled&#8221;.</p>
<p>If there&#8217;s an error in the upload, the PC will probably continue to spit bytes at the Bus Pirate. To keep error messages visible, and prevent garbage in the terminal, the XSVF player waits for five lower case z&#8217;s before it returns to the prompt. We chose this sequence because it will never occur in an XSVF file.</p>
<p>*Note that the XSVF player does not respect the JTAG Hi-Z pin setting. Went it does, it fails. Be careful mixing voltages without a buffer.</p>
<p><strong>Better code structure</strong></p>
<p>The biggest difference between the version 0b and 0c firmware is a massive improvement in code structure. The Bus Pirate existed in many incarnations before we packaged it for the initial article. v.0c harmonizes the code libraries and makes it easier to add new protocols.</p>
<p><em>How to add a custom protocol</em></p>
<p>The Bus Pirate code handles the user interface, and passes two variables to the active protocol library. The first variable is a command, such as CMD_READ, CMD_READBULK, or CMD_WRITE. The entire command set is defined in base.h. The second variable is an optional value. A simple CMD_READ command passes no value, a bulk read command passes the number of bytes to read, a write command passes the value to write to the bus, etc. At minimum, a custom protocol needs a function to receive these variables and translate them to bus actions.</p>
<p>We used three different techniques to link commands to bus actions. Simple code can go directly in a giant switch statement, like SPI.c. External libraries use an single linking function, like I2C.c, and m_i2c_1.c. More complicated protocols use the switch statement to call functions included in the library (raw2wire.c, raw3wire.c, jtag.c UART.c). Helpful functions for terminal IO are included in base.h/c.</p>
<p>Due to massive code improvements, it&#8217;s now only mildly confusing to register a new protocol with the Bus Pirate:</p>
<p><em>base.h</em> &#8211; Create a definition for the protocol. The last entry is currently &#8220;#define RAW3WIRE 7&#8243;, so the next entry could be &#8220;#define MYCUSTOMWIRE 8&#8243;.</p>
<p><strong>busPirate.c</strong> &#8211; Include a header file with that gives access to the processing function.  Add a menu entry in the <em>char* mode[]  =</em> variable list. The menu entry <em>must</em> be in the same position on the list as the number assigned in the base.h define. If MYCUSTOMWIRE is number 8, it must be the eight entry in the mode variable. Finally, add an additional switch to the bpProcess() function that calls the custom library processing routine when the mode is set to &#8220;MYCUSTOMWIRE&#8221;.</p>
<p><strong>Taking it further: a Hack a Day wish list</strong></p>
<p>We compiled the feedback we&#8217;ve gotten into three wish lists: protocols, features, and macros.</p>
<p><em>Protocols</em></p>
<ul>
<li><a href="http://en.wikipedia.org/wiki/1-Wire">1-Wire</a>, with enumeration (*ready as soon as we have parts to test it)</li>
<li><a href="http://www.elmelectronics.com/obdic.html">OBD-II</a> (thanks [<a href="http://hackaday.com/2008/11/19/how-to-the-bus-pirate-universal-serial-interface/#comment-51551">Shadyman</a>])</li>
<li><a href="http://en.wikipedia.org/wiki/Controller-area_network">CAN</a></li>
<li><a href="http://www.ucapps.de/">MIDI</a> (<a href="http://en.wikipedia.org/wiki/General_MIDI">Wikipedia</a>)</li>
<li><a href="http://en.wikipedia.org/wiki/DMX512-A">DMX512-A</a></li>
<li><a href="http://en.wikipedia.org/wiki/Irda">IRDA</a>, <a href="http://hackaday.com/2008/10/30/how-to-usb-remote-control-receiver/">RC5x</a>, etc.</li>
</ul>
<p>Some protocols will require an external transceiver.</p>
<p><em>Features</em></p>
<ul>
<li>Pulse-width modulator, frequency generator</li>
<li>&#8220;Wait until interrupt&#8221; command</li>
<li>Convert frequency measurement to input capture peripheral</li>
<li>Allow frequency measurement on any pin</li>
<li>Show a report of the current configuration settings and pin states.</li>
<li>Integer repeat values for bulk read, clock ticks, delays, etc.</li>
<li>A CRC generator</li>
</ul>
<p><em>Macros</em></p>
<ul>
<li>Transparent UART bridge</li>
<li>SD card initialization, meta data extract, and dump</li>
<li>EEPROM program/dump (I2C/SPI)</li>
<li>Nokia 6100 LCD initialization, control</li>
<li>NMEA GPS data decoder</li>
</ul>
<p>Do you have anything to add to the list?</p>
<p>Firmware download: <a href="http://blog.mahalo.com/hackaday/howto/buspirate.v0c.zip">buspirate.v0c.zip</a></p>
<br />Posted in classic hacks, hardware, news, tool hacks  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/hackadaycom.wordpress.com/6457/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/hackadaycom.wordpress.com/6457/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/hackadaycom.wordpress.com/6457/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/hackadaycom.wordpress.com/6457/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/hackadaycom.wordpress.com/6457/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/hackadaycom.wordpress.com/6457/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/hackadaycom.wordpress.com/6457/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/hackadaycom.wordpress.com/6457/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/hackadaycom.wordpress.com/6457/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/hackadaycom.wordpress.com/6457/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/hackadaycom.wordpress.com/6457/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/hackadaycom.wordpress.com/6457/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/hackadaycom.wordpress.com/6457/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/hackadaycom.wordpress.com/6457/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hackaday.com&amp;blog=4779443&amp;post=6457&amp;subd=hackadaycom&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://hackaday.com/2008/12/01/bus-pirate-firmware-update-v0c-jtag-and-more/feed/</wfw:commentRss>
		<slash:comments>31</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">Ian</media:title>
		</media:content>

		<media:content url="http://hackadaycom.files.wordpress.com/2008/12/stat.jpg" medium="image">
			<media:title type="html">stat</media:title>
		</media:content>

		<media:content url="http://hackadaycom.files.wordpress.com/2008/12/jtagstate.png" medium="image">
			<media:title type="html">jtagstate</media:title>
		</media:content>

		<media:content url="http://hackadaycom.files.wordpress.com/2008/12/xsfv.png" medium="image">
			<media:title type="html">xsfv</media:title>
		</media:content>
	</item>
		<item>
		<title>How-to: The Bus Pirate, universal serial interface</title>
		<link>http://hackaday.com/2008/11/19/how-to-the-bus-pirate-universal-serial-interface/</link>
		<comments>http://hackaday.com/2008/11/19/how-to-the-bus-pirate-universal-serial-interface/#comments</comments>
		<pubDate>Wed, 19 Nov 2008 22:17:57 +0000</pubDate>
		<dc:creator>Ian</dc:creator>
				<category><![CDATA[hardware]]></category>
		<category><![CDATA[how-to]]></category>
		<category><![CDATA[tool hacks]]></category>
		<category><![CDATA[bus]]></category>
		<category><![CDATA[bus pirate]]></category>
		<category><![CDATA[debug]]></category>
		<category><![CDATA[debugging tools]]></category>
		<category><![CDATA[eeprom reader]]></category>
		<category><![CDATA[electronics]]></category>
		<category><![CDATA[hacking tools]]></category>
		<category><![CDATA[i2c]]></category>
		<category><![CDATA[ic interface]]></category>
		<category><![CDATA[serial port]]></category>
		<category><![CDATA[spi]]></category>
		<category><![CDATA[terminal]]></category>
		<category><![CDATA[uart]]></category>

		<guid isPermaLink="false">http://hackadaycom.wordpress.com/?p=5882</guid>
		<description><![CDATA[UPDATE: New firmware with JTAG and more We&#8217;re always excited to get a new chip or SIM card to interface, but our enthusiasm is often dampened by the prototyping process. Interfacing any chip usually means breadboarding a circuit, writing code, and hauling out the programmer; maybe even a prototyping PCB. A few years ago we [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hackaday.com&amp;blog=4779443&amp;post=5882&amp;subd=hackadaycom&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><img class="alignnone size-full wp-image-5904" title="i2ceeprom" src="http://hackadaycom.files.wordpress.com/2008/11/i2ceeprom.jpg" alt="i2ceeprom" width="450" height="308" /></p>
<p><strong>UPDATE:</strong> <a href="http://hackaday.com/2008/12/01/bus-pirate-firmware-update-v0c-jtag-and-more/">New firmware with JTAG and more</a></p>
<p>We&#8217;re always excited to get a new chip or SIM card to interface, but our enthusiasm is often dampened by the prototyping process. Interfacing any chip usually means breadboarding a circuit, writing code, and hauling out the programmer; maybe even a prototyping PCB.</p>
<p>A few years ago we built the first &#8216;Bus Pirate&#8217;, a universal bus interface that talks to most chips from a PC serial terminal. Several standard serial protocols are supported at 3.3-5volts, including <a href="http://en.wikipedia.org/wiki/I%C2%B2C">I2C</a>, <a href="http://en.wikipedia.org/wiki/Serial_Peripheral_Interface_Bus">SPI</a>, and <a href="http://en.wikipedia.org/wiki/Asynchronous_start-stop">asynchronous serial</a>. Additional &#8216;raw&#8217; 2- and 3- wire libraries can interface almost any proprietary serial protocols. Since this has been such a useful tool for us, we cleaned up the code, documented the design, and released it here with specs, schematic, and source code.</p>
<p><span id="more-5882"></span></p>
<p><strong>Concept Overview</strong></p>
<p><strong><img class="alignnone size-full wp-image-6028" title="overview-diagram-new" src="http://hackadaycom.files.wordpress.com/2008/11/overview-diagram-new.png" alt="overview-diagram-new" width="450" height="161" /><br />
</strong></p>
<p><strong><br />
</strong></p>
<p>The Bus Pirate is a serial terminal bridge to multiple IC interface protocols. We type commands into a serial terminal on the computer. The commands go to the Bus Pirate through the PC serial port. The Bus Pirate talks to a microchip in the proper protocol, and returns the results to the PC.</p>
<p>All pins output 3.3volts, but are 5volt tolerant. On-board 3.3volt and 5volt power supplies are available to power the connected chip. Software configurable I2C <a href="http://en.wikipedia.org/wiki/Pull-up_resistor">pull-up resistors</a> complete the package.</p>
<p><img class="alignnone size-full wp-image-5893" title="terminal-450" src="http://hackadaycom.files.wordpress.com/2008/11/terminal-450.png" alt="terminal-450" width="401" height="251" /></p>
<p>The serial terminal interface works with any system: PC, Mac, Linux, Palm Pilots, WinCE devices, etc; no crapware required. We considered a USB device, but USB isn&#8217;t compatible with the huge number of hand-held devices that have a serial port. We also wanted a 3.3volt device with 5volt tolerant inputs, but most popular through-hole USB microcontollers were 5volt parts (e.g. the <a href="http://www.microchip.com/ParamChartSearch/chart.aspx?branchID=111&amp;mid=10&amp;lang=en&amp;pageId=74">PIC18Fx550</a>).</p>
<p>The Bus Pirate currently &#8216;speaks&#8217; three hardware protocols for high-speed interfacing, and has two software protocol libraries for easy bus manipulation. The theory and specification of each protocol is beyond what we can cover here, but check out some of these tutorials:</p>
<p><em>I2C</em></p>
<p>A slow 2 wire bus. Wikipedia is a great place to start for <a href="http://en.wikipedia.org/wiki/I%C2%B2C">I2C background</a>. <a href="http://www.i2c-bus.org/">I2C-Bus.org</a>, <a href="http://www.robot-electronics.co.uk/htm/using_the_i2c_bus.htm">Robot Electronics</a>, <a href="http://www.esacademy.com/faq/i2c/">Embedded Systems Academy</a>, and <a href="http://www.embedded.com/story/OEG20010718S0073">Embedded.com</a> have decent I2C tutorials.</p>
<p><em>SPI</em></p>
<p>A simple 3 wire bus. Wikipedia has <a href="http://en.wikipedia.org/wiki/Serial_Peripheral_Interface_Bus">background</a>; Embedded.com has a great <a href="http://www.embedded.com/columns/beginerscorner/9900483">tutorial and comparison to I2C</a>.</p>
<p><em>Universal Asynchronous Receiver Transmitter (UART or serial)</em></p>
<p>A clock and timing dependent serial protocol best known for its appearance as the PC serial port protocol. Wikipedia has background on <a href="http://en.wikipedia.org/wiki/Asynchronous_start-stop">asynchronous serial protocols</a>.</p>
<p><em>Raw 2 wire</em></p>
<p>This is a generic 2 wire protocol library, similar to I2C but without an ACK bit. I2C and many proprietary 2 wire protocols can be formed using the bus manipulations available in this mode. Use this library to work with non-I2C 2 wire devices, like <a href="http://www.smartcardsupply.com/Content/Cards/SLE4442.htm">smartcards</a> or <a href="http://www.sensirion.com/en/01_humidity_sensors/02_humidity_sensor_sht11.htm">Sensirion SHT11</a> temperature/humidity sensors.</p>
<p><em>Raw 3 wire</em></p>
<p>This is a generic 3 wire protocol library, similar to SPI but without the constraints of a hardware module. Use this library to work with devices that use non-8bit compatible 3-wire protocols, like the <a href="http://www.sparkfun.com/commerce/product_info.php?products_id=569">Sparkfun Nokia 6100 LCD knock-off</a>. Many 3 wire protocols can be formed using the bus manipulations available in this mode.</p>
<p><strong>Hardware</strong></p>
<p><img class="alignnone size-full wp-image-5897" title="brd-450" src="http://hackadaycom.files.wordpress.com/2008/11/brd-450.png" alt="brd-450" width="451" height="325" /></p>
<p><a href="http://hackadaycom.files.wordpress.com/2008/11/brd.png">Click for a full size PCB placement image</a> (PNG). Screw terminals connect to the power supplies. A row of seven pin headers connect to the IO pins. Despite the label, only 7volts DC is required.</p>
<table style="text-align:left;" border="0">
<tbody>
<tr>
<td>
<div><strong>PIN</strong></div>
</td>
<td>
<div><strong>SPI</strong></div>
</td>
<td>
<div><strong>I2C</strong></div>
</td>
<td>
<div><strong>RS232</strong></div>
</td>
</tr>
<tr>
<td>
<div><strong>B9</strong></div>
</td>
<td>
<div>MOSI</div>
</td>
<td>
<div>SDA</div>
</td>
<td>
<div>-</div>
</td>
</tr>
<tr>
<td>
<div><strong>B8</strong></div>
</td>
<td>
<div>CLK</div>
</td>
<td>
<div>SCL</div>
</td>
<td>
<div>-</div>
</td>
</tr>
<tr>
<td>
<div><strong>B7</strong></div>
</td>
<td>
<div>MISO</div>
</td>
<td>
<div>-</div>
</td>
<td>
<div>RX</div>
</td>
</tr>
<tr>
<td>
<div><strong>B6</strong></div>
</td>
<td>
<div>CS</div>
</td>
<td>
<div>-</div>
</td>
<td>
<div>TX</div>
</td>
</tr>
<tr>
<td>
<div><strong>B5</strong></div>
</td>
<td>
<div>AUX</div>
</td>
<td>
<div>AUX</div>
</td>
<td>
<div>AUX</div>
</td>
</tr>
<tr>
<td>
<div><strong>Ground</strong></div>
</td>
<td>
<div>GND</div>
</td>
<td>
<div>GND</div>
</td>
<td>
<div>GND</div>
</td>
</tr>
</tbody>
</table>
<p>This table shows the pin connections for each bus mode. Raw 2 wire mode uses the same pin configuration as I2C. Raw 3 wire mode uses the same pin configuration as SPI.</p>
<p><img class="alignnone size-full wp-image-5899" title="cct-450" src="http://hackadaycom.files.wordpress.com/2008/11/cct-450.png" alt="cct-450" width="450" height="191" /></p>
<p><a href="http://hackadaycom.files.wordpress.com/2008/11/cct.png">Click for a full size circuit image</a> (PNG). The circuit and PCB are designed using the freeware version of <a href="http://www.cadsoft.de">Cadsoft Eagle</a>. Download the <a href="http://blog.mahalo.com/hackaday/howto/buspirate.v0b.zip">project archive</a> (ZIP).</p>
<p><em>PIC 24FJ64GA002</em></p>
<p>We used a <a href="http://www.microchip.com/wwwproducts/Devices.aspx?dDocName=en026374">PIC24FJ64GA002</a> microcontroller in the Bus Pirate; this is the same chip we used in our <a href="http://hackaday.com/2008/09/25/web-server-on-a-business-card-part-2/">mini-server project</a>. It&#8217;s fast enough to do everything we want (16MIPS), and the peripheral pin select feature allows the hardware SPI, UART, and I2C modules to share output pins. Each power pin needs a decoupling capacitor(C12,13), and the MCLR function requires a resistor (R7) between pin 1 and 3.3volts. The PIC has an internal voltage regulator that requires a 10uF tantalum capacitor (C3), though we used a plain electrolytic capacitor without issue. Read about programming and working with this chip in our <a href="http://hackaday.com/2008/09/18/web-server-on-a-business-card-part-1/">PIC24F tutorial</a>. If you don&#8217;t have a PIC debugger, several readers recommend the under-$40 ICD2 clones on eBay.</p>
<p>The PIC runs at 3.3volts, but the digital-only pins are 5volt tolerant for interfacing 5volt logic. Pins 14,15,16,17,18,21, and 22, are digital only, which we determined by looking through the datasheet and eliminating any pins with an analog connection type (table 1-2, pages 11-16). According to the datasheet, I2C pins are also 5volt tolerant. There&#8217;s a bunch of conflicting information on the web, but datasheet page 230, parameter DI28, clearly states that the max input for a 24FJ64GA002 I2C pin without analog circuitry is 5.5volts.</p>
<p>Pins 21 and 22 (RB10/11) can pull-up SDA/SCL through resistors R4 and R5.</p>
<p><em>MAX3223CPP</em></p>
<p>This chip converts 3.3volt serial output to +/-10volt RS232 signals compatible with a PC serial port. The MAX3223CPP is a 3-5volt version of the MAX202, with extra power saving features. MAX RS232 transceivers require four 0.1uF capacitors for a charge pump (C4,5,7,8), and one decoupling capacitor (C17). We used the same capacitors for everything.</p>
<p>We used a MAX3223CPP, which doesn&#8217;t seem to be available anymore. <a href="http://search.digikey.com/scripts/DkSearch/dksus.dll?Detail?name=MAX3223EEPP%2B-ND">MAX3223EEPP+</a> is a pin-compatible newer version, available at Digikey for $7. Ouch! None of the 3223&#8242;s power saving features are used, so a cheaper, simpler 3.3volt RS232 transceiver should be substituted if at all possible.</p>
<p><em>Power supplies</em></p>
<p>Most chips can be powered from the Bus Pirate&#8217;s on-board 3.3volt and 5volt supplies. 5volts is supplied by a common 7805 regulator (VR2) and two decoupling capacitors (C9,10). An LM317 adjustable regulator (VR1) is set to 3.3volts using two resistors (R2,3), and requires two decoupling capacitors (C6,7). The circuit requires a 7-10volt DC supply (J1).</p>
<p><em>Part list</em></p>
<table style="text-align:left;" border="0">
<tbody>
<tr>
<td><strong>Part </strong></td>
<td><strong>Value</strong></td>
</tr>
<tr>
<td>IC1</td>
<td><a href="http://search.digikey.com/scripts/DkSearch/dksus.dll?Detail?name=PIC24FJ64GA002-I/SP-ND">PIC24FJ64GA002-DIP</a></td>
</tr>
<tr>
<td>IC2</td>
<td>MAX3223CPP (try <a href="http://search.digikey.com/scripts/DkSearch/dksus.dll?Detail?name=MAX3223EEPP%2B-ND">MAX3223EEPP+</a>)</td>
</tr>
<tr>
<td>C3</td>
<td><a href="http://www.mouser.com/Search/ProductDetail.aspx?qs=M%252b5JCWh%252b1ty3RFguvdcdsg%3d%3d">10uF capacitor</a> (preferably tantalum)</td>
</tr>
<tr>
<td>C4-13,17</td>
<td><a href="http://www.mouser.com/Search/ProductDetail.aspx?qs=9AX3phJxokWIpR5WRGtIJw%3d%3d">0.1uF capacitors</a></td>
</tr>
<tr>
<td>R1</td>
<td><a href="http://www.mouser.com/Search/ProductDetail.aspx?qs=ULgY8XwKjTmmv2gtdH4CoQ%3d%3d">330 ohm resistor</a></td>
</tr>
<tr>
<td>R2</td>
<td><a href="http://www.mouser.com/Search/ProductDetail.aspx?qs=4eNa8160l8VHA9lUHkRdvw%3d%3d">240 ohm resistor</a></td>
</tr>
<tr>
<td>R3</td>
<td><a href="http://www.mouser.com/Search/ProductDetail.aspx?qs=X3IDIfI%252bJAVuAq1Yim8fmg%3d%3d">390 ohm resistor</a></td>
</tr>
<tr>
<td>R4,5,7</td>
<td><a href="http://www.mouser.com/Search/ProductDetail.aspx?qs=8tsW7z%2fc78pkoLNVKn1xoQ%3d%3d">2K2  ohm resistor</a></td>
</tr>
<tr>
<td>VR1</td>
<td><a href="http://www.mouser.com/Search/ProductDetail.aspx?qs=swDD%252bF%252bps7c8uLyY%252b3mJJw%3d%3d">LM317</a></td>
</tr>
<tr>
<td>VR2</td>
<td><a href="http://www.mouser.com/Search/ProductDetail.aspx?qs=cnIeywgme7bzmZ37%2fiFT9w%3d%3d">LM7805</a></td>
</tr>
<tr>
<td>X1</td>
<td><a href="http://www.mouser.com/Search/ProductDetail.aspx?qs=wjes1ZhMGKfGv3iS94oZ%252bQ%3d%3d">Screw clamp (3 terminals)</a> *untested</td>
</tr>
<tr>
<td>X2</td>
<td><a href="http://www.mouser.com/Search/ProductDetail.aspx?qs=nAEW9fCjKd%2fyLNwP2ItddQ%3d%3d">DB9 Female connector (serial port)</a> *untested</td>
</tr>
<tr>
<td>ICSP,SV3</td>
<td><a href="http://www.mouser.com/Search/ProductDetail.aspx?R=4-103329-0virtualkey57100000virtualkey571-41033290">.1&#8243; pin header, right angle</a></td>
</tr>
<tr>
<td>J1</td>
<td><a href="http://www.mouser.com/Search/ProductDetail.aspx?qs=8xMK%252bwDsXhcfMNb%2fYnnwLQ%3d%3d">Power jack, 2.1mm pin</a></td>
</tr>
<tr>
<td>LED1</td>
<td>3mm LED (optional)</td>
</tr>
</tbody>
</table>
<p><strong>Firmware</strong></p>
<p>The firmware is written in C using the free demonstration version of the <a href="http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&amp;nodeId=1406&amp;dDocName=en010065">PIC C30 compiler</a>. Learn all about working with this PIC in our <a href="http://hackaday.com/2008/09/18/web-server-on-a-business-card-part-1/">introduction to the PIC 24F series</a>. Download the <a href="http://blog.mahalo.com/hackaday/howto/buspirate.v0b.zip">project archive</a> (ZIP).</p>
<p>main.c &#8211; Handles the user terminal interface.</p>
<p>busPirate.c &#8211; Abstraction routines that convert syntax to actions on the proper bus.</p>
<p>uartIO.c &#8211; IO routines for both hardware UARTs.</p>
<p>m_i2c_1.c &#8211; Software I2C routines by [<a href="http://www.microchipc.com/sourcecode/#i2c">Michael Pearce</a>]. We couldn&#8217;t get the PIC hardware I2C to work, so we used this helpful library. The software doesn&#8217;t take into account the I2C speed setting, and seems to work at about 5KHz.</p>
<p>SPI.c &#8211; Routines that drive the hardware SPI module.</p>
<p>raw2wire.c &#8211; Software 2-wire interface library.</p>
<p>raw3wire.c &#8211; Software 3-wire (SPI) interface library.</p>
<p>User input is held in a 4000 byte buffer until a newline character (enter) is detected. If the first character of the input is a menu option (see below), the menu dialog is shown, otherwise the string is parsed for data to send over the bus (see syntax). The code consists of an embarrassing number of switch statements and spaghetti code.</p>
<p><strong>Terminal interface</strong></p>
<p>Rather than write a junk piece of software to control the device, we gave it a serial command line interface that will work with any ASCII terminal.  The bus pirate responds to commands with three digit result codes and a short message. The codes are designed with PC automation in mind. We&#8217;ve included a table of result codes in the <a href="http://blog.mahalo.com/hackaday/howto/buspirate.v0b.zip">project archive</a> (zip).</p>
<p><em>Menu options</em></p>
<p>Menu options are single character commands that don&#8217;t involve data transfers. Enter the character, followed by &lt;enter&gt;, to access the menu.</p>
<p><strong>?</strong> &#8211; Show a help menu with commands and syntax.</p>
<p><strong>M</strong> &#8211; Set the bus mode (SPI, I2C, UART, raw 2 wire, raw 3 wire). Followed immediately by a prompt for speed, polarity, and output state (mode dependent).</p>
<ul>
<li>Bus speeds: SPI:30, 125, 250, 1000KHz. I2C:100, 400, 1000KHz. UART: 300, 1200, 2400, 4800, 9600, 19200, 38400, 57600, 115200bps. Raw modes: 1, 10, 50KHz.</li>
<li>Inverse clock setting sets the idle state opposite of normal (normal SPI:idle low; normal UART:idle high): SPI:idle high; UART:idle low.</li>
<li>Some modes have optional high-z output modes for use with pull-up resistors (Low=ground, High=input).</li>
</ul>
<p><strong>L &#8211; </strong>Toggle bit transmit/receive order: most/least significant bit first.</p>
<p><strong>P</strong> &#8211; SDA/SCL pin pull-up resistor toggle (3.3volts). Only valid in I2C and raw 2 wire modes.</p>
<p><strong>O</strong> &#8211; Set number output display format. The terminal can display numbers as decimal, hexadecimal, and binary ASCII values. A fourth format sends the raw, unprocessed byte for reading ASCII formatted text.</p>
<p><em>Syntax</em></p>
<p>A simple syntax is used to communicate with chips over a bus.  Syntax commands have generic functions that generally apply to all bus types.</p>
<p><strong>A/a/@ </strong> &#8211; Toggle auxiliary pin. Capital &#8220;A&#8221; sets AUX high, small &#8220;a&#8221; sets to ground. @ sets aux to input (high impedance mode) and reads the pin value.</p>
<p><strong>[ </strong> - Start data write. SPI/raw 3 wire: chip select enabled. I2C/raw 2 wire: start condition. RS232: open UART, discard received bytes.</p>
<p><strong>{ </strong> - Start data write with reads. Same as [, except: SPI/raw 3 wire: show the read byte for each write. RS232: display data as it arrives asynchronously.</p>
<p><strong>] or }</strong> &#8211; End data write. SPI/raw 3 wire: chip select disabled. I2C/raw 2 wire: stop condition. RS232: close UART.</p>
<p><strong>R/r</strong> &#8211; Read byte. SPI/raw 3 wire: send dummy byte, return read. I2C: read byte with ACK. Raw 2 wire: read 8 bits. RS232: check UART for byte and return, or fail if empty. Use 0r1&#8230;255 for bulk reads up to 255 bytes.</p>
<p><strong>0b</strong> &#8211; Write this binary value. Format is 0b00000000 for a byte, but partial bytes are also fine: 0b1001.</p>
<p><strong>0h or 0x</strong> &#8211; Write this HEX value. Format is 0h01 or 0&#215;01. Partial bytes are fine: 0xA. A-F can be lower-case or capital letters.</p>
<p><strong>0-255</strong> &#8211; Write this decimal value. Any number not preceded by 0x, 0h, or 0b is interpreted as a decimal value.</p>
<p><strong>, or space</strong> -	Value delimiter. Use a coma or space to separate numbers. Any combination is fine, no delimiter is required between non-number values: {0xa6,0, 0 16 5 0b111 0haF}.</p>
<p><em>Direct bus manipulation commands for raw 2 wire mode and raw 3 wire mode.</em><br />
<strong>^</strong> &#8211; Send one clock tick. Use 0^1&#8230;255 for multiple clock ticks.</p>
<p><strong>/ and \</strong> &#8211; Toggle clock level high (/) and low (\). Includes clock delay (100uS).</p>
<p><strong>-/_</strong> &#8211; Toggle data state high (-) and low (_). Includes data setup delay (20uS).</p>
<p><strong>! </strong>- Read one bit with clock.</p>
<p><strong>. </strong>- Read data pin state (no clock).</p>
<p><strong>&amp;</strong> &#8211; Delay 1uS. Use 0&amp;1&#8230;255 for multiple delays.</p>
<p><strong>Using it</strong></p>
<p><strong><img class="alignnone size-full wp-image-5902" title="buspirate-24fv0a" src="http://hackadaycom.files.wordpress.com/2008/11/buspirate-24fv0a.jpg" alt="buspirate-24fv0a" width="450" height="330" /><br />
</strong></p>
<p>Here are two examples that show the Bus Pirate in action. Terminals should be set to ASCII mode with local echo, we used the Windows serial terminal. The PC-side serial connection is 115200bps, 8N1. The Bus Pirate should respond to any single line feed type (0x0a, 0x0d), or both (Windows style).</p>
<p><em><a name="EEPROM">.</a>I2C/SPI &#8211; Flash 24LC1025 EEPROM</em></p>
<p><a href="http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&amp;nodeId=80">Microchip&#8217;s EEPROMS</a> are popular permanent-storage memory chips, the <a href="http://www.microchip.com/wwwproducts/Devices.aspx?dDocName=en024636">24LC1025</a> has 128Kbytes of storage with an I2C interface.  We can test this chip without bread-boarding a big circuit or writing code.</p>
<p><img class="alignnone size-full wp-image-5904" title="i2ceeprom" src="http://hackadaycom.files.wordpress.com/2008/11/i2ceeprom.jpg" alt="i2ceeprom" width="450" height="308" /></p>
<p>The picture shows an 24LC1025 connected to the Bus Pirate. The EEPROM works from 2.7 to 5volts, so we used the 3.3volt supply from the Bus Pirate to power the circuit. The on-board SDA/SCL pull-up resistors hold the I2C bus high, and eliminate the need for external resistors. A single 0.1uF capacitor decouples the EEPROM from the power supply.</p>
<p><span style="text-decoration:underline;">Setup I2C mode</span></p>
<p>First, we setup the Bus Pirate for I2C mode and enable the pull-up resistors. Since the Bus Pirate currently uses a software I2C library, the speed setting doesn&#8217;t really have an effect.</p>
<blockquote><p>SPI&gt;m  <strong>&lt;&#8211;enter m for mode select</strong><br />
1. SPI<br />
2. I2C<br />
3. UART<br />
4. RAW 2 WIRE<br />
5. RAW 3 WIRE<br />
MODE&gt;2  <strong>&lt;&#8211;enter 2 for I2C</strong><br />
900 MODE SET<br />
Set speed:<br />
1. 100KHz (Standard)<br />
2. 400KHz (Fast Mode)<br />
3. 1MHz (High Speed)<br />
SPEED&gt;1 <strong>&lt;&#8211;speed doesn&#8217;t really do anything&#8230;</strong><br />
901 SPEED SET<br />
202 I2C READY, P/p FOR PULLUPS<br />
I2C&gt;P   <strong>&lt;&#8211;enable the I2C pull-up resistors</strong><br />
205 I2C PULLUP ON<br />
I2C&gt;</p></blockquote>
<p><span style="text-decoration:underline;">Write to EEPROM (I2C)</span></p>
<p>All I2C operations begin with a start condition { or [, and end with a stop condition } or ]. A write begins by addressing the device (1 byte) and looking for an acknowledgment bit (ACK). If the EEPROM responds, we can send the data location to write (2 bytes) and data payload (n bytes). The Bus Pirate automatically checks for an ACK at the end of each write, and ACKs each read.</p>
<p>The 24LC1025 base address is 1010xxy, where xx is determined by the state of pins 2 and 3, and y is read (1) or write (0) mode. We tied pins 2 and 3 high, making the full write address <strong>1010110</strong>.  We&#8217;ll start writing to the device at the first data location (<em>0 0</em>), and write one to thirteen using a mix of data input formats (<span style="text-decoration:underline;">1&#8230;13</span>).</p>
<blockquote><p>I2C&gt;{<strong>0b10100110 </strong><em>0 0 </em><span style="text-decoration:underline;">1 2 3 4 5 6 7 8 9 10 0xb 0xc 13</span>} <strong>&lt;&#8211;I2C command </strong><br />
210 I2C START CONDITION <strong>&lt;&#8211;bus start</strong><br />
220 I2C WRITE: 0xA6 GOT ACK: YES <strong>&lt;&#8211;address sent and ACK received</strong><br />
220 I2C WRITE: 0&#215;00 GOT ACK: YES <strong>&lt;&#8211;write address</strong><br />
220 I2C WRITE: 0&#215;00 GOT ACK: YES <strong>&lt;&#8211;write address</strong><br />
220 I2C WRITE: 0&#215;01 GOT ACK: YES <strong>&lt;&#8211;data</strong><br />
&#8230;<br />
220 I2C WRITE: 0x0D GOT ACK: YES<br />
240 I2C STOP CONDITION<br />
I2C&gt;</p></blockquote>
<p><span style="text-decoration:underline;">Read from EEPROM (I2C)</span></p>
<p>Reading the 24LC1025 takes two steps. First, a write command with no data sets the address pointer. Second, a read command outputs data starting at the location set in step 1.</p>
<p>The first command is a write command, we use the hexadecimal equivalent of the write address (0b10100110 = 0xa6) to save a bit of typing. The address pointer is set to the location where we wrote our data (0 0).</p>
<blockquote><p>I2C&gt;{0xa6 0 0} <strong>&lt;&#8211;set write pointer command</strong><br />
210 I2C START CONDITION<br />
220 I2C WRITE: 0xA6 GOT ACK: YES<br />
220 I2C WRITE: 0&#215;00 GOT ACK: YES<br />
220 I2C WRITE: 0&#215;00 GOT ACK: YES<br />
240 I2C STOP CONDITION</p></blockquote>
<p>With the pointer set, we can start reading data. The read address is the device address, with the last bit set to 1 ( 0b10100111 or 0xa7). We used thirteen r commands to read the data, but we could have used the shorthand version: 0r13.</p>
<blockquote><p>I2C&gt;{0b10100111 rrrrrrrrrrrrr}<strong> &lt;&#8211;read command</strong><br />
210 I2C START CONDITION<br />
220 I2C WRITE: 0xA7 GOT ACK: YES <strong>&lt;&#8211;chip ACKed the read address</strong><br />
230 I2C READ: 0&#215;01 <strong>&lt;&#8211;data byte 1</strong><br />
230 I2C READ: 0&#215;02 <strong>&lt;&#8211;data byte 2</strong><br />
&#8230;<br />
230 I2C READ: 0x0D <strong>&lt;&#8211;data byte 13</strong><br />
240 I2C STOP CONDITION<br />
I2C&gt;</p></blockquote>
<p>We know the operation was a success because the output matches the data we wrote earlier.</p>
<p><em>UART &#8211; EM406 SurfIII GPS</em></p>
<p><img class="alignnone size-full wp-image-5905" title="gps" src="http://hackadaycom.files.wordpress.com/2008/11/gps.jpg" alt="gps" width="450" height="338" /></p>
<p>The <a href="http://www.sparkfun.com/commerce/product_info.php?products_id=465">EM406</a> is a tiny 5volt GPS module that tracks up to 20 satellites. By default, it outputs NMEA formatted data from a serial port at 4800bps, 8N1. The output format is standard serial, but at 2.8volts it&#8217;s incompatible with PC serial ports. The Bus Pirate can interface this GPS without the need for a separate RS232 transceiver or 5volt power supply.</p>
<p><span style="text-decoration:underline;">Setup the UART</span></p>
<p>First, we setup the Bus Pirate UART to receive serial data at 4800bps.</p>
<blockquote><p>I2C&gt;m <strong>&lt;&#8211;setup mode</strong><br />
1. SPI<br />
2. I2C<br />
3. UART<br />
4. RAW 2 WIRE<br />
5. RAW 3 WIRE<br />
MODE&gt;3 <strong>&lt;&#8211;UART</strong><br />
900 MODE SET<br />
Set speed:<br />
(bps)<br />
1. 300<br />
2. 1200<br />
3. 2400<br />
4. 4800<br />
&#8230;<br />
9. 115200<br />
SPEED&gt;4  <strong>&lt;&#8211;4800bps</strong><br />
901 SPEED SET<br />
302 UART READY<br />
UART&gt;</p></blockquote>
<p><span style="text-decoration:underline;">Enable UART and data reads</span></p>
<p>An important thing to remember about UARTs is that the data arrives asynchronously. Unlike SPI and I2C, where data transfer is controlled by the master, serial data can arrive at the UART at any time. The GPS is a great example of this because it spits out location data continuously, without user intervention.</p>
<p>We developed two read modes to cope with asynchronous data .  { echos all incoming data as it arrives.  New data will displace and garble data entry, but all input is still accepted normally.  [ opens the UART in a send only mode that discards incoming bytes. } or ] closes the UART, regardless of the mode.</p>
<blockquote><p>UART&gt;{ <strong>&lt;&#8211;open UART with async reads</strong><br />
310 UART OPEN, } TO CLOSE<br />
330 UART READ: 0&#215;80 <strong>&lt;&#8211;GPS data</strong><br />
330 UART READ: 0&#215;78</p></blockquote>
<p><span style="text-decoration:underline;">Write to the UART</span></p>
<p>Type in values to send out the UART. Even if the input is broken up by incoming data, it will be processed on &lt;enter&gt;.  We sent <em>0&#215;40</em> as an example, but this has no particular meaning to the GPS module.</p>
<blockquote><p>330 UART READ: 0&#215;80 <em>0&#215;40</em><strong>&lt;&#8211;random byte to write</strong><br />
320 UART WRITE: 0&#215;40 <strong>&lt;&#8211;byte written</strong></p></blockquote>
<p><span style="text-decoration:underline;">Close the UART</span></p>
<p>&#8220;}&#8221; followed by &lt;enter&gt; closes the UART.</p>
<blockquote><p>330 UART READ: 0&#215;78<br />
303 UART READ: 0&#215;60 <em>} </em><strong>&lt;&#8211;close UART command</strong><br />
330 UART READ: 0xE6<br />
340 UART CLOSED<br />
UART&gt;</p></blockquote>
<p>Don&#8217;t think you can use this GPS data to track us, we don&#8217;t actually get satellite reception down here in mom&#8217;s basement.</p>
<p><strong>Taking it further</strong></p>
<p>The Bus Pirate is an important development tool in our lab. We keep updating it as we use it, and we&#8217;ll release new firmware as we add protocols and features. Expect to see the Bus Pirate in future articles.</p>
<p>These improvements are at the top of our list. Do you have any suggestions?</p>
<ul>
<li>New protocols: One Wire, CAN, ???</li>
<li>Controls for polarity and other settings</li>
<li>Adjustable instruction delay</li>
<li>Get hardware I2C module working.</li>
<li>Enable protocol speed settings.</li>
<li>Cheaper, easier to get RS232 transceiver</li>
</ul>
<p>The <a href="http://blog.mahalo.com/hackaday/howto/buspirate.v0b.zip">project archive</a> (ZIP) has everything you need to build your own Bus Pirate.</p>
<br />Posted in hardware, how-to, tool hacks  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/hackadaycom.wordpress.com/5882/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/hackadaycom.wordpress.com/5882/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/hackadaycom.wordpress.com/5882/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/hackadaycom.wordpress.com/5882/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/hackadaycom.wordpress.com/5882/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/hackadaycom.wordpress.com/5882/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/hackadaycom.wordpress.com/5882/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/hackadaycom.wordpress.com/5882/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/hackadaycom.wordpress.com/5882/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/hackadaycom.wordpress.com/5882/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/hackadaycom.wordpress.com/5882/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/hackadaycom.wordpress.com/5882/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/hackadaycom.wordpress.com/5882/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/hackadaycom.wordpress.com/5882/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hackaday.com&amp;blog=4779443&amp;post=5882&amp;subd=hackadaycom&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://hackaday.com/2008/11/19/how-to-the-bus-pirate-universal-serial-interface/feed/</wfw:commentRss>
		<slash:comments>54</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">Ian</media:title>
		</media:content>

		<media:content url="http://hackadaycom.files.wordpress.com/2008/11/i2ceeprom.jpg" medium="image">
			<media:title type="html">i2ceeprom</media:title>
		</media:content>

		<media:content url="http://hackadaycom.files.wordpress.com/2008/11/overview-diagram-new.png" medium="image">
			<media:title type="html">overview-diagram-new</media:title>
		</media:content>

		<media:content url="http://hackadaycom.files.wordpress.com/2008/11/terminal-450.png" medium="image">
			<media:title type="html">terminal-450</media:title>
		</media:content>

		<media:content url="http://hackadaycom.files.wordpress.com/2008/11/brd-450.png" medium="image">
			<media:title type="html">brd-450</media:title>
		</media:content>

		<media:content url="http://hackadaycom.files.wordpress.com/2008/11/cct-450.png" medium="image">
			<media:title type="html">cct-450</media:title>
		</media:content>

		<media:content url="http://hackadaycom.files.wordpress.com/2008/11/buspirate-24fv0a.jpg" medium="image">
			<media:title type="html">buspirate-24fv0a</media:title>
		</media:content>

		<media:content url="http://hackadaycom.files.wordpress.com/2008/11/i2ceeprom.jpg" medium="image">
			<media:title type="html">i2ceeprom</media:title>
		</media:content>

		<media:content url="http://hackadaycom.files.wordpress.com/2008/11/gps.jpg" medium="image">
			<media:title type="html">gps</media:title>
		</media:content>
	</item>
	</channel>
</rss>
