<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-7499663243631585857</id><updated>2011-12-02T08:02:04.820-08:00</updated><title type='text'>bafoontecha</title><subtitle type='html'>theory meets application.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://bafoontecha.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7499663243631585857/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://bafoontecha.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>peddamat</name><uri>http://www.blogger.com/profile/02029005111058333387</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>7</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-7499663243631585857.post-2551235080961962249</id><published>2008-11-29T00:44:00.001-08:00</published><updated>2009-02-02T02:18:46.687-08:00</updated><title type='text'>Hey people, I've moved!</title><content type='html'>Check out the updated site at http://bafoontecha.com&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;- &lt;a href="http://bafoontecha.com"&gt;Sumanth Peddamatham&lt;/a&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7499663243631585857-2551235080961962249?l=bafoontecha.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://bafoontecha.blogspot.com/feeds/2551235080961962249/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7499663243631585857&amp;postID=2551235080961962249' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7499663243631585857/posts/default/2551235080961962249'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7499663243631585857/posts/default/2551235080961962249'/><link rel='alternate' type='text/html' href='http://bafoontecha.blogspot.com/2008/11/hey-people-ive-moved.html' title='Hey people, I&apos;ve moved!'/><author><name>peddamat</name><uri>http://www.blogger.com/profile/02029005111058333387</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7499663243631585857.post-2395218710453174635</id><published>2008-07-15T00:06:00.000-07:00</published><updated>2008-07-15T14:17:52.332-07:00</updated><title type='text'>Easy stepper motor control with the Freescale MCZ33970</title><content type='html'>&lt;div style="text-align: center;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp1.blogger.com/_fdkFAhcitHE/SHxxQhg1qlI/AAAAAAAABHI/p1BypGJGnLk/s1600-h/SN151196_small.jpg" style="text-decoration: none;"&gt;&lt;img style="text-decoration: underline;display: block; margin-top: 0px; margin-right: auto; margin-bottom: 10px; margin-left: auto; text-align: center; cursor: pointer; " src="http://bp1.blogger.com/_fdkFAhcitHE/SHxxQhg1qlI/AAAAAAAABHI/p1BypGJGnLk/s400/SN151196_small.jpg" border="0" alt="" id="BLOGGER_PHOTO_ID_5223174196530883154" /&gt;&lt;/a&gt;&lt;div style="text-align: center;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;Freescale MCZ33970 Dual Gauge Driver IC&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;While prototyping an ambient-display project that I've been mulling over, I came across the &lt;a href="http://www.freescale.com/webapp/sps/site/prod_summary.jsp?code=MC33970&amp;amp;nodeId=01435979968448"&gt;Freescale MC(Z)33970 Dual Gauge driver&lt;/a&gt; IC.  The part seemed interesting, so I ordered a sample and whipped up a small C library to use in conjunction with a perf-boarded &lt;/span&gt;&lt;a href="http://bafoontecha.blogspot.com/2008/06/build-usb-bit-whacker-in-10-minutes.html"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;USB Bit Whacker&lt;/span&gt;&lt;/a&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt; I had on my workbench.  (An Arduino library is also available below)&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;The MC(Z)33970 is a neat little stepper motor driver specifically designed to control &lt;/span&gt;&lt;a href="http://www.axies.eu/resources/6405-AFIC$5B1$5D.pdf"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;small, two-phase steppers&lt;/span&gt;&lt;/a&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt; for automotive instrumentation displays.  I should immediately point out that this driver isn't designed for general purpose stepper control, like the &lt;/span&gt;&lt;a href="http://www.allegromicro.com/en/Products/Part_Numbers/3967/"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;Allegro A3967&lt;/span&gt;&lt;/a&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;.  It has relatively weak current drivers and is only designed to sweep a pointer for a total of 340-degrees; this means low torque and a limited range of motion.  &lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;While these limitations may seem annoying at first, they make sense given the niche these ICs are designed to fill.  Besides, the MCZs have a number of other redeeming features, such as programmable sweep velocity, programmable acceleration and deceleration parameters, and automatic "Return to Zero (RTZ)" functionality, which make them great for creating analog displays.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;img src="http://bp0.blogger.com/_fdkFAhcitHE/SHxgiOIWk-I/AAAAAAAABG4/7ca33OQwScA/s400/SN151174_small.jpg" border="0" alt="" id="BLOGGER_PHOTO_ID_5223155808867881954" style="float: left; margin-top: 0px; margin-right: 10px; margin-bottom: 10px; margin-left: 0px; cursor: pointer; " /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style=" font-weight: bold;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;MC33970 Datasheet&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style=" ;"&gt;&lt;a href="http://web.ics.purdue.edu/~peddamat/blog/mcz33970/MC33970.pdf"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;MC33970.pdf [2MB]&lt;/span&gt;&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style=" font-weight: bold;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;MCZ33970 C Library&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style=" "&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;a href="http://web.ics.purdue.edu/~peddamat/blog/mcz33970/mcz33970.c"&gt;c [1.7KB]&lt;/a&gt; , &lt;a href="http://web.ics.purdue.edu/~peddamat/blog/mcz33970/mcz33970.h"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;h [2.3KB]&lt;/span&gt;&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;MCZ33970 Arduino code&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;a href="http://web.ics.purdue.edu/~peddamat/blog/mcz33970/mcz33970-arduino.zip"&gt;mcz33970-arduino.zip [4.1kb]&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style=" font-weight: bold;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;Modified UBW Firmware&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;a href="http://web.ics.purdue.edu/~peddamat/blog/mcz33970/FW_D_2455.hex"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;FW_D_2455.hex [55.1KB]&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;a href="http://web.ics.purdue.edu/~peddamat/blog/mcz33970/D_143-MCZ33970.zip"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;D_143-MCZ33970.zip [949.5KB]&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;UBW Python Scripts&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style=" "&gt;&lt;a href="http://web.ics.purdue.edu/~peddamat/blog/mcz33970/mcz33970.py"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;mcz33970.py&lt;/span&gt;&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style=" "&gt;&lt;a href="http://web.ics.purdue.edu/~peddamat/blog/mcz33970/mcz33970-softpot.py"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;mcz33970-softpot.py&lt;/span&gt;&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style=" "&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;I didn't have any automotive displays about, but I did have a pair of Vexta steppers, so I decided to use them for this project.&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;img src="http://bp2.blogger.com/_fdkFAhcitHE/SHxbyGTQw2I/AAAAAAAABGw/_71Wi5uMUdc/s400/schematic.png" border="0" alt="" id="BLOGGER_PHOTO_ID_5223150584085922658" style="display: block; margin-top: 0px; margin-right: auto; margin-bottom: 10px; margin-left: auto; text-align: center; cursor: pointer; " /&gt;&lt;/div&gt;&lt;div&gt;&lt;div style="text-align: center; "&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;Interfacing schematic (Courtesy Freescale)&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: left; "&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: left; "&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;As you can see from the schematic, the connections are very straight-forward.  The MCZ has built in protection diodes, so stepper windings can be connected directly to its pins.  I couldn't find any optocouplers in my workshop so I connected the MCZ directly to my Bit Whacker.  This is an &lt;span class="Apple-style-span" style="font-weight: bold;"&gt;EXTREMELY BAD&lt;/span&gt; idea,&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt; since the high-voltage stepper motor supply can potentially short to the digital supply if the IC fails.  Since the Bit Whacker is conveniently connected to your USB port, this may lead to a very bad day.  &lt;/span&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;I *HIGHLY* recommend that you use optocouplers on the SPI lines in your design!&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;  &lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: left; "&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: left; "&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;Moving on, to make wiring a bit easier I decided to move the SS pin over from RA5 to RB2.  I'm pointing this out to those readers who may be scrutinizing my daughterboard photograph (absolutely none).&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;img src="http://bp1.blogger.com/_fdkFAhcitHE/SHxTn1Ic3DI/AAAAAAAABGI/LbbaaQ1w2kI/s400/SN151155_small.jpg" border="0" alt="" id="BLOGGER_PHOTO_ID_5223141611585461298" style="text-align: left;display: block; margin-top: 0px; margin-right: auto; margin-bottom: 10px; margin-left: auto; cursor: pointer; " /&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;MCZ33970 Daughterboard&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;I epoxied the 24-pin SOICW IC to a perfboard, and with a few other parts, made a little daughterboard for a Bit Whacker.  &lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;img src="http://bp2.blogger.com/_fdkFAhcitHE/SHxTn18JtDI/AAAAAAAABGQ/W4EN1mAl8oc/s400/SN151157_small.jpg" border="0" alt="" id="BLOGGER_PHOTO_ID_5223141611802309682" style="display: block; margin-top: 0px; margin-right: auto; margin-bottom: 10px; margin-left: auto; text-align: center; cursor: pointer; " /&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;USB Bit Whacker&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;I &lt;/span&gt;&lt;a href="http://web.ics.purdue.edu/~peddamat/blog/mcz33970/FW_D_2455.hex"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;modified&lt;/span&gt;&lt;/a&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt; the firmware of the UBW to add two additional commands:&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;ul&gt;&lt;li&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;CM - Configure the stepper motor driver IC&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;SM - Send a position update command to the driver IC&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;I also wrote a small &lt;/span&gt;&lt;a href="http://web.ics.purdue.edu/~peddamat/blog/mcz33970/mcz33970.c"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;C&lt;/span&gt;&lt;/a&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt; &lt;/span&gt;&lt;a href="http://web.ics.purdue.edu/~peddamat/blog/mcz33970/mcz33970.h"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;library&lt;/span&gt;&lt;/a&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt; that you can modify and use in your own UBW or non-UBW (ala Arduino) based projects.  The library is simple and should be self-explanatory.&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;img src="http://bp2.blogger.com/_fdkFAhcitHE/SHxToDOcbtI/AAAAAAAABGY/RwVVDR-dEfY/s400/SN151158_small.jpg" border="0" alt="" id="BLOGGER_PHOTO_ID_5223141615368695506" style="display: block; margin-top: 0px; margin-right: auto; margin-bottom: 10px; margin-left: auto; text-align: center; cursor: pointer; " /&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;The completed assembly&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;Here is a video demonstrating the dual-drive and velocity control capability of the IC.  &lt;/span&gt;&lt;/div&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;div style="text-align: center;"&gt;&lt;object width="425" height="350"&gt; &lt;param name="movie" value="http://www.youtube.com/v/EO3D56ejheE"&gt;  &lt;embed src="http://www.youtube.com/v/EO3D56ejheE" type="application/x-shockwave-flash" width="425" height="350"&gt;&lt;/embed&gt;  &lt;/object&gt;&lt;/div&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;div style="text-align: left;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;To make things slightly more interesting (very slight, indeed), I connected a &lt;/span&gt;&lt;a href="http://spectrasymbol.com/typo3/site/en/sensors/softpot.html"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;Spectra Symbol SoftPot&lt;/span&gt;&lt;/a&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt; to one of the ADC pins of the Bit Whacker and used the readings to control the position of the stepper motor pointers.  You can find the Python scripts above.&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;object width="425" height="350"&gt; &lt;param name="movie" value="http://www.youtube.com/v/1TAJcPb-xNQ"&gt;  &lt;embed src="http://www.youtube.com/v/1TAJcPb-xNQ" type="application/x-shockwave-flash" width="425" height="350"&gt;&lt;/embed&gt;  &lt;/object&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;SoftPot stepper motor control&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;img src="http://bp1.blogger.com/_fdkFAhcitHE/SHyAku2JZoI/AAAAAAAABHQ/PrcQy2y9n3o/s400/SN151173_small.jpg" border="0" alt="" id="BLOGGER_PHOTO_ID_5223191036381718146" style="display: block; margin-top: 0px; margin-right: auto; margin-bottom: 10px; margin-left: auto; text-align: center; cursor: pointer; " /&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;A bunch of pots&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;I can imagine a number of uses for this chip, especially in low-power &lt;/span&gt;&lt;a href="http://ubicomp.org/ubicomp2008"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;ubiquitous computing&lt;/span&gt;&lt;/a&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt; devices.  Things get really exciting when you have multiple ICs operating in concert.  As I continue to burn through my summer-projects list, I'll see if I have time (or the need) for a MCZ-based Arduino shield.  As always, if you find any bugs or need any help, please let me know.&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;Thanks,&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;Sumanth P.&lt;/span&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7499663243631585857-2395218710453174635?l=bafoontecha.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://bafoontecha.blogspot.com/feeds/2395218710453174635/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7499663243631585857&amp;postID=2395218710453174635' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7499663243631585857/posts/default/2395218710453174635'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7499663243631585857/posts/default/2395218710453174635'/><link rel='alternate' type='text/html' href='http://bafoontecha.blogspot.com/2008/07/easy-stepper-motor-control-with.html' title='Easy stepper motor control with the Freescale MCZ33970'/><author><name>peddamat</name><uri>http://www.blogger.com/profile/02029005111058333387</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://bp1.blogger.com/_fdkFAhcitHE/SHxxQhg1qlI/AAAAAAAABHI/p1BypGJGnLk/s72-c/SN151196_small.jpg' height='72' width='72'/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7499663243631585857.post-1547137103898949342</id><published>2008-06-23T03:25:00.000-07:00</published><updated>2008-08-14T05:29:34.531-07:00</updated><title type='text'>Build a USB Bit Whacker in 10 minutes</title><content type='html'>&lt;div style="text-align: center;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp3.blogger.com/_fdkFAhcitHE/SF9_C6f_0RI/AAAAAAAABCU/7fDxB8OMGVM/s1600-h/SN151002.jpg"&gt;&lt;img style="cursor:pointer; cursor:hand;" src="http://bp3.blogger.com/_fdkFAhcitHE/SF9_C6f_0RI/AAAAAAAABCU/7fDxB8OMGVM/s400/SN151002.jpg" border="0" alt="" id="BLOGGER_PHOTO_ID_5215026581558251794" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-size: x-large;"&gt;I've moved!  Please go here: &lt;span class="Apple-style-span" style="font-family: 'Trebuchet MS'; "&gt;&lt;span class="Apple-style-span" style="font-size: x-large;"&gt;&lt;a href="http://bafoontecha.com/2008/06/23/build-a-usb-bit-whacker-in-10-minutes/"&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 0);"&gt;http://bafoontecha.com/2008/06/23/build-a-usb-bit-&lt;/span&gt;&lt;span class="Apple-style-span" style="font-size: x-large;"&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 0);"&gt;whacker-in-10-minutes/&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;span class="Apple-style-span" style="font-family: Georgia; "&gt;&lt;span class="Apple-style-span" style="font-size: x-large;"&gt; for the latest version of this article.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;Every so often you come across a reinvention of an old idea that blows you away, not only in its elegance but in its sheer utility.  For me, this occurred a few weeks ago, when I came across the &lt;a href="http://schmalzhaus.com/UBW/"&gt;USB Bit Whacker&lt;/a&gt;.  The name was familiar, I'd surely seen it while browsing the &lt;a href="http://www.sparkfun.com/commerce/product_info.php?products_id=762"&gt;Sparkfun product catalog&lt;/a&gt;, but for some reason the description hadn't compelled me to click.  &lt;/span&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;First, a bit of history...  In the good-old days, computers came with these things called "parallel ports", or so I've been told (should that be active tense?)  These "parallel ports", with a bit of register twiddling, empowered the user with 17-some-odd digital pins for inputting and outputting data.  Newer computers computers tend to forgo parallel I/O methods for faster and sleeker I/O methods, ala, USB, USB, and USB.  While these newer generation of I/O ports are much more compact and support higher bandwidths, they are a bit harder for the common user to interface with.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;In comes the USB Bit Whacker.  Calling the USB Bit Whacker a virtual parallel port is doing it a disservice; it's much, much more than that.  It gives you complete control of a fairly powerful microcontroller, the &lt;a href="http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&amp;amp;nodeId=1335&amp;amp;dDocName=en010280"&gt;PIC18F2550&lt;/a&gt;, through a serial, command-driven interface.  The entire platform is powered from the USB bus, no wall-warts or additional wires!  In addition, all communication occurs through a virtual serial (COM) port, using the USB CDC protocol.&lt;/span&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;a href="http://schmalzhaus.com/UBW/Doc/FirmwareDDocumentation_v140.html"&gt;Simple ASCII commands&lt;/a&gt; allow you to configure and use the following onboard hardware peripherals: SPI/I2C module, USART serial module, PWM module, and 13-channel 10-bit Analog-to-Digital converter module.  Support for additional modules can easily be added to the open-source firmware.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;I love microcontrollers, and primarily due to the generosity of &lt;a href="http://www.microchip.com/"&gt;Microchip&lt;/a&gt;, have a number of PICs in my parts collection.  I came across the USB Bit Whacker project while desperately trying to get USB CDC working on a PIC18F2550.  Encouraged by the extreme simplicity of the &lt;a href="http://www.sparkfun.com/datasheets/DevTools/PIC/UBW-Schematic.pdf"&gt;schematic&lt;/a&gt; , I decided to breadboard it.  In a matter of minutes, I had a working development kit.  You can either &lt;a href="http://www.sparkfun.com/commerce/product_info.php?products_id=762"&gt;buy&lt;/a&gt; a &lt;a href="http://www.sparkfun.com/commerce/product_info.php?products_id=8265"&gt;kit&lt;/a&gt;, or follow these instructions to build your own.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;span class="Apple-style-span"  style="font-size:48px;"&gt;&lt;img src="http://bp2.blogger.com/_fdkFAhcitHE/SF9_ekvnROI/AAAAAAAABCc/c5P6hCNUlXY/s400/SN150982.jpg" border="0" alt="" id="BLOGGER_PHOTO_ID_5215027056754509026" style="cursor: pointer; " /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;span class="Apple-style-span"  style="font-size:18px;"&gt;Requirements&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;ul&gt;&lt;li&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;220 uF  electrolytic capacitor&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;0.1 uF capacitor&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;20 MHz oscillator (see the PIC18F2550 datasheet or additional options)&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;2 push buttons&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;1 USB Type B connector&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;2 3.3k resistors (the value of the pull-up resistor is not critical)&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;2 pieces of straight headers&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;A few jumper wires&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;A breadboard/perfboard&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;1 PIC18F2550 or PIC18f2450 microcontroller&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;PIC Programmer&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:18px;"&gt;Hardware Construction&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:18px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;span class="Apple-style-span"  style="font-size:18px;"&gt;&lt;img src="http://bp0.blogger.com/_fdkFAhcitHE/SF9_enbFTqI/AAAAAAAABCk/fZugXGCiXVc/s400/SN150988.jpg" border="0" alt="" id="BLOGGER_PHOTO_ID_5215027057473703586" style="cursor: pointer; " /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;span class="Apple-style-span"  style="font-size:13px;"&gt;Prepare the USB connector by cutting off the mounting brackets&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;span class="Apple-style-span"  style="font-size:13px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;span class="Apple-style-span"  style="font-size:13px;"&gt;&lt;img src="http://bp1.blogger.com/_fdkFAhcitHE/SF9_eqbGGEI/AAAAAAAABCs/qmlQ8lECypY/s400/SN150989.jpg" border="0" alt="" id="BLOGGER_PHOTO_ID_5215027058279061570" style="cursor: pointer; " /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;span class="Apple-style-span"  style="font-size:13px;"&gt;It should look something like this&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;span class="Apple-style-span"  style="font-size:13px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;span class="Apple-style-span"  style="font-size:13px;"&gt;&lt;img src="http://bp1.blogger.com/_fdkFAhcitHE/SF9_erUuZoI/AAAAAAAABC0/qonM7RY0TxE/s400/SN150990.jpg" border="0" alt="" id="BLOGGER_PHOTO_ID_5215027058520778370" style="cursor: pointer; " /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;span class="Apple-style-span"  style="font-size:13px;"&gt;Solder the header pins to the USB connector.&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;span class="Apple-style-span"  style="font-size:13px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;span class="Apple-style-span"  style="font-size:13px;"&gt;&lt;img src="http://bp0.blogger.com/_fdkFAhcitHE/SF9_e0HIPXI/AAAAAAAABC8/YbgfJOOuKBc/s400/SN150991.jpg" border="0" alt="" id="BLOGGER_PHOTO_ID_5215027060879670642" style="cursor: pointer; " /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;span class="Apple-style-span"  style="font-size:13px;"&gt;Alternate view&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;span class="Apple-style-span"  style="font-size:13px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;span class="Apple-style-span"  style="font-size:48px;"&gt;&lt;img src="http://bp2.blogger.com/_fdkFAhcitHE/SGcYtZLEncI/AAAAAAAABFQ/1Z0x6gJZZ8U/s400/28DIPv3Schematic.png" border="0" alt="" id="BLOGGER_PHOTO_ID_5217165861462515138" style="display: block; margin-top: 0px; margin-right: auto; margin-bottom: 10px; margin-left: auto; text-align: center; cursor: pointer; " /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;span class="Apple-style-span"  style="font-size:13px;"&gt;Original schematic (Credit: Brian Schmalz)&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;span class="Apple-style-span"  style="font-size:13px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;span class="Apple-style-span"  style="font-size:13px;"&gt;&lt;img src="http://bp0.blogger.com/_fdkFAhcitHE/SF-Cusq1UoI/AAAAAAAABDM/JR7LA1z4bfU/s400/SN150999.jpg" border="0" alt="" id="BLOGGER_PHOTO_ID_5215030632294732418" style="cursor: pointer; " /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;Begin placing the components on the breadboard&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;span class="Apple-style-span"  style="font-size:13px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;span class="Apple-style-span"  style="font-size:13px;"&gt;&lt;img src="http://bp0.blogger.com/_fdkFAhcitHE/SF-B9Fpv-PI/AAAAAAAABDE/pDSsHvaWQlA/s400/SN151002.jpg" border="0" alt="" id="BLOGGER_PHOTO_ID_5215029780007614706" style="cursor: pointer; " /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;span class="Apple-style-span"  style="font-size:13px;"&gt;Completed breadboard USB Bit Whacker.  (I left out the status LED)&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;span class="Apple-style-span"  style="font-size:13px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;span class="Apple-style-span"  style="font-size:large;"&gt;Software&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;span class="Apple-style-span"  style="font-size:18px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;span class="Apple-style-span"  style="font-size:13px;"&gt;Now that you have a completed Bit Whacker, you need to burn the bootloader onto your PIC.  Instructions for burning firmware onto your PIC are out of the scope of this document.  Luckily, you can find a &lt;a href="http://www.google.com/search?client=safari&amp;amp;rls=en-us&amp;amp;q=pic+programming&amp;amp;ie=UTF-8&amp;amp;oe=UTF-8"&gt;wealth of information&lt;/a&gt; online.  I use an &lt;a href="http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&amp;amp;nodeId=1406&amp;amp;dDocName=en010046"&gt;MPLAB ICD2&lt;/a&gt; clone that I purchased on eBay.  &lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;span class="Apple-style-span"  style="font-size:13px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;span class="Apple-style-span"  style="font-size:13px;"&gt;If you are using a 20 MHz oscillator, you can use &lt;a href="http://www.schmalzhaus.com/UBW/FW/2455/B/_output/FW_B_20.hex"&gt;this bootloader firmware&lt;/a&gt;.  Additional bootloader firmware is available on the &lt;a href="http://www.schmalzhaus.com/UBW/index.html"&gt;USB Bit Whacker homepage&lt;/a&gt; (Search for 'Bootloader').  (I know this is confusing, but the *Bootloader* firmware is different than the USB Bit Whacker firmware.  You need to burn the *Bootloader* firmware onto your PIC first using a dedicated PIC programmer.  After this, additional firmware updates can be done through the USB port!)&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;img src="http://bp1.blogger.com/_fdkFAhcitHE/SGcuCEOQttI/AAAAAAAABF4/gC2qdN5JCNM/s400/SN151032.jpg" border="0" alt="" id="BLOGGER_PHOTO_ID_5217189306360182482" style="display: block; margin-top: 0px; margin-right: auto; margin-bottom: 10px; margin-left: auto; text-align: center; cursor: pointer; " /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;Bit Whacker in Bootloader mode&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;span class="Apple-style-span"  style="font-size:13px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;Once you've burned the Bootloader firmware onto your PIC18F2x50, you need to load the Bit Whacker firmware.  Microchip provides a &lt;/span&gt;&lt;a href="http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&amp;amp;nodeId=2124&amp;amp;param=en532204&amp;amp;page=wwwFullSpeedUSB"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;USB Framework&lt;/span&gt;&lt;/a&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;, which comes with an application named &lt;/span&gt;&lt;a href="http://ww1.microchip.com/downloads/en/DeviceDoc/MCHPFSUSB_Setup_v1.3.exe"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;PDFUSB.exe&lt;/span&gt;&lt;/a&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;.  Using PDFUSB, you can load Bit Whacker firmware onto your PIC.  To prepare the PIC for loading firmware serially, you need to connect your development board to a USB port on your computer.  Then, while holding down the "Program" button (the orange pushbutton in the picture above), press and release the "Reset" button (the black pushbutton in the picture above).  The status LED on the prenatal USB Bit Whacker should be steady, and a Custom USB Device named "Microchip Custom USB Device" should show up in your Device Manager.&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;span class="Apple-style-span"  style="font-size:48px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;img src="http://bp3.blogger.com/_fdkFAhcitHE/SF-IdXIl8fI/AAAAAAAABD4/7o65wmKXGDw/s400/untitled.jpg" border="0" alt="" id="BLOGGER_PHOTO_ID_5215036931525964274" style="cursor: pointer; " /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;Download the latest USB Bit Whacker firmware, &lt;a href="http://www.schmalzhaus.com/UBW/FW/D_143/_2550output/FW_D_2455.hex"&gt;here&lt;/a&gt;.  At the time of writing, this was v1.4.3.  Load the PDFUSB.exe bootloader and select the firmware and the USB Board as follows:&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;span class="Apple-style-span"  style="font-size:13px;"&gt;&lt;img src="http://bp2.blogger.com/_fdkFAhcitHE/SF-JtKmR5oI/AAAAAAAABEA/qkAPji4GroE/s400/untitled2.JPG" border="0" alt="" id="BLOGGER_PHOTO_ID_5215038302550353538" style="cursor: pointer; " /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;Click on "Program Device" to load the firmware onto the PIC.  Once the loading is complete, hit "Execute" to switch to the USB Bit Whacker Firmware.  The status LED on the breadboard should begin to blink.  Looking in your Device Manager, you should have a new COM port.  On my machine, this shows up as COM4.&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;span class="Apple-style-span"  style="font-size:13px;"&gt;&lt;img src="http://bp2.blogger.com/_fdkFAhcitHE/SF-LO_0u47I/AAAAAAAABEI/xM4PNpbRYiM/s400/untitled3.JPG" border="0" alt="" id="BLOGGER_PHOTO_ID_5215039983285363634" style="cursor: pointer; " /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;Now, open you serial emulator of choice (HyperTerminal, &lt;/span&gt;&lt;a href="http://hp.vector.co.jp/authors/VA002416/teraterm.html"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;teraterm&lt;/span&gt;&lt;/a&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;, etc...)  and open up the serial port.  If you're using a Mac, try "screen /dev/tty.usbmodem1d11 57600".&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;Type the following commands to set Port A on the Bit Whacker to analog input, and to set a timer to output values of the analog pins at a 100ms interval (Unfortunately, you won't see what you are typing, so if you think you've made a mistake just hit "Enter" and try again.  The next revision of the firmware should fix this.  Also, this isn't as big a problem as it seems now, keep reading!)&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;blockquote&gt;&lt;/blockquote&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;blockquote&gt;&lt;div style="text-align: left;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;c,31,0,0,5&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;t,100,1&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;div style="text-align: left;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;The first line calls the "Configure" command indicating that all five available pins on Port A are inputs, all the pins on Port B are outputs, all the pins on Port C are outputs, and the 5 Port A pins are analog inputs.&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;The second line calls the "Timer" command with an interval of 100 ms, in analog mode.&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;You should see a stream of 0's filling your terminal window.  Try touching a few of the pins (2-7) to see the numbers change!  You now have a rudimentary, but fairly powerful DAQ at your fingertips.  &lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;span class="Apple-style-span"  style="font-size:13px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;span class="Apple-style-span"  style="font-size:13px;"&gt;&lt;img src="http://bp1.blogger.com/_fdkFAhcitHE/SGcjV7gN9nI/AAAAAAAABFY/zhkKOJFxAFw/s400/serial.png" border="0" alt="" id="BLOGGER_PHOTO_ID_5217177552989058674" style="display: block; margin-top: 0px; margin-right: auto; margin-bottom: 10px; margin-left: auto; text-align: center; cursor: pointer; " /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;Term output&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;Further instructions on using your Bit Whacker can be found &lt;a href="http://schmalzhaus.com/UBW/Doc/FirmwareDDocumentation_v140.html"&gt;here&lt;/a&gt;.&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;span class="Apple-style-span"  style="font-size:18px;"&gt;Advanced Example&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;span class="Apple-style-span"  style="font-size:13px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;img src="http://bp2.blogger.com/_fdkFAhcitHE/SGcm_ehslzI/AAAAAAAABFg/_8J3_zbjxXM/s400/geophone.jpg" border="0" alt="" id="BLOGGER_PHOTO_ID_5217181565300021042" style="display: block; margin-top: 0px; margin-right: auto; margin-bottom: 10px; margin-left: auto; text-align: center; cursor: pointer; " /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;span class="Apple-style-span"  style="font-size:13px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;The major advantage of having a command-driven interface is that it is easily scriptable.  I like to write small Python scripts to control my USB Bit Whacker.  I had an old &lt;/span&gt;&lt;a href="http://en.wikipedia.org/wiki/Geophone"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;Geophone&lt;/span&gt;&lt;/a&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt; from &lt;/span&gt;&lt;a href="http://www.epohouston.com/"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;EPO Depot&lt;/span&gt;&lt;/a&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt; laying around my parts bin.  If you click the link, you can see that a Geophone is a simple electromagnetic device which generates a voltage based on the displacement of a magnetic mass.  It's useful for detecting low-frequency vibrations such as earthquakes, footsteps, and in some cases, a combination of both.  &lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;span class="Apple-style-span"  style="font-size:13px;"&gt;&lt;img src="http://bp3.blogger.com/_fdkFAhcitHE/SGcm_Sg52oI/AAAAAAAABFo/vfSxLJHUjus/s400/geophone2.jpg" border="0" alt="" id="BLOGGER_PHOTO_ID_5217181562075470466" style="display: block; margin-top: 0px; margin-right: auto; margin-bottom: 10px; margin-left: auto; text-align: center; cursor: pointer; " /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;span class="Apple-style-span"  style="font-size:13px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;Scoping the output of the Geophone, I determined that the maximum voltage swing was around 4VPP (shaking it violently).  The average VPP was around 100 mV.  I wired up a quick op-amp circuit to center the Geophone output to 2.5V (1/2 the Bit Whacker rail voltage) and add a fair bit of amplification.  I rely on the fact that the opamp can not exceed its supply rail voltage to protect the Bit Whacker inputs.  This is generally not a good design practice, but hey, I was in a hurry.&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;span class="Apple-style-span"  style="font-size:13px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;span class="Apple-style-span"  style="font-size:13px;"&gt;I then wrote a Python script to capture the analog output of the Geophone at a sampling rate of 200 Hz.  Download it &lt;a href="http://web.ics.purdue.edu/~peddamat/blog/ubw/geophone.py"&gt;here&lt;/a&gt;.  &lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;img src="http://bp0.blogger.com/_fdkFAhcitHE/SGcsiXtePuI/AAAAAAAABFw/ASOyI0AMNAQ/s400/capture.png" border="0" alt="" id="BLOGGER_PHOTO_ID_5217187662323924706" style="display: block; margin-top: 0px; margin-right: auto; margin-bottom: 10px; margin-left: auto; text-align: center; cursor: pointer; " /&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;Plot of captured footstep data&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;The plot above is of four footsteps near the Geophone.  From the plot, I suspect the op-amp is latching up, but that's something I'll save for another post!&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;span class="Apple-style-span"  style="font-size:large;"&gt;Additional Notes&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;span class="Apple-style-span"  style="font-size:13px;"&gt;I've made a number of Bit Whackers over the last few weeks and have made many modifications to the firmware, including adding SPI and I2C support.  I've sent the changes to the developer, Brian Schmalz, who will hopefully roll them into the next firmware revision.&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;span class="Apple-style-span"  style="font-size:13px;"&gt;Here are a few pictures of the other Bit Whacker's that I've built.  One way to prevent components from moving around is to hot-glue them.&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;span class="Apple-style-span"  style="font-size:13px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;span class="Apple-style-span"  style="font-size:13px;"&gt;&lt;img src="http://bp0.blogger.com/_fdkFAhcitHE/SF-CurQd9SI/AAAAAAAABDU/S_axOdqU-PE/s400/SN150994.jpg" border="0" alt="" id="BLOGGER_PHOTO_ID_5215030631915713826" style="cursor: pointer; " /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;span class="Apple-style-span"  style="font-size:13px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;span class="Apple-style-span"  style="font-size:13px;"&gt;&lt;img src="http://bp3.blogger.com/_fdkFAhcitHE/SF-Cux6nIAI/AAAAAAAABDc/u58fvBmK67M/s400/SN150995.jpg" border="0" alt="" id="BLOGGER_PHOTO_ID_5215030633703088130" style="cursor: pointer; " /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;span class="Apple-style-span"  style="font-size:13px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;span class="Apple-style-span"  style="font-size:13px;"&gt;&lt;img src="http://bp2.blogger.com/_fdkFAhcitHE/SF-CvKc57zI/AAAAAAAABDk/D8WguPbPPdg/s400/SN150996.jpg" border="0" alt="" id="BLOGGER_PHOTO_ID_5215030640289378098" style="cursor: pointer; " /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;span class="Apple-style-span"  style="font-size:48px;"&gt;&lt;img src="http://bp0.blogger.com/_fdkFAhcitHE/SF-MWzC8mSI/AAAAAAAABEQ/0wPLK_wYOMw/s400/SN151005.jpg" border="0" alt="" id="BLOGGER_PHOTO_ID_5215041216805902626" style="cursor: pointer; " /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;span class="Apple-style-span"  style="font-size:13px;"&gt;Perf-board USB Bit Whacker&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;span class="Apple-style-span"  style="font-size:13px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;span class="Apple-style-span"  style="font-size:13px;"&gt;Thanks,&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;span class="Apple-style-span"  style="font-size:13px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;span class="Apple-style-span"  style="font-size:13px;"&gt;Sumanth P.&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7499663243631585857-1547137103898949342?l=bafoontecha.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://bafoontecha.blogspot.com/feeds/1547137103898949342/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7499663243631585857&amp;postID=1547137103898949342' title='9 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7499663243631585857/posts/default/1547137103898949342'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7499663243631585857/posts/default/1547137103898949342'/><link rel='alternate' type='text/html' href='http://bafoontecha.blogspot.com/2008/06/build-usb-bit-whacker-in-10-minutes.html' title='Build a USB Bit Whacker in 10 minutes'/><author><name>peddamat</name><uri>http://www.blogger.com/profile/02029005111058333387</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://bp3.blogger.com/_fdkFAhcitHE/SF9_C6f_0RI/AAAAAAAABCU/7fDxB8OMGVM/s72-c/SN151002.jpg' height='72' width='72'/><thr:total>9</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7499663243631585857.post-5454247408705233151</id><published>2008-06-23T00:21:00.000-07:00</published><updated>2008-06-23T02:10:02.472-07:00</updated><title type='text'>Powering your Technological Arts NanoCore C32 Development board</title><content type='html'>&lt;span class="Apple-style-span" style="font-size: small;"&gt;To help keep my series of articles on &lt;/span&gt;&lt;a href="http://bafoontecha.blogspot.com/2008/06/microcontroller-development-under-mac.html"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;microcontroller development on Mac OS X&lt;/span&gt;&lt;/a&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt; concise, I've decided to spin-off somewhat tangential topics into their own posts.  Here's mini-post on powering the &lt;/span&gt;&lt;a href="http://www.technologicalarts.com/myfiles/nc12.html"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;Technological Arts NanoCore C32 development kit&lt;/span&gt;&lt;/a&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;.&lt;/span&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;img src="http://bp2.blogger.com/_fdkFAhcitHE/SF9QIkNLPhI/AAAAAAAABBc/jrXXq9UjkC8/s400/SN150963.jpg" border="0" alt="" id="BLOGGER_PHOTO_ID_5214975001606438418" style="cursor: pointer; " /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;Jumper JB1&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;This Tech Arts development kit is compact and has relatively meager power requirements for a microcontroller board running at 24 MHz.  In addition, the devkit uses a LM1086 Adjustable LDO Voltage Regulator and provides a jumper (JB1) to conveniently switch between 3.3V and 5.0V operation.  I loaded up the basic "helloworld" example from &lt;/span&gt;&lt;a href="http://bafoontecha.blogspot.com/2008/06/microcontroller-development-under-mac.html"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;Part 1&lt;/span&gt;&lt;/a&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;, and measured the power consumption at both voltages with and without a serial cable connected:&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;ul&gt;&lt;li&gt;&lt;span class="Apple-style-span"  style="color: rgb(51, 51, 51);   font-family:Helvetica;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;3.3V, 16.7mA w/o serial port&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span"  style="color: rgb(51, 51, 51);   font-family:Helvetica;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;3.3V, 68.0mA w/ serial port&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span"  style="color: rgb(51, 51, 51);   font-family:Helvetica;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;5.0V, 17.6mA w/o serial port&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span"  style="color: rgb(51, 51, 51);   font-family:Helvetica;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;5.0V, 76.2mA w/ serial port&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div style="text-align: center;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;img src="http://bp1.blogger.com/_fdkFAhcitHE/SF9QI77BIzI/AAAAAAAABBk/hYxQ-QbuDj0/s400/SN150967.jpg" border="0" alt="" id="BLOGGER_PHOTO_ID_5214975007972729650" style="cursor: pointer; " /&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;img src="http://bp1.blogger.com/_fdkFAhcitHE/SF9QI69J5MI/AAAAAAAABBs/n4gJlNTag44/s400/SN150968.jpg" border="0" alt="" id="BLOGGER_PHOTO_ID_5214975007713256642" style="cursor: pointer; " /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;Left/Top: 5.0V operation (JB1 open), Right/Bottom: 3.3V operation (JB1 closed)&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;While hacking code in the lab, using a wall-wart is fine, however, the low power requirements of this devkit give you a variety of options when taking your project on the road.  I've powered my board using the following:&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;img src="http://bp2.blogger.com/_fdkFAhcitHE/SF9QIV4ILyI/AAAAAAAABBM/Gb6GXdfDFbQ/s400/SN150961.jpg" border="0" alt="" id="BLOGGER_PHOTO_ID_5214974997760061218" style="cursor: pointer; " /&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;span class="Apple-style-span" style=" ;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;A standard AA battery pack provides around 6800 mAh - 12,000 mAh of battery life.  &lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;span class="Apple-style-span" style=" ;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;img src="http://bp0.blogger.com/_fdkFAhcitHE/SF9QImLNnaI/AAAAAAAABBU/bRWvEExY0sE/s400/SN150962.jpg" border="0" alt="" id="BLOGGER_PHOTO_ID_5214975002135076258" style="cursor: pointer; " /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;Alternate view&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;img src="http://bp1.blogger.com/_fdkFAhcitHE/SF9ikfWXTgI/AAAAAAAABB8/9ss4qqj72Lw/s400/SN150975.jpg" border="0" alt="" id="BLOGGER_PHOTO_ID_5214995272548437506" style="cursor: pointer; " /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;A generic 3.7V, 0.2W solar panel, which gives you a laaaarge number of mAh.  &lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;Remember to set jumper JB1!&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;img src="http://bp2.blogger.com/_fdkFAhcitHE/SF9lbtCXwTI/AAAAAAAABCM/m-k6NrRkQX8/s400/SN150981.jpg" border="0" alt="" id="BLOGGER_PHOTO_ID_5214998420138737970" style="cursor: pointer; " /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;A &lt;span class="Apple-style-span" style="font-size: 16px; "&gt;&lt;a href="http://www.sparkfun.com/commerce/product_info.php?products_id=340"&gt;&lt;span class="Apple-style-span" style="font-size: 13px; "&gt;Sparkfun &lt;/span&gt;&lt;/a&gt;&lt;a href="http://www.sparkfun.com/commerce/product_info.php?products_id=340"&gt;&lt;span class="Apple-style-span" style="font-size: 13px; "&gt;2000mAh polymer lithium-ion battery pack&lt;/span&gt;&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;img src="http://bp3.blogger.com/_fdkFAhcitHE/SF9ikYvlY4I/AAAAAAAABCE/2dLNQtRHYc8/s400/SN150977.jpg" border="0" alt="" id="BLOGGER_PHOTO_ID_5214995270775169922" style="cursor: pointer; " /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;Cell-phone battery packs are great sources of power.  This is an&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;old Envoy 3.7V 900mAh Li-Ion cellphone battery pack I had lying around.  &lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;I use the &lt;/span&gt;&lt;a href="http://www.sparkfun.com/commerce/product_info.php?products_id=726"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;Sparkfun MAX1555-based charger&lt;/span&gt;&lt;/a&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt; to recharge the battery pack.  &lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;The usual warnings about Lithium-based rechargables apply!!!&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;span class="Apple-style-span"  style="font-size:13px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:13px;"&gt;&lt;span class="Apple-style-span"  style="color: rgb(51, 51, 51);  font-family:'Trebuchet MS';"&gt;&lt;p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Helvetica; color: rgb(51, 51, 51); "&gt;&lt;/p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7499663243631585857-5454247408705233151?l=bafoontecha.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://bafoontecha.blogspot.com/feeds/5454247408705233151/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7499663243631585857&amp;postID=5454247408705233151' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7499663243631585857/posts/default/5454247408705233151'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7499663243631585857/posts/default/5454247408705233151'/><link rel='alternate' type='text/html' href='http://bafoontecha.blogspot.com/2008/06/powering-your-technological-arts.html' title='Powering your Technological Arts NanoCore C32 Development board'/><author><name>peddamat</name><uri>http://www.blogger.com/profile/02029005111058333387</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://bp2.blogger.com/_fdkFAhcitHE/SF9QIkNLPhI/AAAAAAAABBc/jrXXq9UjkC8/s72-c/SN150963.jpg' height='72' width='72'/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7499663243631585857.post-4622942660120847568</id><published>2008-06-22T18:16:00.000-07:00</published><updated>2008-06-22T23:26:32.363-07:00</updated><title type='text'>DIY right-angle headers</title><content type='html'>&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;I often find the need to stick headers on my microcontroller projects, and I've come to prefer &lt;/span&gt;&lt;a href="http://www.sparkfun.com/commerce/product_info.php?products_id=553"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;right-angle headers&lt;/span&gt;&lt;/a&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;, as opposed to the traditional &lt;/span&gt;&lt;a href="http://www.sparkfun.com/commerce/product_info.php?products_id=116"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;straight header&lt;/span&gt;&lt;/a&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;, due to their unobtrusive, low-profile.  Since right-angle headers are usually in low-supply, here's a couple of ways to make or acquire them from parts you probably have lying around.  (The peripheral in the pictures is the &lt;a href="http://www.sparkfun.com/commerce/product_info.php?products_id=758"&gt;LIS3LV02DQ 3-axis accelerometer&lt;/a&gt;)&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;img src="http://bp2.blogger.com/_fdkFAhcitHE/SF81I4vOgQI/AAAAAAAAA_c/rds5tvcAPso/s400/SN150920.jpg" border="0" alt="" id="BLOGGER_PHOTO_ID_5214945320304017666" style="cursor: pointer; " /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;We start with two pieces of straight header&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;span class="Apple-style-span"  style="font-size:13px;"&gt;&lt;img src="http://bp0.blogger.com/_fdkFAhcitHE/SF82LI2nyEI/AAAAAAAABAM/aYoyKPP67n0/s400/SN150921.jpg" border="0" alt="" id="BLOGGER_PHOTO_ID_5214946458501367874" style="cursor: pointer; " /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;We want the result to look something like this&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;span class="Apple-style-span"  style="font-size:13px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;span class="Apple-style-span"  style="font-size:13px;"&gt;&lt;img src="http://bp3.blogger.com/_fdkFAhcitHE/SF81c4g3zEI/AAAAAAAAA_k/deAz5BcBhQU/s400/SN150922.jpg" border="0" alt="" id="BLOGGER_PHOTO_ID_5214945663841193026" style="cursor: pointer; " /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;span class="Apple-style-span"  style="font-size:13px;"&gt;Place the two straight headers at a right-angle, and tack solder each set of pins&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;span class="Apple-style-span"  style="font-size:13px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;span class="Apple-style-span"  style="font-size:13px;"&gt;&lt;img src="http://bp1.blogger.com/_fdkFAhcitHE/SF81c2VxDzI/AAAAAAAAA_s/6lirOWjAPtM/s400/SN150925.jpg" border="0" alt="" id="BLOGGER_PHOTO_ID_5214945663257743154" style="cursor: pointer; " /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;span class="Apple-style-span"  style="font-size:13px;"&gt;Now, slide off the connecting plastic from one side.  The pins may twist from side-to-side, don't worry.&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;span class="Apple-style-span"  style="font-size:13px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;span class="Apple-style-span"  style="font-size:13px;"&gt;&lt;img src="http://bp1.blogger.com/_fdkFAhcitHE/SF81c25R2gI/AAAAAAAAA_0/vmtYd-DtboM/s400/SN150927.jpg" border="0" alt="" id="BLOGGER_PHOTO_ID_5214945663406692866" style="cursor: pointer; " /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;span class="Apple-style-span"  style="font-size:13px;"&gt;The result should look something like this&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;span class="Apple-style-span"  style="font-size:13px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;span class="Apple-style-span"  style="font-size:13px;"&gt;&lt;img src="http://bp1.blogger.com/_fdkFAhcitHE/SF81dH5MZ2I/AAAAAAAAA_8/vXOEJgHIQxo/s400/SN150928.jpg" border="0" alt="" id="BLOGGER_PHOTO_ID_5214945667969738594" style="cursor: pointer; " /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;span class="Apple-style-span"  style="font-size:13px;"&gt;Complete soldering pins to PCB.  (I use a piece of scrap perf-board to make sure the pins point straight up)&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;span class="Apple-style-span"  style="font-size:13px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;span class="Apple-style-span"  style="font-size:13px;"&gt;&lt;img src="http://bp2.blogger.com/_fdkFAhcitHE/SF81dFm5yHI/AAAAAAAABAE/C7lTFagX8cA/s400/SN150930.jpg" border="0" alt="" id="BLOGGER_PHOTO_ID_5214945667356149874" style="cursor: pointer; " /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;span class="Apple-style-span"  style="font-size:13px;"&gt;The completed result.&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;span class="Apple-style-span"  style="font-size:13px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;span class="Apple-style-span"  style="font-size:13px;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;img src="http://bp2.blogger.com/_fdkFAhcitHE/SF83PYaIl-I/AAAAAAAABAU/6hyxE87mKHI/s400/SN150932.jpg" border="0" alt="" id="BLOGGER_PHOTO_ID_5214947630907955170" style="cursor: pointer; " /&gt;&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;Another angle.&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;span class="Apple-style-span"  style="font-size:large;"&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;Or...&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;span class="Apple-style-span"  style=" font-weight: bold;font-size:18px;"&gt;&lt;img src="http://bp2.blogger.com/_fdkFAhcitHE/SF8_sQ88KxI/AAAAAAAABAc/9RYhPWeVZT0/s400/SN150952.jpg" border="0" alt="" id="BLOGGER_PHOTO_ID_5214956923215686418" style="cursor: pointer; " /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;span class="Apple-style-span"  style="font-size:13px;"&gt;Salvage headers from an old sound-card (Thanks, &lt;a href="http://www.purdue.edu/surplus/"&gt;Purdue Surplus&lt;/a&gt;!)&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;span class="Apple-style-span"  style="font-size:13px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;span class="Apple-style-span"  style=" font-weight: bold;font-size:48px;"&gt;&lt;img src="http://bp2.blogger.com/_fdkFAhcitHE/SF8_sWcwy7I/AAAAAAAABAk/gkFfPKQeCjI/s400/SN150954.jpg" border="0" alt="" id="BLOGGER_PHOTO_ID_5214956924691336114" style="cursor: pointer; " /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;span class="Apple-style-span"  style=" ;font-size:13px;"&gt;Carefully, pull off the plastic connector&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;span class="Apple-style-span"  style="font-size:13px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;span class="Apple-style-span"  style=" font-weight: bold;font-size:48px;"&gt;&lt;img src="http://bp2.blogger.com/_fdkFAhcitHE/SF8_slULuCI/AAAAAAAABAs/fldCiMe--LY/s400/SN150955.jpg" border="0" alt="" id="BLOGGER_PHOTO_ID_5214956928681883682" style="cursor: pointer; " /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;span class="Apple-style-span"  style=" ;font-size:13px;"&gt;Apply a bit of flux to the pin pad&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;span class="Apple-style-span"  style="font-size:13px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;span class="Apple-style-span"  style=" font-weight: bold;font-size:48px;"&gt;&lt;img src="http://bp3.blogger.com/_fdkFAhcitHE/SF8_shBAboI/AAAAAAAABA0/ijPidg7KJKk/s400/SN150956.jpg" border="0" alt="" id="BLOGGER_PHOTO_ID_5214956927527710338" style="cursor: pointer; " /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;span class="Apple-style-span"  style="font-size:13px;"&gt;"Push" the pins through with a soldering iron&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;span class="Apple-style-span"  style="font-size:13px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;span class="Apple-style-span"  style=" font-weight: bold;font-size:48px;"&gt;&lt;img src="http://bp1.blogger.com/_fdkFAhcitHE/SF8_stSufwI/AAAAAAAABA8/-RMBNKENTYM/s400/SN150957.jpg" border="0" alt="" id="BLOGGER_PHOTO_ID_5214956930823257858" style="cursor: pointer; " /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;span class="Apple-style-span"  style="font-size:13px;"&gt;Flip the board over, and continue extracting the pins&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;span class="Apple-style-span"  style="font-size:13px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;span class="Apple-style-span"  style="font-size:13px;"&gt;&lt;img src="http://bp0.blogger.com/_fdkFAhcitHE/SF8_wRIm2uI/AAAAAAAABBE/VOFkJOos6LU/s400/SN150958.JPG" border="0" alt="" id="BLOGGER_PHOTO_ID_5214956991984098018" style="cursor: pointer; " /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;span class="Apple-style-span"  style="font-size:13px;"&gt;Go make something!&lt;/span&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7499663243631585857-4622942660120847568?l=bafoontecha.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://bafoontecha.blogspot.com/feeds/4622942660120847568/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7499663243631585857&amp;postID=4622942660120847568' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7499663243631585857/posts/default/4622942660120847568'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7499663243631585857/posts/default/4622942660120847568'/><link rel='alternate' type='text/html' href='http://bafoontecha.blogspot.com/2008/06/how-to-make-quick-right-angle-header.html' title='DIY right-angle headers'/><author><name>peddamat</name><uri>http://www.blogger.com/profile/02029005111058333387</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://bp2.blogger.com/_fdkFAhcitHE/SF81I4vOgQI/AAAAAAAAA_c/rds5tvcAPso/s72-c/SN150920.jpg' height='72' width='72'/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7499663243631585857.post-2644335154792104156</id><published>2008-06-14T02:17:00.000-07:00</published><updated>2008-06-23T00:06:17.530-07:00</updated><title type='text'>Microcontroller Development Under Mac OS X (Part 1)</title><content type='html'>&lt;div style="text-align: left;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;I intend for this to be a series of posts explaining how to get up and running developing for the Freescale HC(S)12, Atmel AVR, Microchip PIC, and ARM LPx platforms. These instructions have been tested on my laptop, which runs Mac OS X Leopard. However, there is nothing *explicitly* Mac-specific about what I'll be covering; most of this guide should apply to *NIX platforms, and possibly Windows, too.&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;Required Development Tools&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;- a compiler&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;- a linker/assembler&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;- a c library&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;- some way of getting your code on the uC&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;img src="http://bp3.blogger.com/_fdkFAhcitHE/SFoWtvsNjAI/AAAAAAAAA8c/vL1RoQbLWKQ/s320/SN150862.jpg" border="0" alt="" id="BLOGGER_PHOTO_ID_5213504493786598402" style="display: block; margin-top: 0px; margin-right: auto; margin-bottom: 10px; margin-left: auto; text-align: center; cursor: pointer; " /&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;ATEN International PL2303-based USB-to-Serial&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;Many modern microcontrollers support self-programming via a serial bootloader.  This feature makes updating firmware a breeze.  While you can find newer development kits with USB-to-TTL converters onboard, a few of the development kits that I'll be discussing use old-fashioned RS-232 serial ports.  My MacBook doesn't have a RS-232 serial port, so I use the generic PL2303-based USB-to-RS232 adaptor that you see above.  You can pick one up for about $20. &lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;&lt;span class="Apple-style-span"  style="font-size:large;"&gt;Freescale HC11/HC(S)12 Family&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;Compiler, Linker/Assembler, C Library&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;The good folks at the GNU Project provide a free compiler (&lt;a href="http://www.gnu-m68hc11.org/blog/"&gt;m68hc11/12&lt;/a&gt;) and a set of binary utilities (&lt;a href="http://sources.redhat.com/binutils/"&gt;Binutils&lt;/a&gt;). The C library (&lt;a href="http://sources.redhat.com/newlib/"&gt;Newlib&lt;/a&gt;) is generously distributed by the folks at R&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;ed Hat. While you can compile and install these tools by hand, I chose to use &lt;a href="http://www.finkproject.org/"&gt;Fink&lt;/a&gt;, which installs and manages the files automagically.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;At the time of writing a Leopard installer for Fink wasn't available, so I bootstrapped from source.  You can find directions for that &lt;a href="http://www.finkproject.org/download/srcdist.php"&gt;here&lt;/a&gt;.  (&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;After installing Fink, don't forget to append '/sw2/bin/init.sh' and '/sw2/bin' to $PATH in your ~/.bash_profile.&lt;/span&gt;)  My line looks like:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;blockquote style="text-align: center;"&gt;&lt;img src="http://bp2.blogger.com/_fdkFAhcitHE/SFpCSw6n59I/AAAAAAAAA9s/LP6i26DPCEA/s400/screen_bash.png" border="0" alt="" id="BLOGGER_PHOTO_ID_5213552408770635730" style="cursor: pointer; " /&gt;&lt;br /&gt;&lt;/blockquote&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;blockquote style="text-align: center;"&gt;export PATH=/usr/local/cuda/bin:$PATH:/opt/local/bin:/sw2/bin&lt;/blockquote&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;Open a new terminal window and type the following to install everything in one fell-swoop:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;blockquote style="text-align: center;"&gt;&lt;img src="http://bp3.blogger.com/_fdkFAhcitHE/SFpCTPrHfVI/AAAAAAAAA90/EphN7e8JiJ8/s400/screen_fink.png" border="0" alt="" id="BLOGGER_PHOTO_ID_5213552417027095890" style="cursor: pointer; " /&gt;&lt;br /&gt;&lt;/blockquote&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;blockquote style="text-align: center;"&gt;fink install m681x-binutils m681x-gcc m681x-newlib m681x-gdb&lt;/blockquote&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;After a few minutes, you'll have a full set of development tools installed and ready to go.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;If you uncomfortable using the GNU-as assembler, Eric Engler's as12 is a great alternative.  You can download the source code &lt;a href="http://www.ericengler.com/downloads/asxx-12e-linux.zip"&gt;here&lt;/a&gt;.  Compiling the code is as simple as typing 'make' in the unzipped directory.  Copy the binary files, as11 and as12, to a directory in your $PATH.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-size: large;"&gt;Getting code on your HC(S)12&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;Two of my development kits, the &lt;a href="http://www.freescale.com/webapp/sps/site/prod_summary.jsp?code=DEMO9S12NE64"&gt;Freescale DEMO9s12NE64&lt;/a&gt; and the &lt;a href="http://www.freescale.com/webapp/sps/site/prod_summary.jsp?code=M68DKIT912C32&amp;amp;nodeId=01098400786959705928692818701EE01F4"&gt;Technological Arts M68DKIT912C32&lt;/a&gt;, use the &lt;a href="http://www.freescale.com/files/microcontrollers/doc/app_note/AN2546.pdf"&gt;AN2546&lt;/a&gt; serial bootloader.  I found a few tools which support this protocol: &lt;a href="http://cml.mfk.net.pl/hcs12mem/"&gt;hcs12mem&lt;/a&gt;, &lt;a href="http://wiki.mdmsolutions.org/index.php/BinLoad"&gt;Binload&lt;/a&gt;.  I decided to use hcs12mem, mainly because the website for Binload was down when I tried to access it.  Since I couldn't find a binary package for hcs12mem, I decided to compile it from scratch.  You can grab it &lt;a href="http://cml.mfk.net.pl/hcs12mem/#download"&gt;here&lt;/a&gt; and do so yourself.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:x-small;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;blockquote&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;tar -xzvf hcs12mem-1.4.1.tar.gz&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;cd hcs12mem-1.4.1&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;./configure&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;make &amp;amp;&amp;amp; sudo make install&lt;/span&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:large;"&gt;Developing for the HC(S)12&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;The HC12 will always hold a special place in my heart; it was the first uC that I learned to program for back in &lt;a href="http://cobweb.ecn.purdue.edu/~dsml/ece362/"&gt;ECE362&lt;/a&gt; @ Purdue.  It has a great instruction set: understandable, powerful, and well-supported by Freescale.  Throughout the years, I've programmed for 3 HC(S)12 families: the C32, the NE64, and the DP256.  The corresponding development kits that I have for the three platforms are: &lt;a href="http://www.freescale.com/webapp/sps/site/prod_summary.jsp?code=M68DKIT912C32&amp;amp;nodeId=01098400786959705928692818701EE01F4"&gt;Technological Arts M68DKIT912C32,&lt;/a&gt;  &lt;a href="http://www.freescale.com/webapp/sps/site/prod_summary.jsp?code=DEMO9S12NE64"&gt;Freescale DEMO9S12NE64&lt;/a&gt;, and the &lt;a href="http://www.evbplus.com/minidragonplus2_hc12_68hc12_9s12_hcs12.html"&gt;Wytec Minidragon+&lt;/a&gt;.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;The development process is very similar across the three families;  there are occasionally differences in the pin/register names, memory layout, and supported subsystems.  Pin names are usually defined in a family-specific header file.  I've collected header files for each of the families and made them available below.  For the development tools we are using, the memory layout is defined in a file named '&lt;span class="Apple-style-span" style="font-style: italic;"&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;memory.x&lt;/span&gt;&lt;/span&gt;'.  Be sure to examine each of the memory.x files in the examples below.  You should also take a look at the '&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;&lt;span class="Apple-style-span" style="font-style: italic;"&gt;vectors.s&lt;/span&gt;&lt;/span&gt;' file.  This is where the interrupt vectors are defined.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;The examples below have accompanying Makefiles.  In addition to the standard 'make' target, there is a 'make load' target which attempts to burn the generated .s19 file to the development board using hcs12mem.  You will probably have to modify the serial port path in the Makefile to match your machine.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;img src="http://bp1.blogger.com/_fdkFAhcitHE/SFoS5JBlzyI/AAAAAAAAA78/ZbQs9YrVIb0/s320/SN150846.jpg" border="0" alt="" id="BLOGGER_PHOTO_ID_5213500291519205154" style="float: left; margin-top: 0px; margin-right: 10px; margin-bottom: 10px; margin-left: 0px; cursor: pointer; " /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;Technological Arts M68DKIT912C32&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;a href="http://web.ics.purdue.edu/~peddamat/blog/uC/helloworld-c32.zip"&gt;Basic Helloworld [8KB]&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;a href="http://web.ics.purdue.edu/~peddamat/blog/uC/helloworld-c32-periphs.zip"&gt;SCI/ATD/PWM/SPI Example [16KB]&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;a href="http://web.ics.purdue.edu/~peddamat/blog/uC/s12sermon-c32.s19"&gt;AN2546 C32 Bootloader [4.3KB]&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;a href="http://web.ics.purdue.edu/~peddamat/blog/uC/MC9S12C32%20-%20Brochure.pdf"&gt;MC9S12C32 Brochure [108KB]&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;a href="http://web.ics.purdue.edu/~peddamat/blog/uC/MC9S12C128V1%20-%20Reference%20Manual.pdf"&gt;MC9S12C Ref Manual [3.4MB]&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;a href="http://web.ics.purdue.edu/~peddamat/blog/uC/TechArts%20-%209S12C32%20Docking%20Module%20Manual.pdf"&gt;Tech Arts Manual [664KB]&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;Freescale DEMO9s12NE64&lt;/span&gt;&lt;/span&gt;&lt;img src="http://bp1.blogger.com/_fdkFAhcitHE/SFoT2HY9QCI/AAAAAAAAA8Q/LVUg32z1JXE/s320/SN150850.jpg" border="0" alt="" id="BLOGGER_PHOTO_ID_5213501339052359714" style="float: left; margin-top: 0px; margin-right: 10px; margin-bottom: 10px; margin-left: 0px; cursor: pointer; " /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style=" ;font-size:13px;"&gt;&lt;a href="http://web.ics.purdue.edu/~peddamat/blog/uC/uip-hcs12NE-bafoontecha.zip"&gt;uIP-based TCP/IP example [132 KB]&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;a href="http://web.ics.purdue.edu/~peddamat/blog/uC/MC9S12NE64%20-%20Brochure.pdf"&gt;MC9s12NE64 - Brochure [3.1MB]&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:13px;"&gt;&lt;a href="http://web.ics.purdue.edu/~peddamat/blog/uC/MC9S12NE64%20-%20Reference%20Manual.pdf"&gt;MC9S12NE64 - Reference Manual [3.0MB]&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;a href="http://web.ics.purdue.edu/~peddamat/blog/uC/DEMO9S12NE64%20-%20User%20Manual.pdf"&gt;DEMO9s12NE64 Ref Manual [332KB]&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;img src="http://bp3.blogger.com/_fdkFAhcitHE/SFoTil_l69I/AAAAAAAAA8I/7x2mEQ0t_0A/s320/SN150851.jpg" border="0" alt="" id="BLOGGER_PHOTO_ID_5213501003670088658" style="float: left; margin-top: 0px; margin-right: 10px; margin-bottom: 10px; margin-left: 0px; cursor: pointer; " /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;Wytec Minidragon+&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style=" ;font-size:13px;"&gt;&lt;a href="http://gcc-hcs12.com/downloads.php"&gt;Examples&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;a href="http://web.ics.purdue.edu/~peddamat/blog/uC/MC9s12DP256%20-%20Reference%20Manual.pdf"&gt;MC9s12DP256 - Reference Manual [2.1MB]&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;a href="http://web.ics.purdue.edu/~peddamat/blog/uC/D-Bug12%20-%20Reference%20Manual.pdf"&gt;D-Bug12 - Reference Manual [272KB]&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;a href="http://web.ics.purdue.edu/~peddamat/blog/uC/Minidragon%20-%20Getting%20Started.pdf"&gt;Minidragon+ Getting Started [108KB]&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div style="text-align: left;"&gt;&lt;span class="Apple-style-span"  style=" ;font-size:13px;"&gt;In my next post, I'll walk through the example code and give you a quick introduction to programming AVRs!  &lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;- Sumanth Peddamatham&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;span class="Apple-style-span"  style="font-size:large;"&gt;Additional Information&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;span class="posthidden" id="subtopic0001"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;How to Compile uip-NE64 Example&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:x-small;"&gt;Macintosh-5:uip-hcs12NE-bafoontecha me$ &lt;span class="Apple-style-span" style="font-weight: bold;"&gt;make&lt;/span&gt; &lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:x-small;"&gt;m6811-elf-gcc -m68hc12 -Os -fno-ident -fno-common -fomit-frame-pointer -mshort -fsigned-char -mauto-incdec -c ethernet.c&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:x-small;"&gt;m6811-elf-gcc -m68hc12 -Os -fno-ident -fno-common -fomit-frame-pointer -mshort -fsigned-char -mauto-incdec -c ethernet_stats.c&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:x-small;"&gt;m6811-elf-gcc -m68hc12 -Os -fno-ident -fno-common -fomit-frame-pointer -mshort -fsigned-char -mauto-incdec -c main.c&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:x-small;"&gt;m6811-elf-gcc -m68hc12 -Os -fno-ident -fno-common -fomit-frame-pointer -mshort -fsigned-char -mauto-incdec -c netlog.c&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:x-small;"&gt;m6811-elf-gcc -m68hc12 -Os -fno-ident -fno-common -fomit-frame-pointer -mshort -fsigned-char -mauto-incdec -c timer.c&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:x-small;"&gt;m6811-elf-gcc -m68hc12 -Os -fno-ident -fno-common -fomit-frame-pointer -mshort -fsigned-char -mauto-incdec -c uip.c&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:x-small;"&gt;m6811-elf-gcc -m68hc12 -Os -fno-ident -fno-common -fomit-frame-pointer -mshort -fsigned-char -mauto-incdec -c uip_arch.c&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:x-small;"&gt;m6811-elf-gcc -m68hc12 -Os -fno-ident -fno-common -fomit-frame-pointer -mshort -fsigned-char -mauto-incdec -c uip_arp.c&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:x-small;"&gt;m6811-elf-gcc -m68hc12 -Os -fno-ident -fno-common -fomit-frame-pointer -mshort -fsigned-char -mauto-incdec -c adc.c&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:x-small;"&gt;m6811-elf-gcc -m68hc12 -Os -fno-ident -fno-common -fomit-frame-pointer -mshort -fsigned-char -mauto-incdec -Wl,-u,-mm68hc12elfb -o uip-ne64.elf ethernet.o ethernet_stats.o main.o netlog.o timer.o uip.o uip_arch.o uip_arp.o adc.o mc9s12ne_vectors.s&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:x-small;"&gt;/sw2/bin/m6811-elf-ld:ldscripts/m68hc12elfb.x:127: warning: memory region page0 not declared&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:x-small;"&gt;m6811-elf-objcopy -O srec uip-ne64.elf uip-ne64.s19&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:x-small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;How to Load uip-NE64 Example&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:x-small;"&gt;Macintosh-5:uip-hcs12NE-bafoontecha me$ &lt;span class="Apple-style-span" style="font-weight: bold;"&gt;make load&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:x-small;"&gt;hcs12mem -i sm -p /dev/tty.PL2303-0000101D -t mc9s12ne64 -o 25MHz --flash-erase --flash-write uip-ne64.s19&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:x-small;"&gt;hcs12mem: Freescale S12 MCU memory loader V1.4.1 (C) 2005-2007 Michal Konieczny &lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:x-small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:x-small;"&gt;target info &lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:x-small;"&gt;target mcu family osc &lt;25.000000&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:x-small;"&gt;SM serial port baud rate &lt;115200&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:x-small;"&gt;SM target connected&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:x-small;"&gt;SM version &lt;2.01&gt; date &lt;2004-01-16&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:x-small;"&gt;S12 part id &lt;0x8201&gt; family memory &lt;64kb&gt; mask &lt;0.1&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:x-small;"&gt;S12 part security backdoor key &lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:x-small;"&gt;S12 register space &lt;1kb&gt; address range &lt;0x0000-0x03ff&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:x-small;"&gt;S12 RAM size &lt;8kb&gt; space &lt;8kb&gt; align address range &lt;0x2000-0x3fff&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:x-small;"&gt;S12 EEPROM not present&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:x-small;"&gt;S12 FLASH module state ROMHM &lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:x-small;"&gt;S12 FLASH size &lt;64kb&gt; space &lt;48kb&gt; off-chip/on-chip space &lt;876kb/128kb&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:x-small;"&gt;S12 FLASH protection all high area &lt;2kb&gt; low area &lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:x-small;"&gt;FLASH erase: wait ...&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:x-small;"&gt;FLASH erase: memory erased&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:x-small;"&gt;FLASH write: image file &lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:x-small;"&gt;FLASH write: image info entry &lt;0x4000&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:x-small;"&gt;FLASH write: address range &lt;0x4000-0x6297&gt; size &lt;0x2298&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:x-small;"&gt;FLASH write: address range &lt;0xff80-0xffff&gt; size &lt;0x0080&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:x-small;"&gt;FLASH write: image [##################################################]&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:x-small;"&gt;FLASH write: image size &lt;8984&gt; time &lt;1.03&gt; rate &lt;8722&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:x-small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;Connecting to DEMO9S12NE64 Development Board&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:x-small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:x-small;"&gt;Macintosh-5:uip-hcs12NE-bafoontecha me$ &lt;span class="Apple-style-span" style="font-weight: bold;"&gt;telnet 192.168.0.20&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:x-small;"&gt;Trying 192.168.0.20...&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:x-small;"&gt;Connected to 192.168.0.20.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:x-small;"&gt;Escape character is '^]'.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:x-small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:x-small;"&gt;-------------------------------&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:x-small;"&gt; Welcome to the DEMOS19NE64!   &lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:x-small;"&gt;-------------------------------&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:x-small;"&gt;Press &lt;/span&gt;&lt;space&gt;&lt;span class="Apple-style-span"  style="font-size:x-small;"&gt; bar to terminate.&lt;/span&gt;&lt;/space&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:x-small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:x-small;"&gt;ADC Port 0: 003D&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:x-small;"&gt;ADC Port 0: 0098&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:x-small;"&gt;ADC Port 0: 00BC&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:x-small;"&gt;ADC Port 0: 00E0&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:x-small;"&gt;ADC Port 0: 00E2&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:x-small;"&gt;ADC Port 0: 00FF&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:x-small;"&gt;ADC Port 0: 00FF&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:x-small;"&gt;ADC Port 0: 00FF&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:x-small;"&gt;ADC Port 0: 00F1&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:x-small;"&gt;ADC Port 0: 00A4&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:x-small;"&gt;ADC Port 0: 0080&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:x-small;"&gt;ADC Port 0: 006F&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:x-small;"&gt;ADC Port 0: 0056&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:x-small;"&gt;ADC Port 0: 003D&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:x-small;"&gt;ip: packet not for us.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:x-small;"&gt;ADC Port 0: 003D&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:x-small;"&gt;ip: packet not for us.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:x-small;"&gt;ADC Port 0: 003D&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:x-small;"&gt;ip: packet not for us.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:x-small;"&gt;ADC Port 0: 003D&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:x-small;"&gt;ip: packet not for us.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:x-small;"&gt;ADC Port 0: 003D&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:x-small;"&gt;ip: packet not for us.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:x-small;"&gt;ADC Port 0: 003D&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:x-small;"&gt;ip: packet not for us.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:x-small;"&gt;ADC Port 0: 003D&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:x-small;"&gt;ip: packet not for us.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:x-small;"&gt;ADC &lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:x-small;"&gt;ADC Port 0: 002C&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:x-small;"&gt;ADC Port 0: 0027&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:x-small;"&gt;ADC Port 0: 0015&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:x-small;"&gt;ADC Port 0: 0000&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:x-small;"&gt;ADC Port 0: 0000Connection closed by foreign host.&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style=" ;font-size:18px;"&gt;Links&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:18px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;a href="http://gcc-hcs12.com/"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;http://gcc-hcs12.com&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;a href="http://www.sics.se/~adam/uip/"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;http://www.sics.se/~adam/uip/&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;a href="http://cml.mfk.net.pl/hcs12mem/"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;http://cml.mfk.net.pl/hcs12mem/&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;a href="http://sourceforge.net/projects/freescaleotcp"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;http://sourceforge.net/projects/freescaleotcp&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;a href="http://www.ee.nmt.edu/~dbaird/gcc-hc1x.html"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;http://www.ee.nmt.edu/~dbaird/gcc-hc1x.html&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;a href="http://www.ericengler.com/EmbeddedGNU.aspx"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;http://www.ericengler.com/EmbeddedGNU.aspx&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;a href="http://users.ece.utexas.edu/~valvano/metrowerks/"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;http://users.ece.utexas.edu/~valvano/metrowerks/&lt;/span&gt;&lt;/a&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;a href="http://www.finkproject.org/doc/bundled/usage.php"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;http://www.finkproject.org/doc/bundled/usage.php&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;a href="http://www.ece.utep.edu/courses/web3376/Linux.html"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;http://www.ece.utep.edu/courses/web3376/Linux.html&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;a href="http://www.ericengler.com/downloads/asxx-12e-linux.zip"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;http://www.ericengler.com/downloads/asxx-12e-linux.zip&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;a href="http://www.ericengler.com/downloads/uIP-HCS12NE-release-1.0.zip"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;http://www.ericengler.com/downloads/uIP-HCS12NE-release-1.0.zip&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7499663243631585857-2644335154792104156?l=bafoontecha.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://bafoontecha.blogspot.com/feeds/2644335154792104156/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7499663243631585857&amp;postID=2644335154792104156' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7499663243631585857/posts/default/2644335154792104156'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7499663243631585857/posts/default/2644335154792104156'/><link rel='alternate' type='text/html' href='http://bafoontecha.blogspot.com/2008/06/microcontroller-development-under-mac.html' title='Microcontroller Development Under Mac OS X (Part 1)'/><author><name>peddamat</name><uri>http://www.blogger.com/profile/02029005111058333387</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://bp3.blogger.com/_fdkFAhcitHE/SFoWtvsNjAI/AAAAAAAAA8c/vL1RoQbLWKQ/s72-c/SN150862.jpg' height='72' width='72'/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7499663243631585857.post-7853376481414273028</id><published>2007-12-20T19:02:00.000-08:00</published><updated>2007-12-28T02:33:48.059-08:00</updated><title type='text'>Magnets, and the meaning of life.</title><content type='html'>Truth be told, I wanted my first blog entry to be about &lt;a href="http://en.wikipedia.org/wiki/Double-slit_experiment"&gt;Young's double-slit experiment&lt;/a&gt;;  or rather, my recreation of said experiment.  However, I found myself in a familiar loop, "oh, just a few more days until the laser arrives, you can hold off on the blog until then", "oh, I need a microscopy slide to etch the slits into, hold off a few more days until you find one", "oh, the light is not diffracting properly, hold off until you read more about optics", ad infinitum.  Despite all the 'oh'ing, there was a whole lot of nothing being done, a far worse crime than starting sentences with 'Truth be told".  So, I decided to begin with a something a bit different but equally mysterious and beautiful, &lt;i&gt;magnetism&lt;/i&gt;.&lt;div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Yesterday, my research group and I had the privilege of teaching the Happy Hollow Elementary Science Club about magnetism.  Well, not everything about magnetism, but a few fundamental principles: the non-linear relationship between magnetic field strength and distance, and the effect of increasing a system's magnetic moment.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;In English, the first part means that the force you feel from a magnet increases very quickly, actually, &lt;i&gt;stupendously&lt;/i&gt; quickly as you get closer to the magnet (and vice-versa).  In mathematics, this type of relationship has a name: &lt;b&gt;&lt;a href="http://en.wikipedia.org/wiki/Exponential_function"&gt;exponential&lt;/a&gt;&lt;/b&gt;.  The second part means that if you change the number of magnetic particles in a system, you affect the field strength of that system.  To stretch this paragraph out a bit longer: if you take a magnet and break it exactly into two, you will get two magnets with half the total field strength in each.&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;My role in the demonstration was to deliver the opening monologue, which I did, along with the following visual aide.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;center&gt;&lt;img src="http://bp1.blogger.com/_fdkFAhcitHE/R2s14ej3e1I/AAAAAAAAAZc/h-ixmCMvly8/s320/SN150114.jpg" border="0" alt="" id="BLOGGER_PHOTO_ID_5146266243593370450" style="cursor: pointer; " /&gt;&lt;/center&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Not to be confused with a &lt;a href="http://en.wikipedia.org/wiki/Torii"&gt;Torii&lt;/a&gt;, this simple device consisted of a pair of (in actuality, we had six)  &lt;a href="http://www.forcefieldmagnets.com/catalog/product_info.php?cPath=23_37&amp;amp;products_id=79"&gt;super-strong magnets&lt;/a&gt; taped to the center of a suspended, wooden dowel.  A pair of steel washers were attached to both the base of the contraption and a pair of plastic cups, which were suspended wirelessly (you get the idea) under the magnets.  &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;center&gt;&lt;img src="http://bp1.blogger.com/_fdkFAhcitHE/R2s14ej3e2I/AAAAAAAAAZk/9kw0tYRNRGA/s320/SN150123.jpg" border="0" alt="" id="BLOGGER_PHOTO_ID_5146266243593370466" style="cursor: pointer; " /&gt;&lt;/center&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;The only difference between the two washers was their respective distance from the magnets.  The jar on left of the first picture contains plastic beads, which were used as units of mass.  &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;center&gt;&lt;img src="http://bp2.blogger.com/_fdkFAhcitHE/R2s14uj3e3I/AAAAAAAAAZs/hngjc8pcQEY/s320/SN150125.jpg" border="0" alt="" id="BLOGGER_PHOTO_ID_5146266247888337778" style="cursor: pointer; " /&gt;&lt;/center&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;The demonstration was to show that even a teeny, tiny difference in distance (about 1 cm) affects the attractive force felt by the washer immensely; the closer washer being 'pulled' more strongly than the further away washer.  This discrepancy was made quite clear by the difference in the number of beads each washer/cup assembly was able to support.  The cup on the right fell after ~20 beads, but the cup on the left, a mere centimeter closer, was able to hold a cupful of beads and probably more!  I was able to milk the tension by taking bets at the beginning of each trial and counting slowly as I incremented the number of beads in each cup.  (My demonstration was followed by two hands-on activities, which let the kids explore the concepts more deeply.)&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;&lt;center&gt;&lt;object width="320" height="266" class="BLOG_video_class" id="BLOG_video-42c6a8702d2b555d" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"&gt;&lt;param name="movie" value="http://www.youtube.com/get_player"&gt;&lt;param name="bgcolor" value="#FFFFFF"&gt;&lt;param name="allowfullscreen" value="true"&gt;&lt;param name="flashvars" value="flvurl=http://v24.nonxt1.googlevideo.com/videoplayback?id%3D42c6a8702d2b555d%26itag%3D5%26app%3Dblogger%26ip%3D0.0.0.0%26ipbits%3D0%26expire%3D1331358782%26sparams%3Did,itag,ip,ipbits,expire%26signature%3DC00808BF5C905042A8C59B3E8A1F42FC72A7846.243F371B734233B2C8D8A3F25ED458FF0ACE7BE5%26key%3Dck1&amp;amp;iurl=http://video.google.com/ThumbnailServer2?app%3Dblogger%26contentid%3D42c6a8702d2b555d%26offsetms%3D5000%26itag%3Dw160%26sigh%3D3hl2oFLwQC_hX6pfdx6FYK7MR7A&amp;amp;autoplay=0&amp;amp;ps=blogger"&gt;&lt;embed src="http://www.youtube.com/get_player" type="application/x-shockwave-flash"width="320" height="266" bgcolor="#FFFFFF"flashvars="flvurl=http://v24.nonxt1.googlevideo.com/videoplayback?id%3D42c6a8702d2b555d%26itag%3D5%26app%3Dblogger%26ip%3D0.0.0.0%26ipbits%3D0%26expire%3D1331358782%26sparams%3Did,itag,ip,ipbits,expire%26signature%3DC00808BF5C905042A8C59B3E8A1F42FC72A7846.243F371B734233B2C8D8A3F25ED458FF0ACE7BE5%26key%3Dck1&amp;iurl=http://video.google.com/ThumbnailServer2?app%3Dblogger%26contentid%3D42c6a8702d2b555d%26offsetms%3D5000%26itag%3Dw160%26sigh%3D3hl2oFLwQC_hX6pfdx6FYK7MR7A&amp;autoplay=0&amp;ps=blogger"allowFullScreen="true" /&gt;&lt;/object&gt;&lt;/center&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;center&gt;&lt;object width="320" height="266" class="BLOG_video_class" id="BLOG_video-154c1a19fcf5b300" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"&gt;&lt;param name="movie" value="http://www.youtube.com/get_player"&gt;&lt;param name="bgcolor" value="#FFFFFF"&gt;&lt;param name="allowfullscreen" value="true"&gt;&lt;param name="flashvars" value="flvurl=http://v5.nonxt4.googlevideo.com/videoplayback?id%3D154c1a19fcf5b300%26itag%3D5%26app%3Dblogger%26ip%3D0.0.0.0%26ipbits%3D0%26expire%3D1331358782%26sparams%3Did,itag,ip,ipbits,expire%26signature%3D5D92091E0EE3FC1B1CB4DE691AE38CE4AD9B6D9.79A8B9909C8CA28E178E89C832F91C21302EC0%26key%3Dck1&amp;amp;iurl=http://video.google.com/ThumbnailServer2?app%3Dblogger%26contentid%3D154c1a19fcf5b300%26offsetms%3D5000%26itag%3Dw160%26sigh%3Dumca-066ZY7GzJKttP02eFJIKVw&amp;amp;autoplay=0&amp;amp;ps=blogger"&gt;&lt;embed src="http://www.youtube.com/get_player" type="application/x-shockwave-flash"width="320" height="266" bgcolor="#FFFFFF"flashvars="flvurl=http://v5.nonxt4.googlevideo.com/videoplayback?id%3D154c1a19fcf5b300%26itag%3D5%26app%3Dblogger%26ip%3D0.0.0.0%26ipbits%3D0%26expire%3D1331358782%26sparams%3Did,itag,ip,ipbits,expire%26signature%3D5D92091E0EE3FC1B1CB4DE691AE38CE4AD9B6D9.79A8B9909C8CA28E178E89C832F91C21302EC0%26key%3Dck1&amp;iurl=http://video.google.com/ThumbnailServer2?app%3Dblogger%26contentid%3D154c1a19fcf5b300%26offsetms%3D5000%26itag%3Dw160%26sigh%3Dumca-066ZY7GzJKttP02eFJIKVw&amp;autoplay=0&amp;ps=blogger"allowFullScreen="true" /&gt;&lt;/object&gt;&lt;/center&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;Overall, I was very impressed by the acuity of the kids.  In fact, quite a few of them were already familiar with the concept of magnetism and asked a number of questions which were fundamentally interesting: "Can you get a magnet with only one pole?", "What happens if you break a magnet into two?", "Is the magnetic field blocked by tape?", "Why are some materials magnetic and others not?"...  All valid, scientific questions; some yet to be answered!&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;For the lay person, I would highly recommend: &lt;a href="http://www.colorado.edu/physics/2000/index.pl?Type=TOC"&gt;Physics 2000&lt;/a&gt;, a wonderful presentation of physics concepts in the style of the Socratic Dialogue.  If you manage your way through all the applets there, I also recommend &lt;a href="http://phet.colorado.edu/new/index.php"&gt;PhET&lt;/a&gt; and &lt;a href="http://web.mit.edu/8.02t/www/802TEAL3D/"&gt;Physics 8.02 @ MIT&lt;/a&gt;.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;For the more advanced reader, I can't express what a revelation Prof. Lewin's online lecture videos were for me: &lt;a href="http://ocw.mit.edu/OcwWeb/Physics/8-02Electricity-and-MagnetismSpring2002/CourseHome/"&gt;8.02 Electricity and Magnetism&lt;/a&gt;.&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7499663243631585857-7853376481414273028?l=bafoontecha.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='enclosure' type='video/mp4' href='http://www.blogger.com/video-play.mp4?contentId=154c1a19fcf5b300&amp;type=video%2Fmp4' length='0'/><link rel='enclosure' type='video/mp4' href='http://www.blogger.com/video-play.mp4?contentId=42c6a8702d2b555d&amp;type=video%2Fmp4' length='0'/><link rel='replies' type='application/atom+xml' href='http://bafoontecha.blogspot.com/feeds/7853376481414273028/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7499663243631585857&amp;postID=7853376481414273028' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7499663243631585857/posts/default/7853376481414273028'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7499663243631585857/posts/default/7853376481414273028'/><link rel='alternate' type='text/html' href='http://bafoontecha.blogspot.com/2007/12/yes-grant-project.html' title='Magnets, and the meaning of life.'/><author><name>peddamat</name><uri>http://www.blogger.com/profile/02029005111058333387</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://bp1.blogger.com/_fdkFAhcitHE/R2s14ej3e1I/AAAAAAAAAZc/h-ixmCMvly8/s72-c/SN150114.jpg' height='72' width='72'/><thr:total>1</thr:total></entry></feed>
