26-Oct-2013
Most people get the original pP01 since it works perfectly with either native serial or serial/USB adapters.
If you are making your own PCB using a MAX232 (serial) or FTDI (USB) chip, consider pP02 instead.
If you are also interested in timing either the rising or the falling edge of a signal, consider pP05 instead.
; ---__--- ; 5V (Vdd) +++++|1 8|===== Ground (Vss) ; 10 MHz input ---->|2 pP 7|<- ; RS232 output <----|3 01 6|<- ; ->|4 5|<---- Event pulse input ; --------
One solution is putting a transistor or inverter IC between the picPET and the MAX232 or FTDI. That works, but a simpler solution is pP02, which allows you to select normal or inverted RS232 output polarity; and no external level-shifting hardware is required
The other change in pP02 is that weak pull-up are enabled on pins 7, 6, and 5.; ---__--- ; 5V (Vdd) +++++|1 8|===== Ground (Vss) ; 10 MHz input ---->|2 pP 7|<+--- ; RS232 output <----|3 02 6|<+--- ; RS232 invert o--->|4 5|<+--- Event pulse input ; --------
; ---__--- ; 5V (Vdd) +++++|1 8|===== Ground (Vss) ; 10 MHz input ---->|2 pP 7|<~--- Signal input ; RS232 output <----|3 03 6|<~--- Reference/ADC input ; RS232 invert o--->|4 5|----> Event output ; --------
; ---__--- ; 5V (Vdd) +++++|1 8|===== Ground (Vss) ; 10 MHz input ---->|2 pP 7|<+--- Bit0 input ; RS232 output <----|3 04 6|<+--- Bit1 input ; RS232 invert o--->|4 5|<+--- Event pulse input ; --------
By default (pin 4 high, pin 6 float high, pin 7 float high), it is pP01.
; ---__--- ; 5V (Vdd) +++++|1 8|===== Ground (Vss) ; 10 MHz input ---->|2 pP 7|<+--- Rise(1)/Fall(0) ; RS232 output <----|3 05 6|<+--- Sync(0) ; RS232 invert o--->|4 5|<+--- Event pulse input ; --------
; ---__--- ; 5V (Vdd) +++++|1 8|===== Ground (Vss) ; 10 MHz input ---->|2 pP 7|<~--- Analog sample ; RS232 output <----|3 06 6|<+--- Sync(0) ; RS232 invert o--->|4 5|<+--- Event pulse input ; --------
; ---__--- ; 5V (Vdd) +++++|1 8|===== Ground (Vss) ; 10 MHz input ---->|2 pP 7|<~--- Analog sample ; RS232 output <----|3 07 6|----> Ready output ; RS232 invert o--->|4 5|<+--- Event pulse input ; --------
A picPET normally takes a 10 MHz clock and generates timestamps with 100 ns LSDigit resolution and 400 ns granularity. The timestamps are output at 19200 baud using normal RS232 polarity and 5V TTL voltages. The maximum output rate is about 110 timestamps per second.
Since the PIC processor and picPET firmware is fully synchronous, some perfectly safe, predictable, and useful things happen if you exactly double or half the clock speed.
One trick is to drive the chip with a 20 MHz clock instead of 10 MHz. In this case the LSDigit resolution is 50 ns, the granularity is 200 ns, the baud rate is 38400, and the maximum output rate is about 225 timestamps per second.
Similarly one can use a 5 MHz clock -- the serial output is 9600 baud, and other parameters scale accordingly.
The PIC supports clocks rate from 0 (DC) to 20 MHz.
Normally the 10 MHz clock with which you drive a picPET is the reference frequency. This might even be 10 MHz from a super accurate GPSDO. The periodic events from some DUT (Device Under Test) are then measured against this reference. If the DUT is itself another oscillator you can divide it down to 100 Hz or 10 Hz or 1 Hz (1PPS) and feed it into the picPET event input. The result is a nice data stream showing gradual phase drift over time. From this one can calculate frequency offset, stability, and drift rate of the DUT. It is assumed the error is due to the DUT (event input) and not the REF (GPSDO 10 MHz clock input).
If you have a GPS 1PPS and if the DUT is 10 MHz, the other trick is to let the DUT drive the picPET clock and feed the super accurate GPS 1PPS into the picPET event input. The will also provide a nice data stream showing gradual phase drift over time. From this one can calculate frequency offset, stability, and drift rate of the DUT. It is assumed the error is due to the DUT (clock input) and not the REF (GPS 1PPS event input).
Both cases are equivalent. A picPET, like any other phase comparator or frequency counter, is inherently just a ratio device. One can never measure absolute frequency: instead you simply measure DUT frequency relative to the REF frequency. So it doesn't matter if the reference is the slow-frequency (event) being timed or if the reference is the high-frequency (clock) used for timing.
Given the above one can imagine measuring a dozen 10 MHz XO or OCXO at the same time. Each oscillator drives its own picPET and all picPET's share a common GPS 1PPS event input. The individual RS232 data streams are collected and the long-term performance of each oscillator is thus simultaneously and independently measured. Only a GPS 1PPS time reference is required (not a GPSDO frequency reference).