My Project
Functions
mrfFracSynth.c File Reference

Support routines for the Micrel SY87739L Fractional-N Synthesizer. More...

#include <stdio.h>
#include <math.h>
#include <epicsTypes.h>
#include <iocsh.h>
#include <registryFunction.h>
#include <epicsExport.h>
#include <mrfFracSynth.h>
#include <mrfCommon.h>
#include <debugPrint.h>

Functions

epicsShareExtern epicsStatus mrfSetEventClockSpeed (epicsFloat64 InputClockSpeed, epicsUInt32 InputControlWord, epicsFloat64 ReferenceFreq, epicsFloat64 *OutputClockSpeed, epicsUInt32 *OutputControlWord, epicsInt32 PrintFlag)
 
epicsShareExtern epicsUInt32 FracSynthControlWord (epicsFloat64 DesiredFreq, epicsFloat64 ReferenceFreq, epicsInt32 debugFlag, epicsFloat64 *Error)
 
epicsShareExtern epicsFloat64 FracSynthAnalyze (epicsUInt32 ControlWord, epicsFloat64 ReferenceFreq, epicsInt32 PrintFlag)
 

Detailed Description

Support routines for the Micrel SY87739L Fractional-N Synthesizer.

This module contains routines to create and analyze the control word for the Micrel SY87739L Fractional-N synthesizer chip. This chip is used in the MRF Series-200 event receiver cards to synchronize with the expected event clock frequency. It is also in the event generator card where it can be used to generate the event clock in the absence of an RF source.

Three routines are provided in this module:

For convenience, this module also defines EPICS IOC Shell versions of the "FracSynth" routines. The IOC Shell versions only take the first argument. The reference frequency defaults to the MRF input reference frequency (24 MHz) and the debugFlag/PrintFlag are defaulted to produce the maximum amount of printed output.

Note
For the MRF Series-2xx cards, the input reference frequency is 24 Mhz.
To use the EPICS IOC shell definitions, the "Data Base Definition" (dbd) file should include the line:
"registrar(FracSynthRegistrar)"
These routines are not suitable for calling from the vxWorks shell as they require floating point input.