<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Doodads and Whatnot &#187; Electronics</title>
	<atom:link href="http://hazy.stupor.org/blog/archives/category/electronics/feed" rel="self" type="application/rss+xml" />
	<link>http://hazy.stupor.org/blog</link>
	<description></description>
	<lastBuildDate>Sun, 27 Jun 2010 09:15:20 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Ruby serialport gem.</title>
		<link>http://hazy.stupor.org/blog/archives/35</link>
		<comments>http://hazy.stupor.org/blog/archives/35#comments</comments>
		<pubDate>Mon, 01 Sep 2008 01:10:18 +0000</pubDate>
		<dc:creator>toholio</dc:creator>
				<category><![CDATA[Electronics]]></category>
		<category><![CDATA[Nerdy]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[gem]]></category>
		<category><![CDATA[io]]></category>
		<category><![CDATA[ruby-serialport]]></category>
		<category><![CDATA[rubygem]]></category>
		<category><![CDATA[serialport]]></category>

		<guid isPermaLink="false">http://hazy.stupor.org/blog/?p=35</guid>
		<description><![CDATA[Ruby-serialport doesn&#8217;t play well with RubyGems. Trying to require 'serialport' when using RubyGems results in: NameError: (eval):1:in `private_class_method': undefined method `create' for class `Class' from (eval):1 from (eval):1 from /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require' from (irb):2 The quick fix to get around this is by doing: Kernel::require 'serialport' It would be nicer if we could avoid the conflict [...]]]></description>
			<content:encoded><![CDATA[<p>Ruby-serialport doesn&#8217;t play well with RubyGems. Trying to <tt>require 'serialport'</tt> when using RubyGems results in:</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">NameError: (eval):1:in `private_class_method': undefined method `create' for class `Class'
        from (eval):1
        from (eval):1
        from /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require'
        from (irb):2</pre></div></div>

<p>The quick fix to get around this is by doing:</p>

<div class="wp_syntax"><div class="code"><pre class="ruby" style="font-family:monospace;"><span style="color:#CC00FF; font-weight:bold;">Kernel</span>::<span style="color:#CC0066; font-weight:bold;">require</span> <span style="color:#996600;">'serialport'</span></pre></div></div>

<p>It would be nicer if we could avoid the conflict with RubyGems. It would be even nicer if the serialport library was itself packaged as a gem. Turns out this <a href="http://github.com/aaronp/ruby-serialport/">has been done by aaronp</a> but it doesn&#8217;t take advantage of GitHub&#8217;s automatic gem builder and doesn&#8217;t build correctly using GCC.</p>
<p><a href="http://github.com/toholio/ruby-serialport/">I&#8217;ve cloned and tidied the git repository</a>. This gem version should build the needed native extension and work on both POSIX compatible and Windows operating systems.</p>
<h3>Installing the serialport gem</h3>
<p>If you haven&#8217;t configured GitHub as a gem source yet you will need to run the following command:</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">gem sources -a http://gems.github.com</pre></div></div>

<p>Then, you can install the gem as normal:</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">sudo gem install toholio-serialport</pre></div></div>

<p>Unlike the official ruby-serialport extension, this gem works with RubyGems (duh!). When you want to use it you should only need to do the following:</p>

<div class="wp_syntax"><div class="code"><pre class="ruby" style="font-family:monospace;"><span style="color:#CC0066; font-weight:bold;">require</span> <span style="color:#996600;">'rubygems'</span>
<span style="color:#CC0066; font-weight:bold;">require</span> <span style="color:#996600;">'serialport'</span></pre></div></div>

<p>On a side note: git and GitHub rock. Forking, contributing to and merging projects <i>should</i> be this simple.</p>
]]></content:encoded>
			<wfw:commentRss>http://hazy.stupor.org/blog/archives/35/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Ruby on Nickel-Silver Rails</title>
		<link>http://hazy.stupor.org/blog/archives/29</link>
		<comments>http://hazy.stupor.org/blog/archives/29#comments</comments>
		<pubDate>Wed, 19 Mar 2008 10:15:32 +0000</pubDate>
		<dc:creator>toholio</dc:creator>
				<category><![CDATA[Electronics]]></category>
		<category><![CDATA[Nerdy]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[gserver]]></category>
		<category><![CDATA[loconet]]></category>
		<category><![CDATA[models]]></category>
		<category><![CDATA[nicklesilver]]></category>
		<category><![CDATA[server]]></category>
		<category><![CDATA[trains]]></category>

		<guid isPermaLink="false">http://hazy.stupor.org/blog/archives/29</guid>
		<description><![CDATA[It&#8217;s been hot here in Melbourne so rather than actually leaving the house to do anything I&#8217;ve been sitting in front of a fan mucking about with my computer. Yesterday afternoon I created a Ruby implementation of a LocoNetOverTCP server. I&#8217;ve decided to call it Nickel-Silver because that&#8217;s the common name of the alloy most [...]]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s been hot here in Melbourne so rather than actually leaving the house to do anything I&#8217;ve been sitting in front of a fan mucking about with my computer. Yesterday afternoon I created a Ruby implementation of a <a href="http://loconetovertcp.sourceforge.net/Protocol/LoconetOverTcp.html">LocoNetOverTCP</a> server. I&#8217;ve decided to call it Nickel-Silver because that&#8217;s the common name of the alloy most model railroad track is made of and some trifling project has already used the name &#8220;Ruby on Rails&#8221;. Here&#8217;s a quick list of Nickel-Silver&#8217;s features:</p>
<ul>
<li>Implements all of LocoNetOverTCP protocol version 1</li>
<li>Multithreaded (inherits from GServer)</li>
<li>Easily extendable interface for LocoNet hardware devices</li>
<li>Only about 100 lines of code (according to <tt>egrep -c -v "^[ ]*$|^[ ]*#"</tt>)</li>
<li>Base implementation uses only the standard library</li>
<li>Included &#8220;driver&#8221; for the LocoBuffer-USB hardware uses a single extra package, <a href="http://rubyforge.org/projects/ruby-serialport/">ruby-serialport</a></li>
<li>It&#8217;s written in Ruby</li>
</ul>
<h3>Hardware setup</h3>
<p>Currently the only &#8220;driver&#8221; provided connects to a LocoNet network via a <a href="http://www.rr-cirkits.com/locobuffer-usb/LB-usb-flyer.pdf">LocoBuffer-USB</a>. So a complete hardware setup looks something like the following diagram.</p>
<p><center><a href='http://hazy.stupor.org/blog/wp-content/uploads/2008/03/nickelsilver-wiring-diagram.png' title='Electrical setup for LocoNetOverTCP server'><img src='http://hazy.stupor.org/blog/wp-content/uploads/2008/03/nickelsilver-wiring-diagram.png' alt='Electrical setup for LocoNetOverTCP server' /></a></center></p>
<p>LocoNetOverTCP clients connect to the server running on the computer which acts as a proxy to the LocoNet. This removes the need for each computer to have its own LocoNet hardware interface. It also removes the need for the clients to be physically located near layout.</p>
<h3>Server setup</h3>
<p>Assuming we&#8217;re going to use the included LocoBuffer-USB &#8220;driver&#8221; we need to do the following to start a server.</p>
<ol>
<li>Install ruby-serialport if you haven&#8217;t already.</li>
<li>Install the nickel-silver-server gem</li>
<li>Open a new ruby script in your favourite editor or start IRB.</li>
<li>Determine the serial port your LocoBuffer-USB is connected to.</li>
<li>Create an instance of the LocoBufferUSB &#8220;driver&#8221; class.</li>
<li>Create an instance of the server with the &#8220;driver&#8221; as a parameter.</li>
<li>Run the script</li>
</ol>
<p>To install the server&#8217;s gem open a terminal and run:</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">gem install nickel-silver-server</pre></div></div>

<p>That should get everything that&#8217;s required with the exception of ruby-serialport which you must install manually.</p>
<p>My LocoBuffer-USB is connected to my computer via the virtual serial port <tt>/dev/cu.usbserial-FTQ1P4JC</tt> so a complete script for my server would look like the following.</p>

<div class="wp_syntax"><div class="code"><pre class="ruby" style="font-family:monospace;"><span style="color:#008000; font-style:italic;">#!/usr/bin/ruby</span>
&nbsp;
<span style="color:#CC0066; font-weight:bold;">require</span> <span style="color:#996600;">'rubygems'</span>
<span style="color:#CC0066; font-weight:bold;">require</span> <span style="color:#996600;">'nickel-silver-server'</span>
&nbsp;
<span style="color:#008000; font-style:italic;"># connect to a LocoBufferUSB on the virtual serial port /dev/cu.usbserial-FTQ1P4JC'</span>
interface = <span style="color:#6666ff; font-weight:bold;">NickelSilver::Server::Interface::LocoBufferUSB</span>.<span style="color:#9900CC;">new</span><span style="color:#006600; font-weight:bold;">&#40;</span> <span style="color:#996600;">'/dev/cu.usbserial-FTQ1P4JC'</span> <span style="color:#006600; font-weight:bold;">&#41;</span>
&nbsp;
<span style="color:#008000; font-style:italic;"># create a server using the default port (i.e. 5626, 'loco' spelt on a phone keypad)</span>
<span style="color:#008000; font-style:italic;"># using our freshly connected LocoBuffer-USB</span>
server = <span style="color:#6666ff; font-weight:bold;">NickelSilver::Server::LocoNetServer</span>.<span style="color:#9900CC;">new</span><span style="color:#006600; font-weight:bold;">&#40;</span> interface <span style="color:#006600; font-weight:bold;">&#41;</span>
&nbsp;
<span style="color:#008000; font-style:italic;"># start the server</span>
server.<span style="color:#9900CC;">start</span>
&nbsp;
<span style="color:#008000; font-style:italic;"># wait for the server to stop before exiting</span>
server.<span style="color:#9900CC;">join</span></pre></div></div>

<h3>Documentation</h3>
<p>Currently this post is the only documentation not contained within the gem. You can view the gem&#8217;s rdoc documentation at <a href="http://nickel-silver.rubyforge.org/nickel-silver-server/rdoc/">http://nickel-silver.rubyforge.org/nickel-silver-server/rdoc/</a></p>
<h3>Sending trains down the track</h3>
<p>Until boredom strikes again there isn&#8217;t a Ruby throttle program that can interface with Nickel-Silver. Instead we can use the excellent Java program <a href="http://jmri.sourceforge.net/">JMRI</a> to talk to our trains.</p>
<p>JMRI already knows about LocoNetOverTCP servers right out of the box. Starting JMRI and looking at the preferences we can wrangle things to look like the following.<br />
<center><a href='http://hazy.stupor.org/blog/wp-content/uploads/2008/03/nickelsilver-jmri-prefs.png' title='JMRI connecting to Nickel Silver'><img src='http://hazy.stupor.org/blog/wp-content/uploads/2008/03/nickelsilver-jmri-prefs.png' alt='JMRI connecting to Nickel Silver' /></a></center></p>
<p>Now we&#8217;re ready to go. Selecting <tt>Tools > Throttles > New Throttle</tt> gives us a throttle window where we can enter a locomotive address and make it move.</p>
<h3>Implementing a new &#8220;driver&#8221;</h3>
<p>The only LocoNet computer interface I have access to is a LocoBuffer-USB. I&#8217;d highly recommend one to anyone who is interested but acknowledge that there are many people with other hardware.</p>
<p>As long as you can send and receive LocoNet packets via your hardware in Ruby (or in any language that may be used for Ruby extensions) you can write a &#8220;driver&#8221;.</p>
<p>The only things a &#8220;driver&#8221; needs to be able to do are:</p>
<ul>
<li>Store incoming packets as FixNums representing bytes in a buffer array</li>
<li>Send outgoing bytes (represented as FixNums in a buffer array) to LocoNet</li>
<li>Use a Mutex to lock access to the buffers when in use (remember Nickel-Silver is multithreaded)</li>
<li>Provide a method that causes your interface to start collecting packets</li>
</ul>
<p>The interface is simple. Only the following public methods are needed:</p>
<ul>
<li>Accessors for <tt>input_buffer</tt>, <tt>output_buffer</tt> and <tt>io_mutex</tt></li>
<li><tt>run()</tt> which starts buffering</li>
</ul>
<p>How you do this is up to you but you can take a look at <tt>LocoBufferUSB.rb</tt> to get an idea of how it might be done. A stub driver might look like the following&#8230;</p>

<div class="wp_syntax"><div class="code"><pre class="ruby" style="font-family:monospace;"><span style="color:#9966CC; font-weight:bold;">class</span> SomeLocoNetInterface
  attr_accessor <span style="color:#ff3333; font-weight:bold;">:input_buffer</span>, <span style="color:#ff3333; font-weight:bold;">:output_buffer</span>, <span style="color:#ff3333; font-weight:bold;">:io_mutex</span>
&nbsp;
  <span style="color:#9966CC; font-weight:bold;">def</span> initialize
    <span style="color:#008000; font-style:italic;"># these may be modified at any time by the server</span>
    <span style="color:#0066ff; font-weight:bold;">@input_buffer</span> = <span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#006600; font-weight:bold;">&#93;</span>
    <span style="color:#0066ff; font-weight:bold;">@output_buffer</span> = <span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#006600; font-weight:bold;">&#93;</span>
&nbsp;
    <span style="color:#008000; font-style:italic;"># only make changes when locked using @io_mutex</span>
    <span style="color:#0066ff; font-weight:bold;">@io_mutex</span> = <span style="color:#CC00FF; font-weight:bold;">Mutex</span>.<span style="color:#9900CC;">new</span>
  <span style="color:#9966CC; font-weight:bold;">end</span>
&nbsp;
  <span style="color:#9966CC; font-weight:bold;">def</span> run
    <span style="color:#CC0066; font-weight:bold;">loop</span> <span style="color:#9966CC; font-weight:bold;">do</span>
      <span style="color:#008000; font-style:italic;"># get incoming bytes</span>
      <span style="color:#9966CC; font-weight:bold;">if</span> byte_waiting?
        <span style="color:#0066ff; font-weight:bold;">@io_mutex</span>.<span style="color:#9900CC;">synchronize</span> <span style="color:#9966CC; font-weight:bold;">do</span>
          <span style="color:#008000; font-style:italic;"># byte getting code here</span>
          <span style="color:#0066ff; font-weight:bold;">@input_buffer</span> <span style="color:#006600; font-weight:bold;">&lt;&lt;</span> get_byte
        <span style="color:#9966CC; font-weight:bold;">end</span>
      <span style="color:#9966CC; font-weight:bold;">end</span>
&nbsp;
      <span style="color:#008000; font-style:italic;"># send outgoing bytes</span>
      <span style="color:#9966CC; font-weight:bold;">until</span> <span style="color:#0066ff; font-weight:bold;">@output_buffer</span>.<span style="color:#9900CC;">empty</span>? <span style="color:#9966CC; font-weight:bold;">do</span>
        <span style="color:#0066ff; font-weight:bold;">@io_mutex</span>.<span style="color:#9900CC;">synchronize</span> <span style="color:#9966CC; font-weight:bold;">do</span>
          <span style="color:#008000; font-style:italic;"># send a byte</span>
          send_byte<span style="color:#006600; font-weight:bold;">&#40;</span> <span style="color:#0066ff; font-weight:bold;">@output_buffer</span>.<span style="color:#9900CC;">shift</span> <span style="color:#006600; font-weight:bold;">&#41;</span>
        <span style="color:#9966CC; font-weight:bold;">end</span>
      <span style="color:#9966CC; font-weight:bold;">end</span>
    <span style="color:#9966CC; font-weight:bold;">end</span>
  <span style="color:#9966CC; font-weight:bold;">end</span>
&nbsp;
<span style="color:#9966CC; font-weight:bold;">end</span></pre></div></div>

<p>Remember that either buffer may be empty or already containing data and that you <em>must</em> lock the mutex for the minimum amount of time possible.</p>
<h3>Isn&#8217;t there already a LocoNetOverTCP server project?</h3>
<p>Yes there is! It&#8217;s called <a href="http://loconetovertcp.sourceforge.net/Server/index.html">LbServer</a> and is hosted over at <a href="http://sourceforge.net/projects/loconetovertcp">SourceForge</a>.</p>
<p>If you&#8217;re looking for a mature LocoNetOverTCP server that&#8217;s probably the place you should start. Unlike my implementation there are more people than just me using it and they probably have more bugs fixed than I&#8217;m likely to notice any time soon.</p>
]]></content:encoded>
			<wfw:commentRss>http://hazy.stupor.org/blog/archives/29/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MacOS X PIC toolbox</title>
		<link>http://hazy.stupor.org/blog/archives/22</link>
		<comments>http://hazy.stupor.org/blog/archives/22#comments</comments>
		<pubDate>Wed, 13 Sep 2006 15:23:35 +0000</pubDate>
		<dc:creator>toholio</dc:creator>
				<category><![CDATA[Electronics]]></category>
		<category><![CDATA[Nerdy]]></category>

		<guid isPermaLink="false">http://hazy.stupor.org/blog/archives/22</guid>
		<description><![CDATA[I recently needed to install all the PIC programming tools I use on several Macs. Since people often ask for help installing these kinds of things I&#8217;ve decided to put together an installer package containg all the tools I use for the majority of my PIC&#8217;n needs. Hopefully someone else will find it useful. The [...]]]></description>
			<content:encoded><![CDATA[<p>I recently needed to install all the PIC programming tools I use on several Macs. Since people often ask for help installing these kinds of things I&#8217;ve decided to put together an installer package containg all the tools I use for the majority of my PIC&#8217;n needs. Hopefully someone else will find it useful.</p>
<p>The installer contains universal binaries for:
<ul>
<li><a href="http://home.pacbell.net/theposts/picmicro/">Jeff Post&#8217;s PK2</a> v2.01 &#8211; for operating the PICkit2 programmer hardware</li>
<li><a href="http://gputils.sourceforge.net/">GPUTILS</a> v0.13.4 &#8211; assembler, linker, etc</li>
<li><a href="http://sdcc.sourceforge.net/">sdcc</a> v2.6.0 &#8211; C compiler</li>
</ul>
<p>I have only tested the installer and resulting binaries on Macs running 10.4.7 (x86 and PPC) so if you try it under a different version of OS X, <a href="mailto:tjrichard@optusnet.com.au">please let me know how it works</a>.</p>
<p>The following installer contains all three packages (you can choose which ones to install).<br />
<center><a href="http://hazy.stupor.org/vault/PIC/PIC%20toolbox.zip"><img id="image23" src="http://hazy.stupor.org/blog/wp-content/uploads/2006/09/Metapackage.png" alt="Metapackage icon." /><br />PIC toolbox (8.1MB)</a></center></p>
<p><b>IMPORTANT:</b>The installer wont reconfigure your PATH, MANPATH or SDCC_HOME environment variables automatically. The things to add are:</p>
<ul>
<li><tt>/usr/local/bin</tt> to <tt>PATH</tt></li>
<li><tt>/usr/local/man</tt> to <tt>MANPATH</tt></li>
<li><tt>SDCC_HOME=/usr/local</tt></li>
</ul>
<p>For most people these can be configured by opening a terminal and running the following commands:</p>
<pre>
echo 'export PATH=/usr/local/bin:$PATH' >> ~/.bash_profile
echo 'export MANPATH=/usr/local/man:$MANPATH' >> ~/.bash_profile
echo 'export SDCC_HOME=/usr/local' >> ~/.bash_profile
</pre>
]]></content:encoded>
			<wfw:commentRss>http://hazy.stupor.org/blog/archives/22/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>PIC micro-controller programming on MacOS X.</title>
		<link>http://hazy.stupor.org/blog/archives/16</link>
		<comments>http://hazy.stupor.org/blog/archives/16#comments</comments>
		<pubDate>Tue, 04 Jul 2006 23:43:34 +0000</pubDate>
		<dc:creator>toholio</dc:creator>
				<category><![CDATA[Electronics]]></category>
		<category><![CDATA[Nerdy]]></category>

		<guid isPermaLink="false">http://hazy.stupor.org/blog/archives/16</guid>
		<description><![CDATA[For a long time I&#8217;ve been frustrated by the lack of tools for programming micro-controllers (PICs specifically) using MacOS X. Most bit banging serial programmers wont work with a USB-to-Serial adapter, though I&#8217;m told some commercial ones do. There are some USB programmers available but until recently I wasn&#8217;t able to find one that was [...]]]></description>
			<content:encoded><![CDATA[<p>For a long time I&#8217;ve been frustrated by the lack of tools for programming micro-controllers (PICs specifically) using MacOS X. Most bit banging serial programmers wont work with a USB-to-Serial adapter, though I&#8217;m told some commercial ones do. There are some USB programmers available but until recently I wasn&#8217;t able to find one that was compatible with the <a href="http://ww1.microchip.com/downloads/en/DeviceDoc/30487b.pdf">16F88 (PDF, datasheet)</a> and had MacOS drivers available.</p>
<h3>Enter the PICkit 2</h3>
<p>After finally getting tired of SSHing into a Linux box in another room every-time I wanted to write to a PIC I started looking for a USB based programmer with support for the 16F88. I was pleasantly surprised to see that the firmware for Microchip&#8217;s <a href="http://microchip.com/PICkit2">PICkit2</a> had been updated to work with the 16F88 (as of version 1.20). The PICkit is a nicely made unit (about 10cm x 4cm x 1cm) that can be bought, with a low pin count demo board included, <a href="http://www.microchipdirect.com/">directly from Microchip</a> for under AU$100.<br />
<center><br />
<img id="image17" src="http://hazy.stupor.org/blog/wp-content/uploads/2006/07/pickit.jpg" alt="PICkit 2" /><br />
</center><br />
This still left me with the problem of Mac drivers but it didn&#8217;t take long to find Jeff Post&#8217;s <a href="http://home.pacbell.net/theposts/picmicro/">PK2</a>, an open source program for working with the PICkit2.</p>
<h3>Using PK2 with MacOS X</h3>
<p>Version 2.00 of PK2 works well well with MacOS. Older versions may work too but I haven&#8217;t done much testing with them. The program is easy to build and there is a native HID report which means that there is no need for MacOS users to muck about with libusb. Very nice indeed. When building make sure you use the osxhid Makefile target (unless you really want to use libusb). Once built and installed PK2 can be used to update the programmer&#8217;s firmware. Everything should be good to go and the programmer should be able to see the PIC it is connected to like so:</p>
<pre>
tobie@Tea-Chest ~ $ pk2 -device

PK2 version 2.00 - 2006/07/02
 pk2 -device
Communication established. PICkit2 firmware version is 1.21.0

Device ID 0x0760
PIC16F88 Rev 5 found
  Family:         Midrange
  Program size:   0x1000 (4096) words, width 0x3fff
  Eeprom size:    0x100 (256) bytes
  ID location:    0x0
  ID size:        0x4 (4) bytes
  Device ID       0x0760
  Write burst     4
  Program command O
  Program mode    n
  Program timing  n
  Data timing     d
  Erase mode      0
  CP mask         0x0834
  Bandgap mask    0x0000 0x0000
  Config mask     0x3fff 0x0003
  Save osccal     0
  Save bandgap    0
  Command table   63 00 02 03 04 05 06 08 18 17 1f 1f ff ff ff ff
</pre>
<h3>Handy resources</h3>
<p>The PICkit 2 comes with a CD-ROM which contains lots of examples and code for the supplied PIC16F690 including several lessons which should help someone not familiar with PIC programming to get a good grasp on the basics. For other PICs there are many forums and mailing lists on the internet including <a href="http://forum.microchip.com/tt.aspx?forumid=-2">Microchip&#8217;s own</a>. A quick Google search should point you in the right direction.</p>
<p>For updates and discussion of PK2 there is the <a href="http://groups.google.com/group/pickit-devel">pickit-devel Google group</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://hazy.stupor.org/blog/archives/16/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

<!-- Dynamic Page Served (once) in 0.340 seconds -->
