Heello Forum
The (32768Hz) crystal is connected to a µC (16F1508):
The firmware generates a 64Hz square wave (prescaled from the 32768Hz) on a DO pin of the µC which is probed by the Analog Discovery.
(You can't probe a crystal directly without affecting it's frequency.)
The idea is to precisly measure the frequency and adjust the trimmer cap until it's 64.00000....Hz.
To do this you would run a frequency counter for some minutes and then divide the elapsed time through the #of pulses to get a very precise average.
The only thing I have is the Analog Discovery. Suprisingly, I could not find a frequency counter function yet.
(It should be easy for the devs to implement one.)
It comes with an frequency average tool in the scope section, but you can only use it for relatively small time spans and not in a minute range.
So it is not precise enough.
The record feature of the scope section would be helpful, but you can't trigger data entries with the signal edges. (Recording only with fixed sampling rates. => not helpful)
I can get good results with averaging just some ms with the scope feature but I need a little more precision. (see screencap)
Does anyone have an idea how to do this with the Analog Discovery? I'm sure there is a way...
Thank you!
(Background: binary clock project)
(NOTE: Of course it makes no sense to calibrate the circuit on a breadboard This is just for testing purposes, the circuit will be calibrated on the final pcb.)