[time-nuts] Testing frequency using NTP

Lux, James P james.p.lux at jpl.nasa.gov
Thu Oct 2 09:39:49 EDT 2008




On 10/1/08 10:18 PM, "Steve Rooke" <sar10538 at gmail.com> wrote:

> 2008/10/2 Bruce Griffiths <bruce.griffiths at xtra.co.nz>:
>
>> Save yourself a counter and just divide the frequency down to about 1Hz
>> and time stamp the 1Hz transitions with the Linux box.
>> As long as you know the division factor its easy enough to calculate the
>> frequency.
>
> I'd planned on a simple interface to the PC via using the parallel,
> suitably strapped, as a basic output port. Now, I could use it as an
> input but I'd probably have to poll the port which would be somewhat
> inefficient but an option I guess. Think I could just record the
> staring time of the sampling and then the ending time plus the number
> of cycles.

If you're hacking some ASM code... Hook the input to one of the printer port
lines that can generate and IRQ. Make your ISR just latch a counter and
return.  Then, your non-real time program just has to periodically read the
counter and write it to a file.




More information about the time-nuts mailing list