Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Si5351 frequency generator set_correction

Status
Not open for further replies.

dr pepper

Well-Known Member
Most Helpful Member
I'm using a adafruit Si5351 module as a bench generator, with the arduino lib from etherkit https://github.com/etherkit/Si5351Arduino.
I want to sync the module to Gps, I have done this successfully using the module as it came, using the set_correction function, it works and I get good accuracy short term, but I want better.
So I removed the onboard xtal and connected an external 25 Mc ocxo to the xtal in as per the datasheet.
It works I can set the o/p freq, and its fairly accurate.
But it wont sync, the error value remains constant, set_correction is unable to correct it.
I couldnt find in the datasheet or the lib how the correction is done, I'm now thinking its done by switching the load capacitance to the xtal osc, hence an external osc isnt affected. Anyone know?
Looks like I might have to do some serious code alteration and add a correction value to the req freq, instead of using set_correction.
 
So I removed the onboard xtal and connected an external 25 Mc ocxo to the xtal in as per the datasheet.
It works I can set the o/p freq, and its fairly accurate.
I think you can not set (change) the frequency with and external OCXO.
 
Well if setting the correction factor changes the osc freq yes that makes sense.
Only I'm having a hard time finding out what the correction function does exactly.
There doesnt appear to be anything in the datasheet for the chip (5351a) that says you can tune the osc, so I'm wondering if the correction is done in software within the lib.
The more I look at it the more I think it is a software correction function, and it has a range, if your osc is a mile out it doesnt bother to try and correct it.
 
I think I sussed it.
The calibration code was looking for a value within a range, but it was a long datatype and the value was much lower than a long can handle, so I bodged it and made it 10x.
It now works and is slowly syncing to Gps.
Maybe not so much of a bodge.

Edit: Found the reason why my system didnt work, my ocxo is made from an old crystal oven and a smd crystal osc, its a trashy 200ppm osc module, the xtal on the adafruit board is actually quite good, 30ppm accuracy and 30 ppm stability, so my setup is way less accurate than the original, so I spose the people writing the lib were not expecting that, hopefully once done though it will be very stable but not necessarily an accurate 25Mc frequency, which is all it needs to be.
 
Last edited:
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top