Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 04:32 02 Dec 2026 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : MX170 running mmbasic 5.05.05, what is the maximum count frequency?

     Page 2 of 2    
Author Message
Volhout

Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 6325
Posted: 12:56pm 01 Dec 2026
Copy link to clipboard 
Print this post

Not sure if this is of any help to you.

Both programs are for PicoMite (2040)

RTC CAL is to compare 2 1Hz signals (one from RTC 1Hz clock, the other from GPS 1Hz output) and not the ppm difference. Compares frequencies at GP0 to GP1 frequencies by measuring period time. So it gets more inaccurate at higher frequencies.

FC2 is a frequency counter that is fairly high resolution. It is accurate to the Pico crystal, but you do not need that to be accurate, since you are comparing. Note the reading of your reference, and tune the other to the same number (only 1^7 multiple).
Uses GP0 as input. GP1 and GP2 are gate pulses for internal use. Counts to over 30MHz.

Both work on terminal (console) so no VGA/HDMI/whatever. sinple microcontroller work.
Both use PIO, both work best when CPUSPEED set to 252000 (integer divider -> less jitter).

RTC_GPS_CAL.zip

fc2_v05_rc8.zip

If you have questions, you know how to contact me...

Volhout
Edited 2026-12-01 22:58 by Volhout
PicomiteVGA PETSCII ROBOTS
 
robert.rozee
Guru

Joined: 31/12/2012
Location: New Zealand
Posts: 2575
Posted: 12:57pm 01 Dec 2026
Copy link to clipboard 
Print this post

  phil99 said  Your original idea may still be worth a try [...]

the problem is, one of my initial assumptions was false:

  robert.rozee said  [...] using the output of a flip-flop that is fed from the 1pps pin of a GPS module, this allows me to measure the counts that occur over a precise 1 second interval [...]

the cheap VK16E SIRF III GPS modules i have exhibit quite a bit of jitter in their 1pps output - the official number is 1us, with as high as 30us under poor signal conditions. so for any given 1s interval the measured count from the OCXO (nominally 10,000,000) could vary by up to +/-300. i've also read that the 1pps can vary cyclically over a 24-hour period, no doubt also affected by signal conditions.

this leads me to the conclusions that (1) only a very small amount of 'knowledge' can be extracted from a measurement taken over a short (1s) interval, and, (2) a great deal of work is required to isolate that 'knowledge' from background noise (jitter).

traditionally GPSDO's seem to get around this with complex ad-hoc 'tuning' of the PID parameters. there are a set of pdf texts on the whole GPSDO subject here:
https://www.eevblog.com/forum/projects/lars-diy-gpsdo-with-arduino-and-1ns-resolution-tic/
the author (sadly deceased) spent the better part of a decade working on his hardware design and software!


cheers,
rob   :-)
Edited 2026-12-01 23:01 by robert.rozee
 
     Page 2 of 2    
Print this page


To reply to this topic, you need to log in.

The Back Shed's forum code is written, and hosted, in Australia.
© JAQ Software 2026