etherkit / Si5351Arduino

Library for the Si5351 clock generator IC in the Arduino environment
GNU General Public License v3.0
233 stars 95 forks source link

Frequency cal enchancement #43

Open la3pna opened 7 years ago

la3pna commented 7 years ago

Seems like there is a small difference in calfactor when calibrating at LF compared to both 10MHz and 200MHz. As far as I can tell, this difference must be due to somthing in the Si chip, its not visible when probing the oscillator. Its also present when using the C version with external reference. All instruments used were locked to cecium, so there should be no frequency variation over such small timescale.

Proposing to change to a more advanced method of calibration, where the cal frequency can be spesified as parameters for a 3. order polynoma. The proposed cal value would then be applied for each frequency step by calculating: cal = AF^2+BF+C.

Also, it would be nice if the library in the next version isn't locked to using 25 or 27MHz oscillators. The math should work with close to any input frequency for the Si5351A series.