Container class which holds the appropriate configuration parameters for a Cypress 22150 PLL.
More...
|
| okCPLL22150 () |
| Default constructor.
|
|
double | GetCrystalLoad () const |
| Get the crystal load capacitance.
|
|
int | GetDiv1Divider () const |
| Get the divider value for divider #1.
|
|
int | GetDiv2Divider () const |
| Get the divider value for divider #2.
|
|
DividerSource | GetDiv1Source () const |
| Get the source for divider #1.
|
|
DividerSource | GetDiv2Source () const |
| Get the source for divider #2.
|
|
double | GetOutputFrequency (int output) const |
| Gets the current output frequency for a particular output.
|
|
ClockSource | GetOutputSource (int output) const |
| Gets the current output clock source for a particular output.
|
|
void | GetProgrammingInfo (okTPLL22150ProgramInfo buf) const |
| Loads 'buf' with alternating address/data for programming the PLL.
|
|
double | GetReference () const |
| Get the current reference crystal frequency.
|
|
double | GetVCOFrequency () const |
| Get the VCO output frequency.
|
|
int | GetVCOP () const |
| Get the VCO P(total) value.
|
|
int | GetVCOQ () const |
| Get the VCO Q(total) value.
|
|
void | InitFromProgrammingInfo (const okTPLL22150ProgramInfo buf) |
| Generates the PLL data from I2C programming data.
|
|
bool | IsExternalOscillatorEnabled () const |
| Returns true if external oscillator is enabled.
|
|
bool | IsOutputEnabled (int output) const |
| Returns true is the specified output is enabled.
|
|
void | SetCrystalLoad (double capload) |
| Set the crystal load capacitance.
|
|
void | SetReference (double freq, bool extosc) |
| Sets the reference crystal frequency for output frequency computations.
|
|
void | SetDiv1 (DividerSource divsrc, int n) |
| Set the values for divider #1.
|
|
void | SetDiv2 (DividerSource divsrc, int n) |
| Set the values for divider #2.
|
|
void | SetOutputSource (int output, ClockSource clksrc) |
| Set the source for a particular output.
|
|
void | SetOutputEnable (int output, bool enable) |
| Set the output enable for a particular output.
|
|
bool | SetVCOParameters (int p, int q) |
| Set the VCO P(total) and Q(total) values.
|
|
This is a container class which holds the appropriate configuration parameters for a Cypress 22150 PLL. The PLL has a single VCO but mutliple outputs with frequencies derived from dividers and switching blocks.
Python Note: Under Python, this class is simply called PLL22150. Therefore, if you import the ok library, you would refer to this class as ok.PLL22150.
Note that this object does not communicate with the XEM. That is, it does not reflect the state of the actual PLL. It is simply a container class used to configure and query the on-board PLL.
Typically, PLL settings will be set with the FrontPanel application and stored in EEPROM. In some cases, however, you may want your code to configure the PLL. Refer to the Cypress documentation to see how the various settings affect the output. The following example configures the VCO to operate at 400 MHz and sets up two outputs at 100 MHz and 50 MHz.
pll->
SetDiv1(okCPLL22150::DivSrc_VCO, 4);
pll->
SetDiv2(okCPLL22150::DivSrc_VCO, 8);
Container class which holds the appropriate configuration parameters for a Cypress 22150 PLL.
Definition okCPLL22150.h:59
void SetOutputSource(int output, ClockSource clksrc)
Set the source for a particular output.
void SetReference(double freq, bool extosc)
Sets the reference crystal frequency for output frequency computations.
void SetDiv2(DividerSource divsrc, int n)
Set the values for divider #2.
void SetDiv1(DividerSource divsrc, int n)
Set the values for divider #1.
bool SetVCOParameters(int p, int q)
Set the VCO P(total) and Q(total) values.
void SetOutputEnable(int output, bool enable)
Set the output enable for a particular output.
At this point, the pll instance may be passed to okCUsbFrontPanel::SetPLLConfiguration to configure the on-board PLL. You can also use okCPLL22150::GetOutputConfiguration to verify that the output frequency is set properly.