The code is at

https://github.com/nsayer/GPS-disciplined-OXCO/blob/master/tiny_divider.c

It’s a first cut. The code at the moment will just divide the input clock by 10 
million, so you get a 1 PPS 50% duty square wave out. It should run on any 
ATTinyx5 model - it certainly will fit on at ATTiny25 if you wish.

I’ve not exhaustively tested it yet. I need to feed it into my TIA to make sure 
it’s exactly 1 Hz - it’s conceivable I’ve committed a fencepost error that 
would make it off enough that my scope can’t tell (my TIA is busy at the 
moment).

I believe the code won’t do the math properly below 10 MHz. You’d need to 
select the next lower prescale setting and change a couple of the formulae, but 
I don’t foresee an issue with doing so.

I’ll come back with an exhaustive test report (and any bug fixes) when I get my 
TIA back from GPSDO ADEV duty. :)

> On Jan 13, 2016, at 12:12 PM, Nick Sayer <nsa...@kfu.com> wrote:
> 
> Just shy of a half dozen folks have asked, so I'll post here as soon as I 
> finish cleaning it up. I'll put it on Github when it's ready. I just need a 
> day or two. 
> 
> Sent from my iPhone
> 
>> On Jan 13, 2016, at 6:43 AM, Nick Sayer via time-nuts <time-nuts@febo.com> 
>> wrote:
>> 
>> If anyone is interested in the equivalent functionality using an ATTiny25 
>> (for instance, if you’re already heavily invested in AVR instead of PIC, 
>> like I am), ping me. I’ve privately written code to solve almost the same 
>> problem and it could easily be adapted into doing the same job.
>> 
>>> On Jan 13, 2016, at 5:23 AM, Edesio Costa e Silva <time-n...@tardis.net.br> 
>>> wrote:
>>> 
>>> Hi!
>>> 
>>> Try TVB's picDiv at http://www.leapsecond.com/pic/picdiv.htm
>>> 
>>> Edésio
>>> 
>>>> On Wed, Jan 13, 2016 at 09:22:09AM +0000, Jerome Blaha wrote:
>>>> Hey Guys,
>>>> 
>>>> Is there an easy circuit to build that can consistently deliver a 1 PPS 
>>>> from a 10MHz source with excellent resolution and repeatability?  My first 
>>>> application is to test different 10MHz oscillators without a TIC always 
>>>> attached and then compare the PPS output change over time against a master 
>>>> GPSDO PPS with an HP53132A.
>>>> 
>>>> The circuit used for PPS generation would have to deliver consistent PPS 
>>>> output with preferably not more than 100ps noise or jitter, assuming a 
>>>> perfect source.  I'm totally guessing that for this resolution, the PPS 
>>>> would have to be generated and accurate to within 0.001Hz every second.  
>>>> If this is too difficult, maybe the integration time can be increased to 
>>>> generate one pulse every 10second or every 100,000,000.00 cycles?
>>>> 
>>>> Finally, is a square 10Mhz reference any better in this case than a 
>>>> sinusoidal input for generating the PPS?
>>>> 
>>>> Thanks,
>>>> Jerome
>>>> 
>>>> _______________________________________________
>>>> time-nuts mailing list -- time-nuts@febo.com
>>>> To unsubscribe, go to 
>>>> https://www.febo.com/cgi-bin/mailman/listinfo/time-nuts
>>>> and follow the instructions there.
>>> _______________________________________________
>>> time-nuts mailing list -- time-nuts@febo.com
>>> To unsubscribe, go to 
>>> https://www.febo.com/cgi-bin/mailman/listinfo/time-nuts
>>> and follow the instructions there.
>> 
>> _______________________________________________
>> time-nuts mailing list -- time-nuts@febo.com
>> To unsubscribe, go to https://www.febo.com/cgi-bin/mailman/listinfo/time-nuts
>> and follow the instructions there.

_______________________________________________
time-nuts mailing list -- time-nuts@febo.com
To unsubscribe, go to https://www.febo.com/cgi-bin/mailman/listinfo/time-nuts
and follow the instructions there.

Reply via email to