I have posted the source code to my web site. You can download the full source archive, here:
http://www.helitronix.com\gpi\gpi_source_v1.2.zip This version of the archive implements the GPI with all the features I've already listed, but does not include the modifications to turn it into a speedometer. I will post that separately.
There are 6 source files in the archive:
GPI_FULL-1.2.spin - The main program that I wrote that implements the gear position indicator
Float32.spin - A library routine that implements floating point math utility functions
Simple_Serial.spin - A library routine that implements serial port functionality. This is helpful for seeing the output on your laptop while debugging. Debug messages are still enabled in the source code.
Synth.spin - A library routine that implements the frequency synthesizer that is used to output VSS and IPG signals to another GPI when the clutch is pulled in.
Timing.spin - A library routine that implements some delay functions.
xTach.spin - A library routine that reads the VSS and IPG input signals and measures their frequency in Hz.
To build the software, you need to download and install the Propeller Development Environment for Windows (or download the Mac version as desired). Download the development environment here:
https://www.parallax.com/downloads/propeller-tool-software-windows Follow the instructions given to install the environment.
Once you have the environment installed, you can copy the source files in my ZIP archive to a working directory of your choice. From within the Propeller Development Environment, choose "File->Open" and select "GPI_FULL-1.2.spin". After it loads, you press the function key "F8" to build the software. Provided you have installed the software successfully, the build will be successful. If no error is displayed, you'll see a dialog with two buttons "Close" and "Show Hex". You can press "Close".
Once you have your Propeller Quick Start Board, you plug that into your computer using a standard USB cable. The USB cable provides power. It will be recognized by the Propeller tool once you plug it in. To program the software onto the Propeller Quick Start board, press the function key "F11". It will take a few seconds. If it fails, the tool will describe the error. Once it programs, you can unplug the Quick Start Board from your computer and connect it to the other components of the GPI. You can actually build the whole GPI and program it at the end. The device may be programmed and reprogrammed at any time, even when it is connected to your motorcycle. In fact, in order to see the debug output from a running system, you would need to have your laptop connected to the GPI device over USB while your ST is running. It's not necessary to do this if you don't want to see the debugging information.
Joel