In the world of precise timing, instruments that measure frequency, or period, or time interval are common tools. Some of these instruments also count pulses, measure pulse widths, determine duty cycle, or compare phase over time. It turns out that simple microcontrollers can perform some of these tasks. Let's explore this.
To this day I continue to use $1 8-bit Microchip PIC microcontrollers for low-jitter, precise time/frequency projects. See picDIV for a series of digital frequency dividers. See picPET for a series of precise timestamping counters with 400 ns resolution. More info at the main PIC timing page.
In spite of their convenience and low cost these 8-pin PIC 12F675 chips are somewhat limited. For example, although the picPET makes a nice timestamping, or period, or frequency counter, it is awkward to pair two of them for start/stop time interval measurement. Also, scaling to 4 or 10 of them to make simultaneous measurements of multiple clocks is even more tedious.
I wanted a MCU with absolute deterministic timing, higher resolution, faster data rates, and more input channels. When the Propeller chip appeared in 2006, I knew it was worth implementing my PET project (Precision Event Timer). Yes the Propeller is 10× more expensive than a PIC, but compared to my PIC-based picPET, the Propeller-based ProPET has 32× better resolution, 6× more channels, and 6× faster data rate. You could argue it's a thousand times better at only ten times the cost.
Parallax, Inc. designed the Propeller after the success of their PIC- and SX-based Basic Stamp. Having been a fan of Parallax since it began in the early 1990's I wanted the Basic Stamp and Propeller to succeed. Unfortunately for them, the Arduino concept was born and took over the hobbyist world. If that wasn't enough, ARM is now killing PIC and AVR, maybe even x86. Then another bomb; Linux exploded into the embedded world. As a result the Basic Stamp is a relic these days and the Propeller remains an obscure processor that never really caught on. The embedded world moves fast. Now it's moving to ARM-based processors and embracing platforms like Teensy, Beaglebone Black, ESP32, Raspberry Pi, to name a few.
When it debuted 15 years ago, and compared with a 12F-series PIC, I found the Propeller attractive because it has 32 I/O pins, an 8-core architecture, an internal 16× PLL, 100 MHz top speed, zero interrupt latency (because it cleverly and boldly, does not have interrupts), and a single shared coherent 32-bit cycle counter. It thus lends itself to all manner of precise timing applications.
Still, in 2020, I would probably label Propeller as NRND (Not Recommended for New Designs). The Propeller and its ecosystem is a weird outlier. If like me you already know Parallax and its products well, then use the chip for timing. But if not, there are so many other learning curves that are more productive, such as the list of processors and platforms listed above, or even FPGA.
Either way, the purpose of this page is to hand you a ready-to-use solution. No programming required. No learning curve. No Propeller rabbit hole. No debugging. What follows is a series of time/frequency projects, based on the Parallax Propeller chip, that just work.
The following shows the input side. The start input (chA, green wire) goes to pin P0. The stop input (chB, red wire) goes to pin P1. Note the chip uses 3.3 V signal levels so add whatever circuitry you need to handle 50R termination, AC/DC coupling, amplification, attenuation, etc. For most of my work recently the signals are already fast risetime 3.3 V CMOS so P0 and P1 can be used without any additional passive or active components.
The following image shows the output side. Pin P14 is the serial output (115,200 baud). This is 3.3 V inverted RS232, which typically goes to a serial/USB adapter. In this case the FTDI-Friend from Adafruit is used. As a side-effect it provides +5 VDC from the USB port, which allows the Propeller to be port powered. There are jumpers on the back: make sure Vcc is 5 V and Vio is 3.3 V. Here we see ground, 5V power, and serial transmit (Propeller-out to PC-in).
The Propeller Mini development board has two onboard LDO regulators so that it can be powered by Vin (7-12 V), or 5 V, or 3.3 V. This photo shows a summary of the minimum connections required. power, ground, 2 inputs, 1 output. It's that simple:
#: ProTIC-1, 80 MHz, 115200 baud, ver 24, 2-chan TIC, A->B 0.0061743250 0.0061449750 0.0061890625 0.0061750125 0.0061745625 0.0061742875 0.0061734625 0.0061886250Within a few seconds of power-up a comment line is output. After that there is one line for every pair of chA (start) and chB (stop) pulses. Units are seconds. The LSDigit is 100 ps. Note the last two digits are always 00 25 50 or 75 because the resolution of the counter is 12.5 ns. Thus there is no roundoff error.
If you don't want to mess with a Windows PC, the Parallax IDE, a USB PropPlug, and all the other details of Propeller programming then contact me and I can send you a pre-programmed, works out-of-the-box ProTIC-1 at cost.
The SPIN and PASM (the native Parallax Propeller languages) source code will be posted at some point too.
Even professional TIC's, like 53131A/53132A, create trouble when readings get near a phase wrap. This is commonly seen when working with 1PPS or DMTD measurements. As the stop channel drifts too close to the next start channel the counter misses a start pulse while it is still busy processing the current measurement. This is called "dead time".
The ProTIC avoids this because internally it is actually a dual channel timestamping counter. Pulses from both channels are captured independently and asynchronously. What is reported as a time interval is just the delta of two time stamps. Thus no chA pulses are missed, no chB pulses are missed, and each matched pair of chA (start) and chB (stop) pulses create a measurement. True zero (chA coincident with chB) measurements are possible and no false negative measurements occur either.
details coming soon
details coming soon
more to follow
details coming soon
details coming soon
details coming soon
details coming soon