[time-nuts] PPS Divider (John Ackermann N8UR)

Tom Van Baak tvb at LeapSecond.com
Wed Apr 1 23:09:16 UTC 2009


Mitch,

Ah, I can see a new TADD idea: a multi-purpose 2x multiplier
or 2x divider, or 5x and 10x too.

In your case, though, perhaps you could add a single flip-flop
to a TADD-2 to get 5 MHz from 10 MHz, the old-fashioned way.

You can't divide by two on a PIC because the minimum loop
is a couple of instructions and each instruction takes 4 clock
cycles. For those of you who know PIC code, the upper limit
is the one mentioned by Bruce where pairs of instructions set
and clear an output pin and then the entire memory is those
pairs. The instruction counter quietly wraps around avoiding
the need for a branch instruction. The result is a divide by 8
counter (2 instructions times 4 clocks per instruction). Ulrich,
I assume the AVR is better in this respect (with a 1:1 clock vs.
cycle count?). Of course, if you add any programming at all
you can't use the wrapping-pair trick.

Anyway, that's why all the PIC dividers you see specialize in
lower frequencies, from very sub-Hz to Hz to maybe several
100 kHz.

/tvb

----- Original Message ----- 
From: "Bruce Griffiths" <bruce.griffiths at xtra.co.nz>
To: "Discussion of precise time and frequency measurement" <time-nuts at febo.com>
Sent: Wednesday, April 01, 2009 3:11 PM
Subject: Re: [time-nuts] PPS Divider (John Ackermann N8UR)


> John
> 
> Providing a 5MHz output will be difficult/impossible if the PIC is
> clocked at 10MHz as a pin will have to be toggled with every instruction.
> Surely this will leave no time for executing other instructions to
> produce other output frequencies?
> 
> It may be possible to do this using inline code with no conditional
> branches if and only if one can loop back to the start of the code
> without requiring an extra cycle.
> It would probably be easier to use a dedicated hardware divider
> (external flipflop or internal timer) to generate the 5MHz output.
> 
> Bruce
> 
> John Ackermann N8UR wrote:
>> You could probably get those output frequencies with a custom version of 
>> the PIC code.  There shouldn't be any hardware changes needed, though 
>> the circuit board layout wasn't optimized for high frequencies so no 
>> guarantee on 5 MHz.
>>
>> The PIC source code will be available, so anyone who wants to modify it 
>> for other outputs can have at it.
>>
>> John
>> ----
>>
>> Mitchell Janoff said the following on 04/01/2009 05:37 PM:
>>   
>>> In your post, you mentioned that the TADD-2, will have six low impedance
>>> outputs that can be individually jumpered to 1 PPS or 10 Hz through 10 kHz
>>> outputs. I was wondering if there was a way to provide outputs of 100k, 1MHz
>>> and 5MHz (assuming a 10MHz source). I am looking for a way to use a single
>>> source such as a z3801 as the standard for my various counters and clocks.
>>> There was also a post to build this using divide by 10,2 and 5 IC's. If
>>> someone is going to build this circuit can they provide the schematic? If
>>> there multiple people interested we can have a circuit board created for
>>> this project.
>>>
>>> Thanks,
>>>
>>> Mitch
>>> KC2MFB





More information about the time-nuts mailing list