Thursday, December 24, 2015

Bus Pirate v3 Direct IO Pins

My wife got me a Bus Pirate (among other things) for Christmas/Saturnalia/Yule/Whatever.  For the unfamiliar, a Bus Pirate is a small USB device used to communicate with various chips over standard buses such as I2C and SPI.  It also has some other neat features like pulse with modulation and frequency measurement, and can even be pressed into service as a JTAG programmer and (very low speed) logic analyzer and oscilloscope.  Essentially, it is the Swiss Army Knife of electronic tools.

I don't have any I2C or SPI stuff laying around to mess with right now, but I am planning to start working on something in the near future that will require me to bit bang a very simple protocol.  Because of this, I'm messing with writing data from the pirate in direct i/o (DIO) mode.

When writing data in DIO mode, you simply give the pirate an 8 bit value and it sets the pins appropriately.  You only have five pins (CS, MISO, CLK, MOSI, and AUX) to twiddle your bits with.  These are represented by the five least significant bits. The table below represents the bits


If you want to turn more pins on, simply do a bitwise OR of the values you wish to change. For example, entering a 5 would turn on CLK and CS. (0b100 ^ 0b001 = 0b101 = 5). More to come later.

Monday, December 21, 2015


I've been developing an interest in bushcraft lately.    While on a recent excursion the members of a group I was with I became interested in a lightweight chopping tool.  Some internetting lead to reading about tomahawks.  The Cold Steel Trail Hawk seems to be pretty popular.  I ordered mine from that online retail giant that everyone loves to hate.

As you can see, it doesn't look like much from the factory.  With that said, I am happy that it fits in my Goruck.

The first thing that I did was take it apart, sand the polyurethane off the handle, and coat the head in paint stripper.  After that, the Elder Sign was added to the handle for protection from the Great Old Ones. 

After the paint was removed, I soaked the head in vinegar for two days to put a patina on the metal.  I did the same with my Mora Compantion.

After a light coat of stain and some tung oil on the handle, she's looking great.

On the air

I got my ham license about two years ago, but never really did much with it despite intending to do otherwise.  I managed to finally reach a turning point regarding that when I picked up a gently used Kenwood TM261A (and a power supply) from a local Craigslist seller.

As a budget-minded individual, I decided to try constructing my own antenna before buying one.  The basic ground plane antenna described in the ARRL Operator's Manual seemed like a pretty easy place to start, so I went with that.  My build consists of three pieces of brazing wire connected to a SO-239 connector.

First I went about making loops so that the ground plane wires could be connected to the SO-239.  I bent small L shapes with a bench vise, then squished them into something I could connect with a screw.

I then soldered a third section of wire to the part of the SO-239 that connects to the core of the coax using a propane torch.  I neglected to take a picture, but I doubt the complexity of the operation will astound you.

After running some 50 ohm coax up to the attic, I secured my new antenna in place with zip ties.

I am now able to hit a repeater about 15 miles away and am getting reports of good audio.  As time (or money) allows, I'll probably either build or buy a J-Pole.  Regardless of this, I'm happy for the time being.