<?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; 1-wire</title>
	<atom:link href="http://hackaday.com/tag/1-wire/feed/" rel="self" type="application/rss+xml" />
	<link>http://hackaday.com</link>
	<description>Fresh hacks every day</description>
	<lastBuildDate>Sun, 12 Feb 2012 06:24:26 +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; 1-wire</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>Wireless 4 Channel Temperature Monitor From Arduino Libraries</title>
		<link>http://hackaday.com/2011/05/23/wireless-4-channel-temperature-monitor-from-arduino-libraries/</link>
		<comments>http://hackaday.com/2011/05/23/wireless-4-channel-temperature-monitor-from-arduino-libraries/#comments</comments>
		<pubDate>Mon, 23 May 2011 13:11:58 +0000</pubDate>
		<dc:creator>Jesse Congdon</dc:creator>
				<category><![CDATA[arduino hacks]]></category>
		<category><![CDATA[1-wire]]></category>
		<category><![CDATA[arduino]]></category>
		<category><![CDATA[character lcd]]></category>
		<category><![CDATA[temperature sensor]]></category>

		<guid isPermaLink="false">http://hackaday.com/?p=43407</guid>
		<description><![CDATA[Say what you will about the Arduino platform but there certainly are a ton of libraries one can choose from. That is precisely what [Dan Julio] set out to do when building his slick looking 4 channel temperature monitor. The monitor consists of an Arduino RBBB, 2&#215;16 character LCD and four DS18B20 1-wire digital thermometers. [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hackaday.com&amp;blog=4779443&amp;post=43407&amp;subd=hackadaycom&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><img class="alignnone size-full wp-image-43423" title="tempmon" src="http://hackadaycom.files.wordpress.com/2011/05/tempmon1.png" alt="" width="467" height="344" /></p>
<p>Say what you will about the Arduino platform but there certainly are a ton of libraries one can choose from. That is precisely what [Dan Julio] set out to do when building his slick looking 4 channel <a href="http://www.danjuliodesigns.com/projects/projects/temp_monitor.html">temperature monitor</a>. The monitor consists of an Arduino <a href="http://shop.moderndevice.com/products/rbbb-kit">RBBB</a>, 2&#215;16 character LCD and four <a href="http://www.sparkfun.com/products/245">DS18B20</a> 1-wire digital thermometers. [Dan] also includes a bluesmirf to interface with an OS X monitoring program.  Using libraries for the Bluetooth, LCD, and temperature monitors the Arduino code is only about 200 lines, and pretty easy to follow. Check out more at [Dan]&#8216;s<a href="http://www.danjuliodesigns.com/projects/projects/temp_monitor.html"> site</a>.</p>
<p>If you&#8217;d like more temperature sensor projects check out this <a href="http://hackaday.com/2011/04/12/temperature-sensing-mug-means-never-burning-your-mouth-again/">mug</a> or this <a href="http://hackaday.com/2011/04/10/pic-based-temperature-logger-with-onboard-storage/">PIC based</a> monitor or perhaps you&#8217;d like to keep it in the <a href="http://hackaday.com/2011/04/08/compost-heap-temperature-logger-helps-keep-things-hot/">Atmel</a> family.</p>
<br />Filed under: <a href='http://hackaday.com/category/arduino-hacks/'>arduino hacks</a>  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/hackadaycom.wordpress.com/43407/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/hackadaycom.wordpress.com/43407/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/hackadaycom.wordpress.com/43407/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/hackadaycom.wordpress.com/43407/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/hackadaycom.wordpress.com/43407/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/hackadaycom.wordpress.com/43407/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/hackadaycom.wordpress.com/43407/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/hackadaycom.wordpress.com/43407/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/hackadaycom.wordpress.com/43407/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/hackadaycom.wordpress.com/43407/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/hackadaycom.wordpress.com/43407/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/hackadaycom.wordpress.com/43407/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/hackadaycom.wordpress.com/43407/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/hackadaycom.wordpress.com/43407/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hackaday.com&amp;blog=4779443&amp;post=43407&amp;subd=hackadaycom&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://hackaday.com/2011/05/23/wireless-4-channel-temperature-monitor-from-arduino-libraries/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">jcongdon</media:title>
		</media:content>

		<media:content url="http://hackadaycom.files.wordpress.com/2011/05/tempmon1.png" medium="image">
			<media:title type="html">tempmon</media:title>
		</media:content>
	</item>
		<item>
		<title>1-Wire LAN with an LCD</title>
		<link>http://hackaday.com/2010/03/23/1-wire-lan-with-an-lcd/</link>
		<comments>http://hackaday.com/2010/03/23/1-wire-lan-with-an-lcd/#comments</comments>
		<pubDate>Tue, 23 Mar 2010 13:10:36 +0000</pubDate>
		<dc:creator>Jakob Griffith</dc:creator>
				<category><![CDATA[misc hacks]]></category>
		<category><![CDATA[peripherals hacks]]></category>
		<category><![CDATA[1-wire]]></category>
		<category><![CDATA[data]]></category>
		<category><![CDATA[fonera]]></category>
		<category><![CDATA[hub]]></category>
		<category><![CDATA[hvac]]></category>
		<category><![CDATA[ibutton]]></category>
		<category><![CDATA[interface]]></category>
		<category><![CDATA[IPv6]]></category>
		<category><![CDATA[lcd]]></category>
		<category><![CDATA[microlan]]></category>
		<category><![CDATA[OWFS]]></category>

		<guid isPermaLink="false">http://hackaday.com/?p=22652</guid>
		<description><![CDATA[[Viktor], one of our favorite avid hackers, has been playing around with 1-wire systems all this month. What started out as a MicroLAN Fonera has turned into an iButton interface, to a 1-wire powered hub, and finally a 1-wire character driven LCD. Anyone looking at 1-wire systems or OWFS could surely benefit from his testing. [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hackaday.com&amp;blog=4779443&amp;post=22652&amp;subd=hackadaycom&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><img class="alignnone size-full wp-image-22653" title="lcdbrd" src="http://hackadaycom.files.wordpress.com/2010/03/lcdbrd.jpg" alt="" width="470" height="268" /></p>
<p>[Viktor], one of our favorite avid hackers, has been playing around with 1-wire systems all this month. What started out as a <a href="http://www.karosium.com/2010/03/fonera-1-wire-microlan-extension.html">MicroLAN Fonera</a> has turned into an <a href="http://hackaday.com/2009/07/09/hacking-an-ibutton/">iButton interface</a>, to a 1-wire <a href="http://www.karosium.com/2010/03/fonera-1-wire-continued-hub.html">powered hub</a>, and finally a 1-wire <a href="http://www.karosium.com/2010/03/fonera-1-wire-continued-display.html">character driven LCD</a>. Anyone looking at 1-wire systems or OWFS could surely benefit from his testing.</p>
<p>However, if you still haven&#8217;t gotten your fill of 1-wire goodness, let us remind you of the 1-wire <a href="http://hackaday.com/2009/07/29/1-wire-hvac-monitoring-system/">HVAC</a> and <a href="http://hackaday.com/2009/12/02/ipv6-to-1-wire-protocol-translator/">IPv6 to 1-wire protocol translator</a>.</p>
<p>[Thanks Juan]</p>
<br />Filed under: <a href='http://hackaday.com/category/misc-hacks/'>misc hacks</a>, <a href='http://hackaday.com/category/peripherals-hacks/'>peripherals hacks</a>  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/hackadaycom.wordpress.com/22652/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/hackadaycom.wordpress.com/22652/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/hackadaycom.wordpress.com/22652/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/hackadaycom.wordpress.com/22652/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/hackadaycom.wordpress.com/22652/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/hackadaycom.wordpress.com/22652/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/hackadaycom.wordpress.com/22652/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/hackadaycom.wordpress.com/22652/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/hackadaycom.wordpress.com/22652/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/hackadaycom.wordpress.com/22652/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/hackadaycom.wordpress.com/22652/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/hackadaycom.wordpress.com/22652/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/hackadaycom.wordpress.com/22652/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/hackadaycom.wordpress.com/22652/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hackaday.com&amp;blog=4779443&amp;post=22652&amp;subd=hackadaycom&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://hackaday.com/2010/03/23/1-wire-lan-with-an-lcd/feed/</wfw:commentRss>
		<slash:comments>14</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">Jakob Griffith</media:title>
		</media:content>

		<media:content url="http://hackadaycom.files.wordpress.com/2010/03/lcdbrd.jpg" medium="image">
			<media:title type="html">lcdbrd</media:title>
		</media:content>
	</item>
		<item>
		<title>Temperature and electricity monitoring</title>
		<link>http://hackaday.com/2009/12/23/temperature-and-electricity-monitoring/</link>
		<comments>http://hackaday.com/2009/12/23/temperature-and-electricity-monitoring/#comments</comments>
		<pubDate>Wed, 23 Dec 2009 16:00:48 +0000</pubDate>
		<dc:creator>Mike Szczys</dc:creator>
				<category><![CDATA[arduino hacks]]></category>
		<category><![CDATA[green hacks]]></category>
		<category><![CDATA[home hacks]]></category>
		<category><![CDATA[1-wire]]></category>
		<category><![CDATA[dallas]]></category>
		<category><![CDATA[ds18s20]]></category>
		<category><![CDATA[ethernet]]></category>
		<category><![CDATA[graph]]></category>
		<category><![CDATA[shield]]></category>
		<category><![CDATA[temperature]]></category>

		<guid isPermaLink="false">http://hackaday.com/?p=19681</guid>
		<description><![CDATA[[Willem] has been using an Arduino to monitor temperatures and electricity usage. For the temperature monitoring he picked up some 1-wire temperature sensors similar to those we&#8217;ve featured in the past. To pick up on electricity usage he&#8217;s not using an amp sensors, but because he&#8217;s in the UK he does have a flashing LED [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hackaday.com&amp;blog=4779443&amp;post=19681&amp;subd=hackadaycom&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><img class="alignnone size-full wp-image-19682" title="temperature-and-power-arduino" src="http://hackadaycom.files.wordpress.com/2009/12/temperature-and-power-arduino.jpg" alt="" width="470" height="183" /></p>
<p>[Willem] has been using an <a href="http://www.secretbatcave.co.uk/electronics/arduino/arduino-house-monitor.html">Arduino to monitor temperatures and electricity usage</a>. For the temperature monitoring he picked up some 1-wire temperature sensors similar to those we&#8217;ve <a href="http://hackaday.com/2008/12/10/parts-1-wire-temperature-sensor-ds1822/">featured in the past</a>. To pick up on electricity usage he&#8217;s not using an <a href="http://hackaday.com/2009/12/21/c-clamp-current-monitoring/">amp sensors</a>, but because he&#8217;s in the UK he does have a flashing LED on his power meter. There&#8217;s a <a href="http://hackaday.com/2007/05/30/uk-power-meter-monitor/">known trick</a> to pick up these flashes with a photo cell to calculate energy usage based on meter readings. Finally, the data from the three sensors (indoor temp, outdoor temp, and energy usage) is piped over the Internet via an Ethernet shield so that it can be collected and graphed.</p>
<p>[Willem] has had the system running for a year. If you&#8217;re nosy you can look at the <a href="http://www.secretbatcave.co.uk/electronics/arduino/tempYear.png">temperature graph</a> generated from his collected data.</p>
<br />Posted in arduino hacks, green hacks, home hacks  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/hackadaycom.wordpress.com/19681/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/hackadaycom.wordpress.com/19681/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/hackadaycom.wordpress.com/19681/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/hackadaycom.wordpress.com/19681/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/hackadaycom.wordpress.com/19681/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/hackadaycom.wordpress.com/19681/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/hackadaycom.wordpress.com/19681/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/hackadaycom.wordpress.com/19681/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/hackadaycom.wordpress.com/19681/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/hackadaycom.wordpress.com/19681/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/hackadaycom.wordpress.com/19681/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/hackadaycom.wordpress.com/19681/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/hackadaycom.wordpress.com/19681/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/hackadaycom.wordpress.com/19681/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hackaday.com&amp;blog=4779443&amp;post=19681&amp;subd=hackadaycom&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://hackaday.com/2009/12/23/temperature-and-electricity-monitoring/feed/</wfw:commentRss>
		<slash:comments>5</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/2009/12/temperature-and-power-arduino.jpg" medium="image">
			<media:title type="html">temperature-and-power-arduino</media:title>
		</media:content>
	</item>
		<item>
		<title>1wire attic cooling</title>
		<link>http://hackaday.com/2009/07/31/1wire-attic-cooling/</link>
		<comments>http://hackaday.com/2009/07/31/1wire-attic-cooling/#comments</comments>
		<pubDate>Fri, 31 Jul 2009 17:01:00 +0000</pubDate>
		<dc:creator>Steve Watkins</dc:creator>
				<category><![CDATA[home hacks]]></category>
		<category><![CDATA[misc hacks]]></category>
		<category><![CDATA[pcs hacks]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[1-wire]]></category>
		<category><![CDATA[Attic]]></category>
		<category><![CDATA[Attic fan]]></category>
		<category><![CDATA[controller]]></category>
		<category><![CDATA[electronics]]></category>
		<category><![CDATA[usb]]></category>
		<category><![CDATA[x-10]]></category>

		<guid isPermaLink="false">http://hackaday.com/?p=13051</guid>
		<description><![CDATA[[RagingComputer] built this 1-wire attic cooling fan. He&#8217;s using an Ubuntu server loaded with OWFS to control everything. The 1-wire temperature sensor is interfaced using USB while a serial x10 module sends out commands to be received by another x10 module near the fan. Back in the day we had covered a linux home automation project. [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hackaday.com&amp;blog=4779443&amp;post=13051&amp;subd=hackadaycom&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><img class="alignnone size-full wp-image-13058" title="blower" src="http://hackadaycom.files.wordpress.com/2009/07/blower.jpg" alt="blower" width="450" height="254" /></p>
<p>[RagingComputer] built this <a href="http://www.ragingcomputer.com/archives/101" target="_blank">1-wire attic cooling</a> fan. He&#8217;s using an Ubuntu server loaded with <a href="http://owfs.org/" target="_blank">OWFS</a> to control everything. The <a href="http://en.wikipedia.org/wiki/OneWire" target="_blank">1-wire</a> temperature sensor is interfaced using USB while a serial x10 module sends out commands to be received by another x10 module near the fan. Back in the day we had covered a <a href="http://hackaday.com/2005/07/26/linux-home-automation/" target="_blank">linux home automation</a> project. We also covered HVAC hacks such as the<a href="http://hackaday.com/?s=attic+fan" target="_blank"> smart attic fan</a> and a <a href="http://hackaday.com/2009/07/29/1-wire-hvac-monitoring-system/" target="_blank">1-Wire HVAC monitoring system</a>.</p>
<br />Posted in home hacks, misc hacks, pcs hacks, Uncategorized  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/hackadaycom.wordpress.com/13051/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/hackadaycom.wordpress.com/13051/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/hackadaycom.wordpress.com/13051/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/hackadaycom.wordpress.com/13051/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/hackadaycom.wordpress.com/13051/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/hackadaycom.wordpress.com/13051/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/hackadaycom.wordpress.com/13051/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/hackadaycom.wordpress.com/13051/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/hackadaycom.wordpress.com/13051/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/hackadaycom.wordpress.com/13051/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/hackadaycom.wordpress.com/13051/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/hackadaycom.wordpress.com/13051/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/hackadaycom.wordpress.com/13051/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/hackadaycom.wordpress.com/13051/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hackaday.com&amp;blog=4779443&amp;post=13051&amp;subd=hackadaycom&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://hackaday.com/2009/07/31/1wire-attic-cooling/feed/</wfw:commentRss>
		<slash:comments>28</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">2s2t2e</media:title>
		</media:content>

		<media:content url="http://hackadaycom.files.wordpress.com/2009/07/blower.jpg" medium="image">
			<media:title type="html">blower</media:title>
		</media:content>
	</item>
		<item>
		<title>Parts: Unboxing the Bus Pirate</title>
		<link>http://hackaday.com/2009/07/20/parts-unboxing-the-bus-pirate/</link>
		<comments>http://hackaday.com/2009/07/20/parts-unboxing-the-bus-pirate/#comments</comments>
		<pubDate>Mon, 20 Jul 2009 19:00:32 +0000</pubDate>
		<dc:creator>Ian</dc:creator>
				<category><![CDATA[parts]]></category>
		<category><![CDATA[tool hacks]]></category>
		<category><![CDATA[1-wire]]></category>
		<category><![CDATA[bus pirate]]></category>
		<category><![CDATA[i2c]]></category>
		<category><![CDATA[jtag]]></category>
		<category><![CDATA[preorder]]></category>
		<category><![CDATA[serial interface]]></category>
		<category><![CDATA[spi]]></category>
		<category><![CDATA[unboxing]]></category>

		<guid isPermaLink="false">http://hackaday.com/?p=12819</guid>
		<description><![CDATA[For months we&#8217;ve used our Bus Pirate universal serial interface tool to demonstrate electronics parts, so it&#8217;s only appropriate that the Bus Pirate get it&#8217;s own parts post. We recently had a Bus Pirate preorder, and today we received the pre-production Bus Pirate prototype from Seeed Studio. This prototype was mailed just a few days [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hackaday.com&amp;blog=4779443&amp;post=12819&amp;subd=hackadaycom&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><img class="alignnone size-full wp-image-12833" title="bp-unbox-3" src="http://hackadaycom.files.wordpress.com/2009/07/bp-unbox-3.jpg" alt="bp-unbox-3" width="470" height="326" /></p>
<p>For months we&#8217;ve used our <a href="http://www.buspirate.com">Bus Pirate universal serial interface tool</a> to demonstrate <a href="http://hackaday.com/category/parts/">electronics parts</a>, so it&#8217;s only appropriate that the Bus Pirate  get it&#8217;s own parts post. We recently had a <a href="http://hackaday.com/2009/06/25/bus-pirate-preorders-open/">Bus Pirate preorder</a>, and today we received the pre-production Bus Pirate prototype from <a href="http://www.seeedstudio.com/depot/">Seeed Studio</a>. This prototype was mailed just a few days before <a href="http://hackaday.com/2009/07/16/bus-pirate-preorder-1-ships/">preorder 1 started to ship</a>, so those packages should  start arriving any day.</p>
<p>Follow along as we unbox the prototype Bus Pirate, and connect it to a debugger to determine  the <a href="http://www.microchip.com/wwwproducts/Devices.aspx?dDocName=en026374">PIC24FJ64GA002-I/SO</a> revision that shipped with this board. Use this post to share your own Bus Pirate unboxing experience. Pictures and discussion after the break.</p>
<p><span id="more-12819"></span></p>
<p><img class="alignnone size-full wp-image-12831" title="bp-unbox-1" src="http://hackadaycom.files.wordpress.com/2009/07/bp-unbox-1.jpg" alt="bp-unbox-1" width="470" height="328" /></p>
<p>Most Bus Pirates will ship <a href="http://hackadaycom.files.wordpress.com/2009/07/ready-envelope-470.jpg?w=470&amp;h=312">in a padded envelope</a> (JPG), but ours came in a box with some PCBs for future projects and  an AVR programmer.</p>
<p><img class="alignnone size-full wp-image-12832" title="bp-unbox-2" src="http://hackadaycom.files.wordpress.com/2009/07/bp-unbox-2.jpg" alt="bp-unbox-2" width="470" height="287" /></p>
<p>Inside the box, the Bus Pirate is protected by a <em>static dissipative</em> bag. The Bus Pirate pin headers are stuck in foam to protect the packaging.</p>
<p><img class="alignnone size-full wp-image-12834" title="bp-unbox-5" src="http://hackadaycom.files.wordpress.com/2009/07/bp-unbox-5.jpg" alt="bp-unbox-5" width="470" height="350" /></p>
<p>We ran a battery of functionality tests that covered USB, the user terminal, protocol libraries, power supplies, and pullup resistors. Everything passed our tests.</p>
<p>Next, we used a Microchip ICD2 debugger/programmer to  make a backup of the firmware prior to doing a test upgrade/downgrade with the bootloader.</p>
<blockquote><p>Connecting to MPLAB ICD 2<br />
&#8230;Connected<br />
Setting Vdd source to target<br />
<strong>Target Device PIC24FJ64GA002 found, <span style="text-decoration:underline;">revision = Rev 0&#215;3042</span></strong><br />
&#8230;Reading ICD Product ID<br />
Running ICD Self Test<br />
&#8230;Passed<br />
MPLAB ICD 2 ready for next operation</p></blockquote>
<p>All of our previous Bus Pirate version were built using Rev 0&#215;3003 (A3) of the PIC 24FJ64GA002. Version A3 has a few issues, known as <a href="http://ww1.microchip.com/downloads/en/DeviceDoc/80470a.pdf">errata</a> (PDF), one of which is a <a href="http://www.google.com/codesearch/url?ct=ext&amp;url=http://forum.microchip.com/tm.aspx%3Fm%3D271183%26mpage%3D1&amp;usg=AFQjCNFvedVtagkyXzTS-vmSKIk3OE0eiw">flaky hardware I2C module</a>. These chips aren&#8217;t &#8216;defective&#8217;, they just have a few quirks like any complicated integrated circuit. The Bus Pirate firmware works around these issues using software techniques. Most desktop computer processors go through a similar stepping process.</p>
<p>Our Bus Pirate appears to have a B4 revision PIC (0&#215;3042) that corrects some, but not all, of the errata from A3. This is no guarantee that every Bus Pirate will have a B4 PIC, preorder 1 and 2 are both sourced from multiple international vendors. Additionally, there&#8217;s no immediate benefit from having a B4 chip, someone will have to write software that takes advantage of the hardware. The next  firmware update will print the PIC revision in the user terminal, check the <a href="http://code.google.com/p/the-bus-pirate/source/browse/#svn/trunk/firmware/v0h-nightly">nightly compiles</a> if you&#8217;re anxious.</p>
<p>There is a revision B5 mentioned in the PIC errata. Some of these might find their way into preorder 2 boards.</p>
<p><img class="alignnone size-full wp-image-12830" title="bp-unbox-0" src="http://hackadaycom.files.wordpress.com/2009/07/bp-unbox-0.jpg" alt="bp-unbox-0" width="470" height="361" /></p>
<p>Now that you&#8217;ve got your Bus Pirate, what do you do with it? We&#8217;ve got a bunch of <a href="http://hackaday.com/the-bus-pirate-universal-serial-interface/">part demonstrations</a> to get you started.</p>
<p>Please leave a comment about your unboxing experience, and the devices you plan to interface.</p>
<br />Posted in parts, tool hacks  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/hackadaycom.wordpress.com/12819/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/hackadaycom.wordpress.com/12819/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/hackadaycom.wordpress.com/12819/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/hackadaycom.wordpress.com/12819/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/hackadaycom.wordpress.com/12819/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/hackadaycom.wordpress.com/12819/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/hackadaycom.wordpress.com/12819/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/hackadaycom.wordpress.com/12819/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/hackadaycom.wordpress.com/12819/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/hackadaycom.wordpress.com/12819/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/hackadaycom.wordpress.com/12819/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/hackadaycom.wordpress.com/12819/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/hackadaycom.wordpress.com/12819/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/hackadaycom.wordpress.com/12819/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hackaday.com&amp;blog=4779443&amp;post=12819&amp;subd=hackadaycom&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://hackaday.com/2009/07/20/parts-unboxing-the-bus-pirate/feed/</wfw:commentRss>
		<slash:comments>43</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">Ian</media:title>
		</media:content>

		<media:content url="http://hackadaycom.files.wordpress.com/2009/07/bp-unbox-3.jpg" medium="image">
			<media:title type="html">bp-unbox-3</media:title>
		</media:content>

		<media:content url="http://hackadaycom.files.wordpress.com/2009/07/bp-unbox-1.jpg" medium="image">
			<media:title type="html">bp-unbox-1</media:title>
		</media:content>

		<media:content url="http://hackadaycom.files.wordpress.com/2009/07/bp-unbox-2.jpg" medium="image">
			<media:title type="html">bp-unbox-2</media:title>
		</media:content>

		<media:content url="http://hackadaycom.files.wordpress.com/2009/07/bp-unbox-5.jpg" medium="image">
			<media:title type="html">bp-unbox-5</media:title>
		</media:content>

		<media:content url="http://hackadaycom.files.wordpress.com/2009/07/bp-unbox-0.jpg" medium="image">
			<media:title type="html">bp-unbox-0</media:title>
		</media:content>
	</item>
		<item>
		<title>Hacking an iButton</title>
		<link>http://hackaday.com/2009/07/09/hacking-an-ibutton/</link>
		<comments>http://hackaday.com/2009/07/09/hacking-an-ibutton/#comments</comments>
		<pubDate>Fri, 10 Jul 2009 01:30:54 +0000</pubDate>
		<dc:creator>Zach Banks</dc:creator>
				<category><![CDATA[peripherals hacks]]></category>
		<category><![CDATA[security hacks]]></category>
		<category><![CDATA[tool hacks]]></category>
		<category><![CDATA[1-wire]]></category>
		<category><![CDATA[atmega]]></category>
		<category><![CDATA[AVR]]></category>
		<category><![CDATA[diy]]></category>
		<category><![CDATA[electronics]]></category>
		<category><![CDATA[ibutton]]></category>
		<category><![CDATA[maxim]]></category>
		<category><![CDATA[microcontroller]]></category>
		<category><![CDATA[money]]></category>
		<category><![CDATA[security]]></category>

		<guid isPermaLink="false">http://hackaday.com/?p=12583</guid>
		<description><![CDATA[Maxim&#8217;s iButtons, which are small ICs in button-sized disks, are starting to show up in more and more places. They have a range of uses, from temperature loggers to identification, and all use the 1-wire protocol to communicate. Over a furrtek, they hacked an iButton used for buying things from vending machines and created an [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hackaday.com&amp;blog=4779443&amp;post=12583&amp;subd=hackadaycom&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><img class="alignnone size-full wp-image-12585" title="breadboard1" src="http://hackadaycom.files.wordpress.com/2009/07/breadboard1.jpg" alt="breadboard1" width="450" height="243" /></p>
<p>Maxim&#8217;s <a href="http://www.maxim-ic.com/products/ibutton/">iButtons</a>, which are small ICs in button-sized disks, are starting to show up in more and more places. They have a range of uses, from temperature loggers to identification, and all use the 1-wire protocol to communicate. Over a <a href="http://furrtek.free.fr/index.php?p=crea&amp;a=ibutton&amp;i=2">furrtek</a>, they hacked an iButton used for buying things from vending machines and created an infinite money cheat. They built a small rig based on the ATmega8 to read and write data to the chip. The data was encrypted, so it wasn&#8217;t feasible to put an arbitrary amount on the card. Instead, they used a similar technique to the <a href="http://hackaday.com/2008/08/09/defcon-16-mit-boston-transit-presentation-gagged/">Boston subway hack</a> and restored a previous state to the iButton after something was bought. They also created a hand-held device to backup and restore the contents of a button for portable hacking.</p>
<p>[Thanks furrtek]</p>
<br />Posted in peripherals hacks, security hacks, tool hacks  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/hackadaycom.wordpress.com/12583/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/hackadaycom.wordpress.com/12583/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/hackadaycom.wordpress.com/12583/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/hackadaycom.wordpress.com/12583/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/hackadaycom.wordpress.com/12583/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/hackadaycom.wordpress.com/12583/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/hackadaycom.wordpress.com/12583/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/hackadaycom.wordpress.com/12583/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/hackadaycom.wordpress.com/12583/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/hackadaycom.wordpress.com/12583/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/hackadaycom.wordpress.com/12583/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/hackadaycom.wordpress.com/12583/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/hackadaycom.wordpress.com/12583/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/hackadaycom.wordpress.com/12583/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hackaday.com&amp;blog=4779443&amp;post=12583&amp;subd=hackadaycom&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://hackaday.com/2009/07/09/hacking-an-ibutton/feed/</wfw:commentRss>
		<slash:comments>22</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">zbanks</media:title>
		</media:content>

		<media:content url="http://hackadaycom.files.wordpress.com/2009/07/breadboard1.jpg" medium="image">
			<media:title type="html">breadboard1</media:title>
		</media:content>
	</item>
		<item>
		<title>How-to: The Bus Pirate V2 with USB</title>
		<link>http://hackaday.com/2009/06/25/how-to-the-bus-pirate-v2-with-usb/</link>
		<comments>http://hackaday.com/2009/06/25/how-to-the-bus-pirate-v2-with-usb/#comments</comments>
		<pubDate>Fri, 26 Jun 2009 00:15:21 +0000</pubDate>
		<dc:creator>Ian</dc:creator>
				<category><![CDATA[hardware]]></category>
		<category><![CDATA[how-to]]></category>
		<category><![CDATA[tool hacks]]></category>
		<category><![CDATA[1-wire]]></category>
		<category><![CDATA[bus pirate]]></category>
		<category><![CDATA[i2c]]></category>
		<category><![CDATA[jtag]]></category>
		<category><![CDATA[midi]]></category>
		<category><![CDATA[pc keyboard]]></category>
		<category><![CDATA[spi]]></category>
		<category><![CDATA[the bus pirate]]></category>
		<category><![CDATA[uart]]></category>
		<category><![CDATA[universal serial interface]]></category>

		<guid isPermaLink="false">http://hackaday.com/?p=10041</guid>
		<description><![CDATA[Update, Saturday July 4th, 2009: All preorders are closed. The Bus Pirate is a universal serial interface tool, we use it to test new chips without writing any code. It currently supports most serial protocols, including 1-Wire, I2C, SPI, JTAG, asynchronous serial, MIDI, and more. We added some other features we frequently need, like pulse-width [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hackaday.com&amp;blog=4779443&amp;post=10041&amp;subd=hackadaycom&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><img class="alignnone size-full wp-image-10467" title="buspiratev2goii450" src="http://hackadaycom.files.wordpress.com/2009/04/buspiratev2goii450.jpg" alt="buspiratev2goii450" width="450" height="314" /></p>
<p><strong>Update, Saturday July 4th, 2009: </strong>All preorders are closed.</p>
<p>The <a href="http://www.buspirate.com">Bus Pirate</a> is a universal serial interface tool, we use it to <a href="http://hackaday.com/category/parts/">test new chips</a> without writing any code. It currently supports most serial protocols, including 1-Wire, I2C, SPI, JTAG, asynchronous serial, MIDI, and more. We added some other features we frequently need, like pulse-width modulation, frequency measurement, voltage measurement, bus sniffers, pull-up resistors, and switchable 3.3volt and 5volt power supplies.</p>
<p>The new v2 family adds USB power and connectivity to the best Bus Pirate design yet.  We also reduced the part count and cost wherever possible. If you want to get your hands on some Bus Pirate USB goodness, Seeed Studio has assembled hardware for $30 (including worldwide shipping).</p>
<p>Read about the new design after the break.</p>
<p><span id="more-10041"></span></p>
<p><strong>Concept overview</strong></p>
<p><img class="alignnone size-full wp-image-10458" title="overview450" src="http://hackadaycom.files.wordpress.com/2009/04/overview450.png" alt="overview450" width="450" height="212" /></p>
<p>The Bus Pirate connects to a PC USB port. The user send commands to the Bus Pirate from a serial terminal on the PC. Commands are translated to the bus protocols that control microchips. See our <a href="http://www.buspirate.com">Bus Pirate page</a> for full documentation.</p>
<p>The latest firmware supports 1-Wire, I2C, SPI, JTAG, asynchronous serial, MIDI, and PC keyboards. Bit-wise 2- and 3-wire libraries can interface most proprietary serial protocols.  More protocols are being added all the time, check out the source code on our <a href="http://code.google.com/p/the-bus-pirate/">Google Code SVN page</a>.</p>
<p><strong>Hardware</strong></p>
<p><strong><img class="alignnone size-full wp-image-10048" title="cct25450" src="http://hackadaycom.files.wordpress.com/2009/04/cct25450.jpg" alt="cct25450" width="450" height="209" /></strong></p>
<p><a href="http://hackadaycom.files.wordpress.com/2009/05/cct25a.png">Click for a large image of the schematic</a> (PNG). The schematic and board layout were made with the freeware version of <a href="http://www.cadsoft.de">Cadsoft Eagle</a>. Download the latest files from our <a href="http://code.google.com/p/the-bus-pirate/downloads/list">Google Code</a> page.</p>
<p><em>PIC24F</em></p>
<p><em><img class="alignnone size-full wp-image-10480" title="pic24f-highlight" src="http://hackadaycom.files.wordpress.com/2009/04/pic24f-highlight.jpg" alt="pic24f-highlight" width="450" height="329" /><br />
</em></p>
<p>A Microchip <a href="http://hackaday.com/2008/09/18/web-server-on-a-business-card-part-1/">PIC24F series</a> microcontroller generates the user interface and translates input into bus communications. V2 uses the same <a href="http://www.microchip.com/wwwproducts/Devices.aspx?dDocName=en026374">24FJ64GA002</a> as the previous Bus Pirate versions. It&#8217;s cheap, has a ton of memory,  a couple 5volt tolerant input pins, and the peripheral pin select feature lets us assign hardware modules anywhere we want.</p>
<p>The PIC (IC1) is powered by a 3.3volt regulator (VR2, C23). Each PIC power pin gets a 0.1uF bypass capacitor (C1,2). The internal 2.5volt regulator requires a 10uF tantalum capacitor (C20). The programming pins are brought to a five pin header (ICSP) on the edge of the PCB.</p>
<p><em>USB interface<br />
</em></p>
<p><em><img class="alignnone size-full wp-image-10471" title="ftdi-450ii1" src="http://hackadaycom.files.wordpress.com/2009/04/ftdi-450ii1.jpg" alt="ftdi-450ii1" width="450" height="229" /></em></p>
<p>The Bus Pirate is powered from the USB 5volt supply, which is first filtered with a ferrite bead (L1) and 10uF tantalum capacitor (C21). We used the small, still-not-quite-common, <a href="http://en.wikipedia.org/wiki/USB#Types_of_USB_connector">USB mini-b</a> connector (J2).</p>
<p>Choosing a ferrite bead is a common hangup. Its purpose is to filter small power fluctuations, all the current for the circuit will go through it. We can guestimate that the Bus Pirate&#8217;s worst case current consumption is 525ma (3 power supplies @ 150ma, the FTDI chip @ 25ma, 2 LEDs @ 50ma max). Use a ferrite bead rated for at least 1000ma to be safe. We used <a href="http://www.mouser.com/Search/ProductDetail.aspx?R=BLM21PG331SN1Dvirtualkey64800000virtualkey81-BLM21P331SG">this one</a>, which is rated for 1500ma and costs 10 cents.</p>
<p>An FTDI <a href="http://www.ftdichip.com/Products/FT232BM.htm">FT232BL</a> USB-&gt;serial chip (IC2) handles the USB connection. You might be familiar with this chip from various <a href="http://hackaday.com/category/arduino-hacks/">Arduino</a> boards. FTDI has <a href="http://www.ftdichip.com/Drivers/VCP.htm">extensive driver support</a> for most platforms, we used the virtual com port drivers.  This is the latest generation chip, and it&#8217;s only available in small SSOP and QFN packages. We had no problem hand-soldering it to a professional PCB, but it&#8217;s not for everyone.</p>
<p>The FT232BL is powered directly from the filtered, unregulated USB supply. C4 is a  decoupling capacitor for the FTDI232BL supply pin. A single LED (LED4/USB) indicates USB status and activity. The FT232BL RXLED pin sinks current, so we powered the LED from the 5volt USB supply through a 1.1K resistor (R3).</p>
<p>While the FT232BL runs at 5volts from the USB supply, its serial IO pins have an independent supply input &#8211; they can operate at another voltage. Since the microcontroller is 3.3volts, we just feed the FT232BL IO pins a 3.3volt supply and eliminate any funky translation circuitry. We used the chip&#8217;s internal 3.3volt regulator to supply the IO pins because it was the easiest trace to route. The IO pins get their own 0.1uF bypass capacitor (C5).</p>
<p><em>Switchable power supplies</em></p>
<p><em><img class="alignnone size-full wp-image-10475" title="vreg-450ii" src="http://hackadaycom.files.wordpress.com/2009/04/vreg-450ii.jpg" alt="vreg-450ii" width="449" height="297" /><br />
</em></p>
<p>The Bus Pirate has on-board 3.3volt and 5volt supplies (VR3, VR4) that can power a test circuit. The  supplies are switchable, so we can reset the circuit from software when something goes wrong. To be extra safe, the supplies are held off until activated in the terminal.</p>
<p>[<a href="http://www.sparkfun.com/commerce/account.php?id=7185">Nathan Seidle</a>] at <a href="http://www.sparkfun.com">SparkFun</a> recommended that we replace the  <a href="http://www.mouser.com/Search/ProductDetail.aspx?qs=sGAEpiMZZMsGz1a6aV8DcPXeWoVS0Fnzr3zi8%252bAr99Q%3d">TPS796xx</a> ($2.50) we used in <a href="http://hackaday.com/2009/01/22/how-to-bus-pirate-v1-improved-universal-serial-interface">The Bus Pirate v1a</a> with a <a href="http://search.digikey.com/scripts/DkSearch/dksus.dll?Detail&amp;name=576-1259-1-ND">MIC5205-xxYM5</a> ($0.90). They supply just 150ma maximum current, compared to 800ma from the TPS796xx, but the cost savings and reduced part-count are worth it.</p>
<p>The regulators are fed from the 5volt USB supply. The 5volt regulator drops a few millivolts below optimal because there&#8217;s no headroom, but it&#8217;s within the minimum level specified by  most 5volt parts.</p>
<p>The MIC5205 requires a large output filter capacitor (C22-24, 10uF), but no input capacitor. An optional small-value capacitor on the BP pin can decrease power supply noise, but we left this off because it didn&#8217;t make much difference in practice.</p>
<p>A small voltage on the <em>EN</em> pin enables the supply, we used a 10K pull-down resistor (R18, not shown) to ensure that the supplies stay off while the PIC initializes. LED3/VREG, with current limiting resistor R32, lights when the power supplies are active.</p>
<p><em>On-board pull-up resistors</em></p>
<p><em><img class="alignnone size-full wp-image-10469" title="resis" src="http://hackadaycom.files.wordpress.com/2009/04/resis.jpg" alt="resis" width="450" height="298" /><br />
</em></p>
<p>Bus Pirate V2 has multi-voltage, software controlled pull-up resistors via the <a href="http://www.fairchildsemi.com/ds/CD%2FCD4066BC.pdf">4066</a> (PDF) quad bilateral switch (IC3). When enabled, the 4066 connects the four on-board bus pull-up resistors (R20-23, 10K) to any external signal on the Vpullup pin (0 to 5volts). When disabled, the outputs are high-impedance and have no effect on the bus lines.</p>
<p>The 4066 can&#8217;t switch an input voltage greater than the supply voltage. To give it the widest possible range, we powered it from the USB supply (5volts).</p>
<p>When operated at 5volts, it takes 4volts+ to enable the 4066. The PIC pins have a maximum output of 3.3volts, so we have a problem. We  solve it with a 5volt tolerant PIC pin and a pull-up resistor.  We turn on the 4066 with a pull-up resistor to 5volts (R19, 10K), and then disable it by switching the connected PIC pin to ground.</p>
<p>For a brief instant at power-on, the PIC pin is high-impedance and the 4066 outputs are active because the pull-up resistor holds the control pins at 5volts. This is a concern if the Vpullup input is connected to an external 5volt supply while the bus is connected to a 3.3volt device &#8211; the brief exposure to 5volts might harm the device. If you&#8217;re worried about this, make sure there&#8217;s no active power supply connected to the Vpullup input before powering the Bus Pirate. This isn&#8217;t a concern if you use one of the on-board power supplies for the pull-up voltage because they&#8217;re disabled at startup.</p>
<p><em>Voltage monitoring</em></p>
<p><em><img class="alignnone size-full wp-image-10474" title="cct-adcin" src="http://hackadaycom.files.wordpress.com/2009/04/cct-adcin.jpg" alt="cct-adcin" width="450" height="309" /><br />
</em></p>
<p>Four <a href="http://en.wikipedia.org/wiki/Voltage_divider">voltage dividers</a> (R10-17, 10K), attached to <a href="http://en.wikipedia.org/wiki/Analog-to-digital_converter">analog to digital converters</a>, allow the 3.3volt PIC to safely measure up to 6volts DC.</p>
<p>Two voltage monitors measure the switchable power supply output. One measures the Vpullup input voltage, and another connects to the external voltage measurement probe.</p>
<p><em>Indicator LEDs</em></p>
<p><em><img class="alignnone size-full wp-image-10463" title="front-back2450" src="http://hackadaycom.files.wordpress.com/2009/04/front-back2450.jpg" alt="front-back2450" width="450" height="191" /><br />
</em></p>
<p>Three LEDs indicate power, mode, and voltage regulator status (LED1-3). LED4/USB displays USB activity.</p>
<p>There are pads for resistors R30-32 and LEDs 1-3 on the front and back of the PCB. Only one set should be populated. We put pads on both sides so the board could be mounted with the indicator LEDs abutting the top of an enclosure.</p>
<p><em>V2a vs V2go</em></p>
<p><em><img class="alignnone size-full wp-image-10441" title="bpv2450" src="http://hackadaycom.files.wordpress.com/2009/04/bpv2450.jpg" alt="bpv2450" width="450" height="354" /><br />
</em></p>
<p>Click for large <a href="http://hackadaycom.files.wordpress.com/2009/04/cct1.png">schematic</a> (PNG) and <a href="http://hackadaycom.files.wordpress.com/2009/04/brd.png">layout</a> (PNG) images of the version 2a hardware. The Eagle layout files are available in our <a href="http://code.google.com/p/the-bus-pirate/downloads/list">Google Code SVN</a>.</p>
<p>Bus Pirate V2a is a developer&#8217;s board. In addition to all the features of V2go, it includes a jack (J1) for an external power supply and an additional 5volt regulator (VR1).  A switch (S1) selects between USB power and the external supply.</p>
<p>The FT232BL chip on V2a is powered directly from the USB supply, and is not connected to the external supply. This is useful if you want to disable USB and use the Bus Pirate with a serial port on a PC or PDA.</p>
<p>The V2a 4066 enable pull-up resistor is powered by the switchable 5volt regulator. The 5volt regulator must be enabled for the 4066 to be active. Don&#8217;t forget to install the 4066 pull-up resistor (R19), located on the back of the v2a PCB.</p>
<p><strong>PCB</strong></p>
<p><img class="alignnone size-full wp-image-10047" title="brd25450" src="http://hackadaycom.files.wordpress.com/2009/04/brd25450.png" alt="brd25450" width="437" height="354" /></p>
<p>The PCB is a compact, 2-layer design. We <a href="http://hackaday.com/2009/01/15/how-to-prepare-your-eagle-designs-for-manufacture/">prepared gerbers</a> and had PCBs made by our usual service, <a href="https://www.batchpcb.com/">BatchPCB</a> ($21, shipped to EU), and tried a new service offered by <a href="http://www.seeedstudio.com/wiki/index.php?title=Main_Page">Seeed Studio</a> ($32, shipped worldwide).</p>
<p>Seeed has a PCB service specifically for open source hardware projects. For $32 (including worldwide shipping) we got 5 small PCBs, and Seeed made a few extra to sell in their shop. We liked the idea that there would be extra PCBs available.</p>
<p>You might know Seeed Studio from their cheap, improved <a href="http://www.makershed.com/ProductDetails.asp?ProductCode=MKSEEED2">Seeeduino</a> Arduino clone. They&#8217;re located in Shenzhen, a Chinese electronics manufacturing hot-spot. A bunch of notable bloggers recently <a href="http://www.sparkfun.com/commerce/news.php?id=236">visited the region</a> and wrote about the <a href="http://www.sparkfun.com/commerce/news.php?id=237">huge electronic component markets</a>.</p>
<p><img class="alignnone size-full wp-image-10461" title="seeed-batchpcb4501" src="http://hackadaycom.files.wordpress.com/2009/04/seeed-batchpcb4501.jpg" alt="seeed-batchpcb4501" width="450" height="232" /></p>
<p>The Seed order arrived in 14 days (left), the BatchPCB order arrived in 30 days (right).  Seeed and BatchPCB both make beautiful PCBs. Seeed has a much faster turn-around, and has better minimum trace widths and separation (8mil vs 6mil). BatchPCB has standard green PCBs, Seeed gives you the choice of green, black, or white; red, blue and yellow are $7.50 extra.</p>
<p>We really like the Seeed PCB service, extra Bus Pirate <a href="http://www.seeedstudio.com/depot/the-bus-pirate-v2-go-pcb-p-331.htmlhttp://www.seeedstudio.com/depot/the-bus-pirate-v2-go-pcb-p-331.html">v2go</a> and <a href="http://www.seeedstudio.com/depot/the-bus-pirate-v2-pcb-p-330.html">v2a</a> PCBs from our order are available in the Seeed shop. BatchPCB remains the cheapest prototyping option if you want a single board, closed source work, or don&#8217;t mind the extra wait.</p>
<p><em>Parts list</em></p>
<table border="0">
<tbody>
<tr>
<td><strong>Part</strong></td>
<td><strong>Value (package)</strong></td>
</tr>
<tr>
<td>IC1</td>
<td><a href="http://www.mouser.com/Search/ProductDetail.aspx?qs=V/yyTCAHA4D/h5r3CRQDtA==">PIC24J64GA002</a> (SOIC)</td>
</tr>
<tr>
<td>IC2</td>
<td><a href="http://www.sparkfun.com/commerce/product_info.php?products_id=650">FT232RL</a> (SSOP)</td>
</tr>
<tr>
<td>IC3</td>
<td><a href="http://search.digikey.com/scripts/DkSearch/dksus.dll?Detail&amp;name=CD4066BCM-ND">CD4066D</a> (SOIC-N)</td>
</tr>
<tr>
<td>VR2,3</td>
<td><a href="http://search.digikey.com/scripts/DkSearch/dksus.dll?Detail&amp;name=576-1259-1-ND">MIC5205-3.3YM5 3.3volt regulator</a> (SOT23-5)</td>
</tr>
<tr>
<td>VR4</td>
<td><a href="http://search.digikey.com/scripts/DkSearch/dksus.dll?Detail&amp;name=576-1261-1-ND">MIC5205-5.0YM5 5volt regulator</a> (SOT23-5)</td>
</tr>
<tr>
<td>C1-5</td>
<td><a href="https://www.mouser.com/Search/ProductDetail.aspx?R=C0805C104M5RACTUvirtualkey64600000virtualkey80-C0805C104M5R">0.1uF capacitor</a> (0805)</td>
</tr>
<tr>
<td>C20-24</td>
<td><a href="http://www.mouser.com/Search/ProductDetail.aspx?R=293D106X96R3A2TE3virtualkey61320000virtualkey74-293D106X96R3A2TE3">10uF tantalum capacitor</a> (SMC-A)</td>
</tr>
<tr>
<td>L1</td>
<td><a href="http://www.mouser.com/Search/ProductDetail.aspx?R=BLM21PG331SN1Dvirtualkey64800000virtualkey81-BLM21P331SG">1000ma+ Ferrite bead</a> (0805)</td>
</tr>
<tr>
<td>R1</td>
<td><a href="http://www.mouser.com/Search/ProductDetail.aspx?qs=jBethxrBxZb5NLDetw123g==">2000 ohm resistor</a> (0805)</td>
</tr>
<tr>
<td>R3,30</td>
<td><a href="http://www.mouser.com/Search/ProductDetail.aspx?qs=DZvKvnD5UYWyFJjgnPvJ4g%3d%3d">1100 ohm resistor</a> (0805)</td>
</tr>
<tr>
<td>R10-23</td>
<td><a href="http://www.mouser.com/Search/ProductDetail.aspx?qs=sGAEpiMZZMtlubZbdhIBIADEshVnklemK%252bhrLNEuMe8%3d">10,000 ohm resistor</a> (0805)</td>
</tr>
<tr>
<td>R31,32</td>
<td><a href="http://www.mouser.com/Search/ProductDetail.aspx?qs=2BMLUTrrT4P7Xm58YbKmPg==">390 ohm resistor</a> (0805)</td>
</tr>
<tr>
<td>LED1-4</td>
<td><a href="http://www.mouser.com/Search/ProductDetail.aspx?qs=7JStj%2fjQ2SElGv%2fp7IzKlg%3d%3d">LED</a> (0805)</td>
</tr>
<tr>
<td>J2</td>
<td><a href="http://www.sparkfun.com/commerce/product_info.php?products_id=587">USB MINI-B</a> (SMD)</td>
</tr>
<tr>
<td>I/O</td>
<td><a href="http://www.mouser.com/Search/ProductDetail.aspx?R=9-146278-0virtualkey57100000virtualkey571-9-146278-0">0.1&#8243; pin header</a> (2&#215;05)</td>
</tr>
<tr>
<td>ICSP</td>
<td><a href="http://www.mouser.com/Search/ProductDetail.aspx?R=9-146278-0virtualkey57100000virtualkey571-9-146278-0">0.1&#8243; pin header</a> (1&#215;05)</td>
</tr>
<tr>
<td>ST</td>
<td><a href="http://www.mouser.com/Search/ProductDetail.aspx?R=9-146278-0virtualkey57100000virtualkey571-9-146278-0">0.1&#8243; pin header</a> (1&#215;03) <em>*unpopulated, optional*</em></td>
</tr>
<tr>
<td><strong><br />
</strong></td>
<td></td>
</tr>
</tbody>
</table>
<table border="0">
<tbody>
<tr>
<td><em><strong>Optional</strong></em></td>
<td><em><strong>Parts for V2a</strong></em></td>
</tr>
<tr>
<td>C6-10</td>
<td><a href="https://www.mouser.com/Search/ProductDetail.aspx?R=C0805C104M5RACTUvirtualkey64600000virtualkey80-C0805C104M5R">0.1uF capacitor</a> (0805)</td>
</tr>
<tr>
<td>J1</td>
<td><a href="http://www.mouser.com/Search/ProductDetail.aspx?qs=b2tC%2fwvzm2TxaPjSsb%252bCzQ%3d%3d">2.1mm power jack</a> (SMD)</td>
</tr>
<tr>
<td>LED5,6</td>
<td><a href="http://www.mouser.com/Search/ProductDetail.aspx?qs=7JStj%2fjQ2SElGv%2fp7IzKlg%3d%3d">LED</a> (0805)</td>
</tr>
<tr>
<td>R33,34,40</td>
<td><a href="http://www.mouser.com/Search/ProductDetail.aspx?qs=DZvKvnD5UYWyFJjgnPvJ4g%3d%3d">1100 ohm resistor</a> (0805)</td>
</tr>
<tr>
<td>S1</td>
<td><a href="http://search.digikey.com/scripts/DkSearch/dksus.dll?Detail&amp;name=679-1849-ND">Slide switch, SPDT, rt angle</a></td>
</tr>
<tr>
<td>VR1</td>
<td><a href="https://www.mouser.com/Search/ProductDetail.aspx?R=LD1117S50TRvirtualkey51120000virtualkey511-LD1117S50">LD1117s50 5volt regulator</a> (SOT223)</td>
</tr>
</tbody>
</table>
<p><strong>Firmware</strong></p>
<p>The latest Bus Pirate firmware for all hardware version is always available on our <a href="http://code.google.com/p/the-bus-pirate/">Google Code page</a>. The code is written in C, and is compiled with the <a href="http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&amp;nodeId=1406&amp;dDocName=en534868&amp;redirects=c30">Microchip C30 demonstration compiler</a>.</p>
<p><em>Bootloader</em></p>
<p>The biggest change in the latest firmware is the addition of a <a href="http://en.wikipedia.org/wiki/Boot_loader#Boot_loader">bootloader</a>. Now the firmware can be updated through the USB or serial connection.</p>
<p>A bootloader is small program that sits at the beginning of the PIC program memory. It accepts updated firmware through the USB or serial port and saves it to the chip.</p>
<p><img class="alignnone size-full wp-image-10449" title="bootload-jumper4501" src="http://hackadaycom.files.wordpress.com/2009/04/bootload-jumper4501.jpg" alt="bootload-jumper4501" width="450" height="112" /></p>
<p>The bootloader comes from Microchip application note <a href="http://en.wikipedia.org/wiki/Boot_loader#Boot_loader">AN1157</a>. We modified the bootloader to check for a jumper between the programming clock (PGC) and data (PGD) pins at power-up (update, above left). If there&#8217;s a connection, the bootloader takes over and waits for new code. Without a connection, the bootloader exits and runs the main program.</p>
<p>There&#8217;s a very minor chance of accidentally entering the bootloader with no jumper installed. This won&#8217;t damage the Bus Pirate, but you will need to connect it again.  You can prevent it by moving the jumper over one position,  between the ground pin and the inner programming pin (normal, above right).</p>
<p><em>Upgrading the firmware with the bootloader</em></p>
<p><em><img class="alignnone size-full wp-image-10443" title="pic24fqp" src="http://hackadaycom.files.wordpress.com/2009/04/pic24fqp.png" alt="pic24fqp" width="450" height="141" /><br />
</em></p>
<p>If you&#8217;re using a fresh chip, first program it with the bootloader firmware (vxx-PIC Bootloader.hex) through the ICSP header using a &#8216;real&#8217; programmer like an <a href="http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&amp;nodeId=1406&amp;dDocName=en010046">ICD2</a> or <a href="http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&amp;nodeId=1406&amp;dDocName=en010046">PicKit</a>.</p>
<p>If you&#8217;re upgrading, follow this procedure or refer to the instructions in the firmware download.</p>
<ul>
<li>Disconnect the Bus Pirate from any power supply such as the USB cable.</li>
<li>Place a jumper between the programming data and clock pins of the ICSP header. This will trigger the bootloader mode.</li>
<li>Connect the Bus Pirate to a USB port (or, if applicable, power and serial cable).</li>
<li>Start the MS Windows P24QP.exe programmer utility. You may need to modify the COM port (portindex=) in P24qp.ini to match your system.  Programmer source is available, and the simple bootloader protocol is documented in AN1157 if you want to write an app for a non-Windows system.</li>
<li>Click the connect to device icon (#1). The program will connect to the PIC.</li>
<li>Click the folder icon (#2) and open the firmware update file (vxx-Firmware for BL.hex).</li>
<li> Click the erase device icon (#3) to erase the chip. DO NOT SKIP THIS STEP. Programming may not be successful if you forget to erase the chip.</li>
<li> Click the write device icon (#4) to program the new firmware. Ignore any verify errors between 0&#215;400 and 0xBFF, the bootloader lives in this region and doesn&#8217;t get updated.</li>
<li> Click the green arrow icon (#5) to exit the bootloader and start the program.  Click OK at the warning, we use the jumper to re-enter the bootloader.</li>
<li> Remove the jumper from the programming pins, or move it over one position to connect the inner PGx pin to ground (GND).</li>
<li>***IMPORTANT*** Now restart the Bus Pirate by disconnecting and reconnecting the USB cable (or power cable). Some features won&#8217;t work until after a complete hardware reset.</li>
</ul>
<p><strong>Using it</strong></p>
<p><em>USB device driver<br />
</em></p>
<p>You may need to install an <a href="http://www.ftdichip.com/Drivers/VCP.htm">FTDI virtual serial port driver</a> for your platform.</p>
<p>On Windows, go to the Device Manager to configure the FTDI driver or check the COM port number.</p>
<p><em>Menus and Syntax</em></p>
<p><em><img class="alignnone size-full wp-image-10444" title="term450" src="http://hackadaycom.files.wordpress.com/2009/04/term450.png" alt="term450" width="420" height="195" /><br />
</em></p>
<p>Use a serial terminal to communicate with the Bus Pirate. We like <a href="http://www.ayera.com/teraterm/">Tera Term</a>.</p>
<p>The Bus Pirate works best with the terminal set to 115200bps, 8 databits, no parity, 1stopbit. Disable local echo in the terminal, and use CR for line breaks. Some modes also require Xon/Xoff software flow control.</p>
<p>In the serial terminal, press ? for the help menu. Read more about the Bus Pirate&#8217;s menu and syntax on the <a href="http://www.buspirate.com">Bus Pirate page</a>. There&#8217;s lots of demonstrations in our recent <a href="http://hackaday.com/category/parts/">parts posts</a>.</p>
<p><em>LED indicators</em></p>
<p><em><img class="alignnone size-full wp-image-10476" title="leds-450" src="http://hackadaycom.files.wordpress.com/2009/04/leds-450.jpg" alt="leds-450" width="450" height="81" /><br />
</em></p>
<ul>
<li><strong>PWR</strong> indicates power to the Bus Pirate.</li>
<li><strong>MODE</strong> is off when the I/O pins are in a safe, high-impedance state. MODE is lit when a bus mode is engaged, the pins may be active.</li>
<li><strong>VREG</strong> indicates that the on-board switchable power supplies are active.</li>
<li><strong>UR</strong> is a single USB activity indicator LED. It displays data coming <em>from</em> the PC <em>to</em> the Bus Pirate. You can probably change what this LED displays with the <a href="http://www.ftdichip.com/Resources/Utilities.htm">FTDI configuration utility</a>.</li>
</ul>
<p><em>Connections</em></p>
<p>Pin location diagrams: <a href="http://hackadaycom.files.wordpress.com/2009/01/brd3.png">v2a</a>, <a href="http://hackadaycom.files.wordpress.com/2009/01/brd251.png">v2g0</a>.</p>
<table border="0">
<tbody>
<tr>
<td><strong>Pin name |<br />
</strong></td>
<td><strong>Description (Bus Pirate is the master)</strong></td>
</tr>
<tr>
<td>MOSI</td>
<td>Master data out, slave in (SPI, JTAG), Serial data (1-Wire, I2C, KB), TX* (UART)</td>
</tr>
<tr>
<td>CLK</td>
<td>Clock signal (I2C, SPI, JTAG, KB)</td>
</tr>
<tr>
<td>MISO</td>
<td>Master data in, slave out (SPI, JTAG) RX (UART)</td>
</tr>
<tr>
<td>CS*</td>
<td>Chip select (SPI), TMS (JTAG)</td>
</tr>
<tr>
<td>AUX</td>
<td>Auxiliary IO, frequency probe</td>
</tr>
<tr>
<td>ADC</td>
<td>Voltage measurement probe (max 6volts)</td>
</tr>
<tr>
<td>Vpu</td>
<td>Voltage input for on-board pull-up resistors (0-5volts).</td>
</tr>
<tr>
<td>+3.3v</td>
<td>+3.3volt switchable power supply, max 150ma</td>
</tr>
<tr>
<td>+5.0v</td>
<td>+5volt switchable power supply, max 150ma</td>
</tr>
<tr>
<td>GND</td>
<td>Ground, connect to ground of test circuit</td>
</tr>
</tbody>
</table>
<p>Notes: * TX moved from CS to MOSI in firmware v0g.</p>
<p>The 10 pin I/O block contains the data signals and power supplies that connect to a test circuit. Each pin is labeled on the back of the PCB, refer to the table above for a detailed description.</p>
<p>The pinout on V2 is similar to V1, but we moved the power supply output and Vpullup input  to the cable bundle. We also eliminated the second, unused auxiliary pin.</p>
<p><strong>Conclusion</strong></p>
<p>If you want a complete Bus Pirate or a kit, here&#8217;s a couple options:</p>
<ul>
<li> Seeed Studio is accepting pre-orders for assembled Bus Pirate v2go hardware until the end of Friday, July 3.  An assembled Bus Pirate v2go is $30, including worldwide shipping.</li>
<li>Seeed Studio also has the extra <a href="http://www.seeedstudio.com/depot/the-bus-pirate-v2-go-pcb-p-331.html">v2g0</a> ($5.90) and <a href="http://www.seeedstudio.com/depot/the-bus-pirate-v2-pcb-p-330.html">v2a</a> ($6.50) PCBs from our order.</li>
<li>Fundamental Logic sells a <a href="http://spiffie.org/kits/buspirate/">through-hole kit</a> version of the Bus Pirate V1a ($29.50). <strong>***v1a is serial port only***</strong></li>
</ul>
<p>Thanks to everyone who contributed to this project. The Bus Pirate wouldn&#8217;t be possible without a ton of great feedback from the comments. If you&#8217;d like to get involved, join the <a href="http://code.google.com/p/the-bus-pirate/">Bus Pirate project</a> at Google Code.</p>
<p><strong>Hack a Day review disclosure</strong>: We asked Seeed Studio to make our first order of PCBs for free. Since then, we&#8217;ve made several paid orders.</p>
<p><img class="alignnone size-full wp-image-12042" title="bpv2goiii" src="http://hackadaycom.files.wordpress.com/2009/06/bpv2goiii.jpg" alt="bpv2goiii" width="450" height="330" /></p>
<br />Posted in hardware, how-to, tool hacks  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/hackadaycom.wordpress.com/10041/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/hackadaycom.wordpress.com/10041/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/hackadaycom.wordpress.com/10041/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/hackadaycom.wordpress.com/10041/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/hackadaycom.wordpress.com/10041/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/hackadaycom.wordpress.com/10041/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/hackadaycom.wordpress.com/10041/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/hackadaycom.wordpress.com/10041/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/hackadaycom.wordpress.com/10041/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/hackadaycom.wordpress.com/10041/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/hackadaycom.wordpress.com/10041/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/hackadaycom.wordpress.com/10041/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/hackadaycom.wordpress.com/10041/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/hackadaycom.wordpress.com/10041/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hackaday.com&amp;blog=4779443&amp;post=10041&amp;subd=hackadaycom&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://hackaday.com/2009/06/25/how-to-the-bus-pirate-v2-with-usb/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/2009/04/buspiratev2goii450.jpg" medium="image">
			<media:title type="html">buspiratev2goii450</media:title>
		</media:content>

		<media:content url="http://hackadaycom.files.wordpress.com/2009/04/overview450.png" medium="image">
			<media:title type="html">overview450</media:title>
		</media:content>

		<media:content url="http://hackadaycom.files.wordpress.com/2009/04/cct25450.jpg" medium="image">
			<media:title type="html">cct25450</media:title>
		</media:content>

		<media:content url="http://hackadaycom.files.wordpress.com/2009/04/pic24f-highlight.jpg" medium="image">
			<media:title type="html">pic24f-highlight</media:title>
		</media:content>

		<media:content url="http://hackadaycom.files.wordpress.com/2009/04/ftdi-450ii1.jpg" medium="image">
			<media:title type="html">ftdi-450ii1</media:title>
		</media:content>

		<media:content url="http://hackadaycom.files.wordpress.com/2009/04/vreg-450ii.jpg" medium="image">
			<media:title type="html">vreg-450ii</media:title>
		</media:content>

		<media:content url="http://hackadaycom.files.wordpress.com/2009/04/resis.jpg" medium="image">
			<media:title type="html">resis</media:title>
		</media:content>

		<media:content url="http://hackadaycom.files.wordpress.com/2009/04/cct-adcin.jpg" medium="image">
			<media:title type="html">cct-adcin</media:title>
		</media:content>

		<media:content url="http://hackadaycom.files.wordpress.com/2009/04/front-back2450.jpg" medium="image">
			<media:title type="html">front-back2450</media:title>
		</media:content>

		<media:content url="http://hackadaycom.files.wordpress.com/2009/04/bpv2450.jpg" medium="image">
			<media:title type="html">bpv2450</media:title>
		</media:content>

		<media:content url="http://hackadaycom.files.wordpress.com/2009/04/brd25450.png" medium="image">
			<media:title type="html">brd25450</media:title>
		</media:content>

		<media:content url="http://hackadaycom.files.wordpress.com/2009/04/seeed-batchpcb4501.jpg" medium="image">
			<media:title type="html">seeed-batchpcb4501</media:title>
		</media:content>

		<media:content url="http://hackadaycom.files.wordpress.com/2009/04/bootload-jumper4501.jpg" medium="image">
			<media:title type="html">bootload-jumper4501</media:title>
		</media:content>

		<media:content url="http://hackadaycom.files.wordpress.com/2009/04/pic24fqp.png" medium="image">
			<media:title type="html">pic24fqp</media:title>
		</media:content>

		<media:content url="http://hackadaycom.files.wordpress.com/2009/04/term450.png" medium="image">
			<media:title type="html">term450</media:title>
		</media:content>

		<media:content url="http://hackadaycom.files.wordpress.com/2009/04/leds-450.jpg" medium="image">
			<media:title type="html">leds-450</media:title>
		</media:content>

		<media:content url="http://hackadaycom.files.wordpress.com/2009/06/bpv2goiii.jpg" medium="image">
			<media:title type="html">bpv2goiii</media:title>
		</media:content>
	</item>
		<item>
		<title>Parts: 1K 1-Wire EEPROM (DS2431)</title>
		<link>http://hackaday.com/2008/12/24/parts-1k-1-wire-eeprom-ds2431/</link>
		<comments>http://hackaday.com/2008/12/24/parts-1k-1-wire-eeprom-ds2431/#comments</comments>
		<pubDate>Wed, 24 Dec 2008 14:00:01 +0000</pubDate>
		<dc:creator>Ian</dc:creator>
				<category><![CDATA[parts]]></category>
		<category><![CDATA[tool hacks]]></category>
		<category><![CDATA[1-wire]]></category>
		<category><![CDATA[bus pirate]]></category>
		<category><![CDATA[eeprom]]></category>
		<category><![CDATA[electronics]]></category>
		<category><![CDATA[interfacing]]></category>
		<category><![CDATA[memory]]></category>
		<category><![CDATA[serial interface]]></category>
		<category><![CDATA[to-92]]></category>

		<guid isPermaLink="false">http://hackaday.com/?p=6785</guid>
		<description><![CDATA[The Maxim DS2431 1K EEPROM is 1-Wire device that adds storage to a project using a single microcontroller pin. We previously interfaced a 1-wire thermometer, but this EEPROM is slightly different because it draws power directly from the 1-Wire bus. Grab the datasheet (PDF) and follow along while we read and write this simple 1-Wire [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hackaday.com&amp;blog=4779443&amp;post=6785&amp;subd=hackadaycom&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><img class="alignnone size-full wp-image-7182" title="1keeprom-450" src="http://hackadaycom.files.wordpress.com/2008/12/1keeprom-450.jpg" alt="1keeprom-450" width="450" height="335" /></p>
<p>The Maxim <a href="http://www.maxim-ic.com/quick_view2.cfm/qv_pk/4272">DS2431 1K EEPROM</a> is <a href="http://en.wikipedia.org/wiki/1-Wire">1-Wire</a> device that adds storage to a project using a single microcontroller pin. We previously interfaced a <a href="http://hackaday.com/2008/12/10/parts-1-wire-temperature-sensor-ds1822/">1-wire thermometer</a>, but this EEPROM is slightly different because it draws power directly from the 1-Wire bus. Grab the <a href="http://www.maxim-ic.com/getds.cfm/qv_pk/4272">datasheet</a> (PDF) and follow along while we read and write this simple 1-Wire memory.</p>
<p><span id="more-6785"></span></p>
<p><strong><a href="http://www.maxim-ic.com/quick_view2.cfm/qv_pk/4272">DS2431</a> 1-Wire 1K EEPROM (Digikey #<a href="http://www.digikey.com/scripts/DkSearch/dksus.dll?Detail&amp;name=DS2431%2B-ND">DS2431+-ND</a>, $1.67)</strong></p>
<p>We used our <a href="http://hackaday.com/2008/11/19/how-to-the-bus-pirate-universal-serial-interface/">Bus Pirate universal serial interface</a> to demonstrate the DS2431 EEPROM, we covered the proper connections and configuration options in <a href="http://hackaday.com/2008/12/10/parts-1-wire-temperature-sensor-ds1822/">our previous 1-wire post</a>. The DS2431 requires just two connections: ground (pin 1) and 1-Wire/power (pin 2).  Pin 3 remains unconnected. Like last time, we used a 2K pull-up resistor with the 1-Wire bus.</p>
<p>First, we use the Bus Pirate&#8217;s SEARCH ROM command to identify connected 1-Wire devices.</p>
<blockquote><p>1-WIRE&gt;(240) <strong>&lt;&#8211;SEARCH ROM command macro</strong><br />
1WIRE ROM COMMAND: SEARCH (0xF0)<br />
Found devices at:<br />
Macro     1-WIRE address<br />
1.0x2D 0&#215;54 0xD2 0xEF 0&#215;00 0&#215;00 0&#215;00 0x2B <strong>&lt;&#8211;address</strong><br />
*DS2431 1K EEPROM <strong>&lt;&#8211; type</strong><br />
2.0x2D 0xFE 0x8D 0&#215;43 0&#215;01 0&#215;00 0&#215;00 0&#215;52<br />
*DS2431 1K EEPROM<br />
3.0x2D 0x2B 0xED 0xEF 0&#215;00 0&#215;00 0&#215;00 0x7C<br />
*DS2431 1K EEPROM<br />
Found 0&#215;03 devices.<br />
The first 10 device IDs are available by MACRO, see (0).<br />
1-WIRE&gt;</p></blockquote>
<p>The SEARCH ROM command reveals that there are 3 EEPROMs connected to the 1-Wire bus. The Bus Pirate stores the 64bit 1-wire addresses in macros so we don&#8217;t have to type it every time. We&#8217;ll work with the first device, identified by macro (1).</p>
<p>Writing to the DS2431 takes three steps:</p>
<ul>
<li>Write data to DS2431&#8242;s 8byte &#8216;scratch pad&#8217; EEPROM buffer</li>
<li>Verify the scratch pad contents and get the write access key</li>
<li>Copy data from the scratch pad to the EEPROM for permanent storage.</li>
</ul>
<p>Command 0x0f writes to the scratch pad. The scratch pad is an 8byte buffer that holds data prior to saving it permanently in the EEPROM.</p>
<blockquote><p>1-WIRE&gt;(85)(1) 0x0f 0&#215;00 0&#215;00 0 1 2 3 4 5 6 7 <strong>&lt;&#8211;command</strong><br />
1WIRE BUS RESET OK<br />
1WIRE WRITE ROM COMMAND: MATCH (0&#215;55) *follow with 64bit address<br />
1WIRE ADDRESS MACRO 1: 0x2D 0&#215;54 0xD2 0xEF 0&#215;00 0&#215;00 0&#215;00 0x2B<br />
1WIRE WRITE: 0x0F <strong>&lt;&#8211;write to scratch pad</strong><br />
1WIRE WRITE: 0&#215;00 <strong>&lt;&#8211;begin address byte 1</strong><br />
1WIRE WRITE: 0&#215;00 <strong>&lt;&#8211;begin address byte 2</strong><br />
1WIRE WRITE: 0&#215;00 <strong>&lt;&#8211;data</strong><br />
1WIRE WRITE: 0&#215;01<br />
1WIRE WRITE: 0&#215;02<br />
1WIRE WRITE: 0&#215;03<br />
1WIRE WRITE: 0&#215;04<br />
1WIRE WRITE: 0&#215;05<br />
1WIRE WRITE: 0&#215;06<br />
1WIRE WRITE: 0&#215;07<br />
1-WIRE&gt;</p></blockquote>
<p>The MATCH ROM macro, (85), isolates the the first device, (1). 0x0f is the command to write to the scratch pad, followed by the start address, 0 0. Finally, we send eight bytes of data to save in the scratch pad. The scratch pad is eight bytes long, and all eight bytes will be copied from the scratch pad to the EEPROM at once.</p>
<blockquote><p>1-WIRE&gt;(85)(1) 0xaa r:3 r:8 r:2 r:2 <strong>&lt;&#8211;command</strong><br />
1WIRE BUS RESET OK<br />
1WIRE WRITE ROM COMMAND: MATCH (0&#215;55) *follow with 64bit address<br />
1WIRE ADDRESS MACRO 1: 0x2D 0&#215;54 0xD2 0xEF 0&#215;00 0&#215;00 0&#215;00 0x2B<br />
1WIRE WRITE: 0xAA <strong>&lt;&#8211;read scratch pad</strong><br />
1WIRE BULK READ, 0&#215;03 BYTES: <strong>&lt;&#8211;access code</strong><br />
0&#215;00 0&#215;00 0&#215;07<br />
1WIRE BULK READ, 0&#215;08 BYTES:<strong>&lt;&#8211;verify our data</strong><br />
0&#215;00 0&#215;01 0&#215;02 0&#215;03 0&#215;04 0&#215;05 0&#215;06 0&#215;07<br />
1WIRE BULK READ, 0&#215;02 BYTES:<strong>&lt;&#8211;inverse CRC</strong><br />
0&#215;44 0&#215;67<br />
1WIRE BULK READ, 0&#215;02 BYTES:<strong>&lt;&#8211;all 1s from here</strong><br />
0xFF 0xFF<br />
1-WIRE&gt;</p></blockquote>
<p>To copy data from the scratch pad to the EEPROM, we must first retrieve a three byte access code from the scratch pad with the command 0xaa.  The first three bytes are the access code (0&#215;00 0&#215;00 0&#215;07), followed by the data contained in the scratch pad.</p>
<blockquote><p>1-WIRE&gt;(85)(1) 0&#215;55 0&#215;00 0&#215;00 0&#215;07<br />
1WIRE BUS RESET OK<br />
1WIRE WRITE ROM COMMAND: MATCH (0&#215;55) *follow with 64bit address<br />
1WIRE ADDRESS MACRO 1: 0x2D 0&#215;54 0xD2 0xEF 0&#215;00 0&#215;00 0&#215;00 0x2B<br />
1WIRE WRITE: 0&#215;55 <strong>&lt;&#8211;copy to EEPROM command</strong><br />
1WIRE WRITE: 0&#215;00<strong>&lt;&#8211;access code (3 bytes)</strong><br />
1WIRE WRITE: 0&#215;00<br />
1WIRE WRITE: 0&#215;07<br />
1-WIRE&gt;!!!! <strong>&lt;&#8211;read bits</strong><br />
1WIRE READ BIT: 0<br />
1WIRE READ BIT: 1 <strong>&lt;&#8211;bits alternate, done</strong><br />
1WIRE READ BIT: 0<br />
1WIRE READ BIT: 1<br />
1-WIRE&gt;</p></blockquote>
<p>Command 0&#215;55 with the correct access code will copy the scratch pad to the data EEPROM. Bit reads (!!!!) alternate between 0 and 1 when the copy completes.</p>
<blockquote><p>1-WIRE&gt;(85)(1) 0xf0 0&#215;00 0&#215;00 r:8 r:8<br />
1WIRE BUS RESET OK<br />
1WIRE WRITE ROM COMMAND: MATCH (0&#215;55) *follow with 64bit address<br />
1WIRE ADDRESS MACRO 1: 0x2D 0&#215;54 0xD2 0xEF 0&#215;00 0&#215;00 0&#215;00 0x2B<br />
1WIRE WRITE: 0xF0 <strong>&lt;&#8211;read memory</strong><br />
1WIRE WRITE: 0&#215;00 <strong>&lt;&#8211;start address (2 bytes)</strong><br />
1WIRE WRITE: 0&#215;00<br />
1WIRE BULK READ, 0&#215;08 BYTES: <strong>&lt;&#8211;read back data</strong><br />
0&#215;00 0&#215;01 0&#215;02 0&#215;03 0&#215;04 0&#215;05 0&#215;06 0&#215;07<br />
1WIRE BULK READ, 0&#215;08 BYTES: <strong>&lt;&#8211;read beyond our data</strong><br />
0&#215;00 0&#215;00 0&#215;00 0&#215;00 0&#215;00 0&#215;00 0&#215;00 0&#215;00<br />
1-WIRE&gt;</p></blockquote>
<p>Command 0xf0 followed by a two byte memory address (0&#215;00 0&#215;00) begins the data read process. The first eight bytes (r:8) are the values we wrote earlier. Reads don&#8217;t involve the scratch pad and don&#8217;t have an 8byte limit, so further reads continue to the end of the memory.</p>
<p>Don&#8217;t forget to catch up on any <a href="http://hackaday.com/category/parts/">parts posts</a> you may have missed.</p>
<br />Posted in parts, tool hacks  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/hackadaycom.wordpress.com/6785/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/hackadaycom.wordpress.com/6785/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/hackadaycom.wordpress.com/6785/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/hackadaycom.wordpress.com/6785/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/hackadaycom.wordpress.com/6785/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/hackadaycom.wordpress.com/6785/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/hackadaycom.wordpress.com/6785/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/hackadaycom.wordpress.com/6785/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/hackadaycom.wordpress.com/6785/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/hackadaycom.wordpress.com/6785/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/hackadaycom.wordpress.com/6785/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/hackadaycom.wordpress.com/6785/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/hackadaycom.wordpress.com/6785/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/hackadaycom.wordpress.com/6785/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hackaday.com&amp;blog=4779443&amp;post=6785&amp;subd=hackadaycom&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://hackaday.com/2008/12/24/parts-1k-1-wire-eeprom-ds2431/feed/</wfw:commentRss>
		<slash:comments>17</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/1keeprom-450.jpg" medium="image">
			<media:title type="html">1keeprom-450</media:title>
		</media:content>
	</item>
		<item>
		<title>Parts: 1-Wire temperature sensor (DS1822)</title>
		<link>http://hackaday.com/2008/12/10/parts-1-wire-temperature-sensor-ds1822/</link>
		<comments>http://hackaday.com/2008/12/10/parts-1-wire-temperature-sensor-ds1822/#comments</comments>
		<pubDate>Thu, 11 Dec 2008 01:35:05 +0000</pubDate>
		<dc:creator>Ian</dc:creator>
				<category><![CDATA[home hacks]]></category>
		<category><![CDATA[parts]]></category>
		<category><![CDATA[tool hacks]]></category>
		<category><![CDATA[1-wire]]></category>
		<category><![CDATA[bus pirate]]></category>
		<category><![CDATA[dallas]]></category>
		<category><![CDATA[electronics]]></category>
		<category><![CDATA[maxim]]></category>
		<category><![CDATA[monday parts]]></category>
		<category><![CDATA[temperature]]></category>

		<guid isPermaLink="false">http://hackaday.com/?p=6706</guid>
		<description><![CDATA[Download: buspirate.v0d.zip Dallas/Maxim&#8217;s 1-Wire protocol is the most requested addition to the Bus Pirate.  We finally got some 1-Wire parts, and today we&#8217;ll demonstrate the DS1822 1-Wire digital thermometer. Grab the datasheet (PDF) and follow along. This post is accompanied by release v.0d of the Bus Pirate firmware for hardware version 0. This includes the [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hackaday.com&amp;blog=4779443&amp;post=6706&amp;subd=hackadaycom&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><img class="alignnone size-full wp-image-6812" title="1wire" src="http://hackadaycom.files.wordpress.com/2008/12/1wire.jpg" alt="1wire" width="447" height="207" /></p>
<p><strong>Download:</strong> <a href="http://blog.mahalo.com/hackaday/howto/buspirate.v0d.zip">buspirate.v0d.zip</a></p>
<p>Dallas/Maxim&#8217;s <a href="http://en.wikipedia.org/wiki/1-Wire">1-Wire</a> protocol is the most requested addition to the <a href="http://hackaday.com/2008/11/19/how-to-the-bus-pirate-universal-serial-interface/">Bus Pirate</a>.  We finally got some 1-Wire parts, and today we&#8217;ll demonstrate the<a href="http://www.maxim-ic.com/quick_view2.cfm?qv_pk=2795"> DS1822 1-Wire digital thermometer</a>. Grab the <a href="http://datasheets.maxim-ic.com/en/ds/DS1822.pdf">datasheet</a> (PDF) and follow along.</p>
<p>This post is accompanied by release v.0d of the Bus Pirate firmware for hardware version 0. This includes the new 1-Wire protocol library, more configuration options, and other improvements.</p>
<p><span id="more-6706"></span><strong><a href="http://www.maxim-ic.com/quick_view2.cfm?qv_pk=2795">DS1822</a> Economy Digital Thermometer (Digikey #<a href="http://search.digikey.com/scripts/DkSearch/dksus.dll?Detail?name=DS1822%2B-ND">DS1822+-ND</a>, $3.87)</strong> We found a footprint in the 1-wire library for <a href="http://www.cadsoft.de/freeware.htm">Eagle</a> on the <a href="http://www.cadsoft.de/cgi-bin/download.pl?page=/home/cadsoft/html_public/download.htm.en&amp;dir=pub/userfiles/libraries">Cadsoft download page</a>.</p>
<p>The 1-Wire protocol uses a single wire for data transfer, and sometimes power. Data is transferred in <a href="http://en.wikipedia.org/wiki/1-Wire#Example_communication_with_a_device">time-sensitive &#8216;slots&#8217;</a> because there isn&#8217;t a separate clock to delineate bit periods.</p>
<p><img class="alignnone size-full wp-image-6755" title="ds1822cct" src="http://hackadaycom.files.wordpress.com/2008/12/ds1822cct.png" alt="ds1822cct" width="452" height="224" /></p>
<table border="0">
<tbody>
<tr>
<td>
<div><strong>Bus Pirate</strong></div>
</td>
<td><strong>DS1822</strong></td>
</tr>
<tr>
<td>
<div><strong>SDA</strong></div>
</td>
<td>DQ</td>
</tr>
<tr>
<td><strong>+5volts</strong></td>
<td>Vdd</td>
</tr>
<tr>
<td>
<div><strong>Ground</strong></div>
</td>
<td>GND</td>
</tr>
</tbody>
</table>
<p>The DS1822 connections are shown in the table. We used the Bus Pirate&#8217;s 5volt supply to power the DS1822, but it also works at 3.3volts. A resistor (R1, ~5K) holds the bus high.</p>
<p>All 1-Wire commands start with a reset procedure, followed by one of five ROM commands.</p>
<table border="0">
<tbody>
<tr>
<td><strong>Command</strong></td>
<td><strong>Description</strong></td>
</tr>
<tr>
<td>0&#215;33</td>
<td>READ ROM. Read single device address.</td>
</tr>
<tr>
<td>0&#215;55</td>
<td>MATCH ROM. Match device address, followed by 64bit address.</td>
</tr>
<tr>
<td>0xCC</td>
<td>SKIP ROM. Address all devices together.</td>
</tr>
<tr>
<td>0xEC</td>
<td>ALARM SEARCH. Search for alarm condition.</td>
</tr>
<tr>
<td>0xF0</td>
<td>SEARCH ROM. Part of address enumeration procedure.</td>
</tr>
</tbody>
</table>
<p>ROM commands are described on page 10 of the datasheet. All ROM commands are available as macros in the Bus Pirate 1-Wire library, see (0) for a menu. ROM command macros <em>include the 1-Wire bus reset procedure</em>.</p>
<p><strong>Single device</strong></p>
<p><strong><img class="alignnone size-full wp-image-6759" title="singli-4501" src="http://hackadaycom.files.wordpress.com/2008/12/singli-4501.jpg" alt="singli-4501" width="450" height="325" /><br />
</strong></p>
<p>All 1-Wire devices have a unique 64bit (8 byte) address, and some 1-Wire devices are used exclusively to give electronics a unique tracking number. When a single device is connected to a 1-Wire bus, the READ ROM command will extract its address.</p>
<blockquote><p>1-WIRE&gt;{ 0&#215;33 r:8 <strong>&lt;&#8211;command</strong><br />
xxx 1WIRE BUS RESET OK<br />
xxx 1WIRE WRITE: 0&#215;33 <strong>&lt;&#8211;READ ROM</strong><br />
xxx 1WIRE BULK READ, 0&#215;08 BYTES:<br />
0&#215;22 0&#215;47 0&#215;45 0&#215;22 0&#215;00 0&#215;00 0&#215;00 0&#215;29 <strong>&lt;&#8211;ID#</strong><br />
1-WIRE&gt;</p></blockquote>
<p>The command sends a bus reset ({), the READ ROM command (0&#215;33), and reads the 64bit address (r:8, 8 bytes *8bits/byte=64bits).</p>
<p>The first byte (0&#215;22) identifies this as a DS1822 thermometer. The next 6 bytes are unique to this device, and the final byte is a <a href="http://en.wikipedia.org/wiki/Cyclic_redundancy_check">CRC</a> of the previous 7 bytes.</p>
<p>Now we can address the device with the MATCH ROM command and send it further instructions.</p>
<blockquote><p>1-WIRE&gt;{ 0&#215;55 0&#215;22 0&#215;47 0&#215;45 0&#215;22 0&#215;00 0&#215;00 0&#215;00 0&#215;29 0&#215;44<br />
xxx 1WIRE BUS RESET OK<br />
xxx 1WIRE WRITE: 0&#215;55<strong>&lt;&#8211;MATCH ROM command</strong><br />
xxx 1WIRE WRITE: 0&#215;22<strong>&lt;&#8211;start address</strong><br />
xxx 1WIRE WRITE: 0&#215;47<br />
xxx 1WIRE WRITE: 0&#215;45<br />
xxx 1WIRE WRITE: 0&#215;22<br />
xxx 1WIRE WRITE: 0&#215;00<br />
xxx 1WIRE WRITE: 0&#215;00<br />
xxx 1WIRE WRITE: 0&#215;00<br />
xxx 1WIRE WRITE: 0&#215;29<br />
xxx 1WIRE WRITE: 0&#215;44 <strong>&lt;&#8211;start conversion</strong><br />
1-WIRE&gt;</p></blockquote>
<p>First, we send the MATCH ROM command (0&#215;55) and the device address (8 bytes).  Next is the CONVERT T command (0&#215;44, datasheet page 11) that starts the temperature conversion.</p>
<p>A second command sequence retrieves the temperature reading from the DS1822.</p>
<blockquote><p>1-WIRE&gt;{ 0&#215;55 0&#215;22 0&#215;47 0&#215;45 0&#215;22 0&#215;00 0&#215;00 0&#215;00 0&#215;29 0xbe r:9<br />
xxx 1WIRE BUS RESET OK<br />
xxx 1WIRE WRITE: 0&#215;55<br />
xxx 1WIRE WRITE: 0&#215;22<br />
<em>&#8230;long 1-Wire address&#8230;</em><br />
xxx 1WIRE WRITE: 0&#215;29<br />
xxx 1WIRE WRITE: 0xBE <strong>&lt;&#8211;read scratchpad command</strong><br />
xxx 1WIRE BULK READ, 0&#215;09 BYTES:<br />
0&#215;71 0&#215;01 0xFF 0&#215;00 0x7F 0xFF 0x0F 0&#215;10 0xF8<br />
1-WIRE&gt;</p></blockquote>
<p>The READ SCRATCHPAD command (0xBE, datasheet page 11) returns 9 bytes. We only care about the first two bytes, the rest can be decoded according the the table on page 7 of the datasheet. Temperature is calculated according to page 4 of the datasheet: 0&#215;0171 HEX=369 DEC, 369*0.0625=23C  (74F).</p>
<p><strong>Multiple devices</strong></p>
<p><img class="alignnone size-full wp-image-6756" title="multi-450" src="http://hackadaycom.files.wordpress.com/2008/12/multi-450.jpg" alt="multi-450" width="450" height="340" /></p>
<p>When multiple 1-Wire devices share a bus it&#8217;s more difficult to determine all the addresses. The fastest way to find attached devices is with the SEARCH ROM command (0xF0) and a binary branching procedure. The Bus Pirate automates this with macro (240).</p>
<blockquote><p>1-WIRE&gt;(240) <strong>&lt;&#8211;macro 240</strong><br />
xxx 1WIRE ROM COMMAND: SEARCH (0xF0)<br />
Found devices at:<br />
Macro     1-WIRE address<br />
1.0&#215;22 0&#215;50 0&#215;28 0&#215;22 0&#215;00 0&#215;00 0&#215;00 0x0A <strong>&lt;&#8211;address</strong><br />
*DS1822 Econ Dig Therm <strong>&lt;&#8211;type according to family code</strong><br />
2.0&#215;22 0xD0 0xC7 0x1A 0&#215;00 0&#215;00 0&#215;00 0&#215;01<br />
*DS1822 Econ Dig Therm<br />
3.0&#215;22 0&#215;47 0&#215;45 0&#215;22 0&#215;00 0&#215;00 0&#215;00 0&#215;29<br />
*DS1822 Econ Dig Therm<br />
Found 0&#215;03 devices.<br />
The first 10 device IDs are available by MACRO, see (0).<br />
1-WIRE&gt;</p></blockquote>
<p>The SEARCH ROM command shows the devices it found, and the type according to the family code.</p>
<p>We think typing 8 byte 1-Wire addresses is really tedious, so the first 10 device addresses are stored in memory and can be accessed with the macros (1)&#8230;(10). A buffer for up to 50 device addresses can be defined in the 1-Wire library at compile time. Ideally, this data will be stored in a global scratch buffer shared by all modules in a future firmware update.</p>
<blockquote><p>1-WIRE&gt;(0) <strong>&lt;&#8211;show macro list</strong><br />
0.Macro menu<br />
Macro     1-WIRE address <strong>&lt;&#8211;enumerated device addresses</strong><br />
1.0&#215;22 0&#215;50 0&#215;28 0&#215;22 0&#215;00 0&#215;00 0&#215;00 0x0A<br />
*DS1822 Econ Dig Therm<br />
2.0&#215;22 0xD0 0xC7 0x1A 0&#215;00 0&#215;00 0&#215;00 0&#215;01<br />
*DS1822 Econ Dig Therm<br />
3.0&#215;22 0&#215;47 0&#215;45 0&#215;22 0&#215;00 0&#215;00 0&#215;00 0&#215;29<br />
*DS1822 Econ Dig Therm<br />
1-WIRE ROM COMMAND MACROs:<strong>&lt;&#8211;normal commands</strong><br />
51.READ ROM (0&#215;33) *for single device bus<br />
85.MATCH ROM (0&#215;55) *followed by 64bit address<br />
204.SKIP ROM (0xCC) *followed by command<br />
236.ALARM SEARCH (0xEC)<br />
240.SEARCH ROM (0xF0)<br />
1-WIRE&gt;</p></blockquote>
<p>The macro menu (0) will also include the device addresses stored in the roster. Now we can just address devices by macro, rather than typing the whole 64bit address every time.</p>
<blockquote><p>1-WIRE&gt;(85) (1) 0&#215;44 <strong>&lt;&#8211;start conversion</strong><br />
xxx 1WIRE BUS RESET OK<br />
xxx 1WIRE WRITE ROM COMMAND: MATCH (0&#215;55) *follow with 64bit address<br />
xxx 1WIRE ADDRESS MACRO 1: 0&#215;22 0&#215;50 0&#215;28 0&#215;22 0&#215;00 0&#215;00 0&#215;00 0x0A<br />
xxx 1WIRE WRITE: 0&#215;44<br />
1-WIRE&gt;(85) (1) 0xbe r:9 <strong>&lt;&#8211;fetch reading</strong><br />
xxx 1WIRE BUS RESET OK<br />
xxx 1WIRE WRITE ROM COMMAND: MATCH (0&#215;55) *follow with 64bit address<br />
xxx 1WIRE ADDRESS MACRO 1: 0&#215;22 0&#215;50 0&#215;28 0&#215;22 0&#215;00 0&#215;00 0&#215;00 0x0A<br />
xxx 1WIRE WRITE: 0xBE<br />
xxx 1WIRE BULK READ, 0&#215;09 BYTES:<br />
0&#215;81 0&#215;01 0x4B 0&#215;46 0x7F 0xFF 0x0F 0&#215;10 0&#215;71<br />
1-WIRE&gt;</p></blockquote>
<p>(85) is a shortcut for a bus reset and MATCH ROM command. (1) is the device address macro, and 0&#215;44 is the command to begin a temperature conversion. Retrieving the reading involves the same macros, but substitutes the command to read the device (0xBE) and grabs 9 bytes (r:9). The temperature is 0&#215;0181, or 24C next to the PC fan.</p>
<p><strong>Taking it further</strong></p>
<p>We used the Bus Pirate to give a visual demonstration of the 1-Wire protocol, but the real challenge is integrating it into your own design. Maxim provides <a href="http://www.maxim-ic.com/products/ibutton/software/1wire/wirekit.cfm">example code</a>, Microchip has an <a href="http://ww1.microchip.com/downloads/en/AppNotes/01199a.pdf">app note</a> (PDF), and you can check out the <a href="http://www.microchipc.com/sourcecode/#heater">example code</a> we used.</p>
<p><strong>Firmware download:</strong> <a href="http://blog.mahalo.com/hackaday/howto/buspirate.v0d.zip">buspirate.vod.zip</a></p>
<br />Posted in home hacks, parts, tool hacks  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/hackadaycom.wordpress.com/6706/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/hackadaycom.wordpress.com/6706/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/hackadaycom.wordpress.com/6706/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/hackadaycom.wordpress.com/6706/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/hackadaycom.wordpress.com/6706/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/hackadaycom.wordpress.com/6706/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/hackadaycom.wordpress.com/6706/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/hackadaycom.wordpress.com/6706/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/hackadaycom.wordpress.com/6706/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/hackadaycom.wordpress.com/6706/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/hackadaycom.wordpress.com/6706/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/hackadaycom.wordpress.com/6706/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/hackadaycom.wordpress.com/6706/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/hackadaycom.wordpress.com/6706/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hackaday.com&amp;blog=4779443&amp;post=6706&amp;subd=hackadaycom&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://hackaday.com/2008/12/10/parts-1-wire-temperature-sensor-ds1822/feed/</wfw:commentRss>
		<slash:comments>16</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/1wire.jpg" medium="image">
			<media:title type="html">1wire</media:title>
		</media:content>

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

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

		<media:content url="http://hackadaycom.files.wordpress.com/2008/12/multi-450.jpg" medium="image">
			<media:title type="html">multi-450</media:title>
		</media:content>
	</item>
		<item>
		<title>1-wire barometer</title>
		<link>http://hackaday.com/2008/07/22/1-wire-barometer/</link>
		<comments>http://hackaday.com/2008/07/22/1-wire-barometer/#comments</comments>
		<pubDate>Tue, 22 Jul 2008 14:46:00 +0000</pubDate>
		<dc:creator>Will O'Brien</dc:creator>
				<category><![CDATA[classic hacks]]></category>
		<category><![CDATA[misc hacks]]></category>
		<category><![CDATA[1-wire]]></category>
		<category><![CDATA[barometer]]></category>

		<guid isPermaLink="false">http://hackaday.iheartcashews.com:8181/2008/07/22/1-wire-barometer/</guid>
		<description><![CDATA[[David] put together this rather nice 1-wire barometer. An MPX4115 measures the pressure while an SMD DS2438 mounted to an 8 pin DIP socket provides the 1-wire interface. The writeup includes a nice description of the board layout and wiring, making this project accessible to just about anyone with a decent tip on their soldering [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hackaday.com&amp;blog=4779443&amp;post=2320&amp;subd=hackadaycom&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><img width="400" vspace="4" hspace="4" height="238" border="0" src="http://hackadaycom.files.wordpress.com/2008/07/1-wire-barometers.jpg?w=400&#038;h=238" alt="" /><br />[David] put together this rather nice <a href="http://davidbray.org/onewire/barometer.html">1-wire barometer</a>. An MPX4115 measures the pressure while an SMD DS2438 mounted to an 8 pin DIP socket provides the 1-wire interface. The writeup includes a nice description of the board layout and wiring, making this project accessible to just about anyone with a decent tip on their soldering iron.</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/hackadaycom.wordpress.com/2320/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/hackadaycom.wordpress.com/2320/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/hackadaycom.wordpress.com/2320/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/hackadaycom.wordpress.com/2320/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/hackadaycom.wordpress.com/2320/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/hackadaycom.wordpress.com/2320/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/hackadaycom.wordpress.com/2320/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/hackadaycom.wordpress.com/2320/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/hackadaycom.wordpress.com/2320/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/hackadaycom.wordpress.com/2320/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/hackadaycom.wordpress.com/2320/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/hackadaycom.wordpress.com/2320/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/hackadaycom.wordpress.com/2320/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/hackadaycom.wordpress.com/2320/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/hackadaycom.wordpress.com/2320/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/hackadaycom.wordpress.com/2320/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hackaday.com&amp;blog=4779443&amp;post=2320&amp;subd=hackadaycom&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://hackaday.com/2008/07/22/1-wire-barometer/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">Will O&#039;Brien</media:title>
		</media:content>

		<media:content url="http://hackadaycom.files.wordpress.com/2008/07/1-wire-barometers.jpg" medium="image" />
	</item>
		<item>
		<title>1-wire thermostat control</title>
		<link>http://hackaday.com/2007/10/24/1-wire-thermostat-control/</link>
		<comments>http://hackaday.com/2007/10/24/1-wire-thermostat-control/#comments</comments>
		<pubDate>Thu, 25 Oct 2007 05:10:00 +0000</pubDate>
		<dc:creator>Will O'Brien</dc:creator>
				<category><![CDATA[home hacks]]></category>
		<category><![CDATA[1-wire]]></category>
		<category><![CDATA[pc thermostat]]></category>
		<category><![CDATA[PcThermostat]]></category>

		<guid isPermaLink="false">http://hackaday.iheartcashews.com:8181/2007/10/24/1-wire-thermostat-control/</guid>
		<description><![CDATA[For some reason, computer controllable thermostats are pretty freakin&#8217; expensive. I found a reference to a 1-wire thermostat in this(mirror) sample senior project on home automation. It turns out that Dallas Semiconductor put one together a while back as an application for their TINI platform. (web-application server on a chip). The write-up has since vanished [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hackaday.com&amp;blog=4779443&amp;post=1512&amp;subd=hackadaycom&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><img width="400" vspace="4" hspace="4" height="325" border="0" src="http://hackadaycom.files.wordpress.com/2007/10/1-wire-thermostat.jpg?w=400&#038;h=325"  alt="" /><br />For some reason, computer controllable thermostats are <a href="http://www.smarthome.com/30532.html">pretty</a> freakin&#8217; expensive. I found a reference to a 1-wire thermostat in <a href="http://eljabiri1.tripod.com/sitebuildercontent/sitebuilderfiles/sample-Senior-Project-7.pdf">this</a>(<a href="http://biobug.org/had-mirror/">mirror</a>) sample senior project on home automation. It turns out that Dallas Semiconductor put one together a while back as an application for their <a href="http://www.maxim-ic.com/products/microcontrollers/tini/">TINI platform</a>. (web-application server on a chip). The write-up has since vanished from their site, but I <a href="http://web.archive.org/web/20040617232208/http://www.ibutton.com/TINI/applications/lux/index.html">found it</a> thatnks to archive.org. The thermostat used to run about $50, and a <a href="http://www.google.com/url?sa=t&amp;ct=res&amp;cd=2&amp;url=http%3A%2F%2Fwww.luxproducts.com%2Fthermostats%2Ftx9000.htm&amp;ei=TxIgR7GeA6CsiAGG5ejvDQ&amp;usg=AFQjCNGhGbJFajRKUF7P2u4HQI0GuJBZAA&amp;sig2=ZbeBQbHikLc6qJYpwU2h-A">similar model</a> still seems to be produced. The 1-wire <a href="http://web.archive.org/web/20040617232208/http://www.ibutton.com/TINI/applications/lux/index.html#hardware">interface</a> is pretty simple &#8211; Maxim&#8217;s TINI board to control it: not so much. Just using the 1-wire interface with an inexpensive thermostat and controlling from a PC seems pretty viable to me. Just in case, I mirrored the 1-wire interface schematics <a href="http://biobug.org/had-mirror/1-wire-thermo/">here</a>.</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/hackadaycom.wordpress.com/1512/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/hackadaycom.wordpress.com/1512/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/hackadaycom.wordpress.com/1512/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/hackadaycom.wordpress.com/1512/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/hackadaycom.wordpress.com/1512/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/hackadaycom.wordpress.com/1512/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/hackadaycom.wordpress.com/1512/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/hackadaycom.wordpress.com/1512/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/hackadaycom.wordpress.com/1512/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/hackadaycom.wordpress.com/1512/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/hackadaycom.wordpress.com/1512/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/hackadaycom.wordpress.com/1512/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/hackadaycom.wordpress.com/1512/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/hackadaycom.wordpress.com/1512/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/hackadaycom.wordpress.com/1512/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/hackadaycom.wordpress.com/1512/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hackaday.com&amp;blog=4779443&amp;post=1512&amp;subd=hackadaycom&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://hackaday.com/2007/10/24/1-wire-thermostat-control/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">Will O&#039;Brien</media:title>
		</media:content>

		<media:content url="http://hackadaycom.files.wordpress.com/2007/10/1-wire-thermostat.jpg" medium="image" />
	</item>
	</channel>
</rss>
