OK, now that we can see signals (see my last thread) we have discovered that my LabVIEW code is not changing the clocks like it should.
I have built an interface in LabVIEW that is very similar to the FrontPanel design that is used to control the PLL and here are the steps that I take to set the clocks. (sorry about the length, but it is complete )
*Construct - to get a handle to the PLL
Set Ref Freq
*void okPLL22393_SetReference(unsigned long Handle, double Freq) - sending the handle and 48 for the freq - returns nothing
Set PLL0
*unsigned long okPLL22393_SetPLLParameters(unsigned long Handle, unsigned short int n, unsigned short int P, unsigned short int Q, unsigned short int Enable); - sending the handle, 0 for PLL0, P = 100, Q = 80 and Enable = 1 - return is 1
*unsigned long okPLL22393_GetReference(unsigned long Handle) - send the handle - returns 60
Set PLL1
*unsigned long okPLL22393_SetPLLParameters(unsigned long Handle, unsigned short int n, unsigned short int P, unsigned short int Q, unsigned short int Enable); - sending the handle, 0 for PLL0, P = 126, Q = 54 and Enable = 1 - return is 1
*unsigned long okPLL22393_GetReference(unsigned long Handle) - send the handle - returns 112
Set PLL2
*unsigned long okPLL22393_SetPLLParameters(unsigned long Handle, unsigned short int n, unsigned short int P, unsigned short int Q, unsigned short int Enable); - sending the handle, 0 for PLL0, P = 128, Q = 78 and Enable = 1 - return is 1
*unsigned long okPLL22393_GetReference(unsigned long Handle) - send the handle - returns 78.7692
Set up output A
*unsigned long okPLL22393_SetOutputSource(unsigned long Handle, unsigned short int n, unsigned short int Source); - send handle, n = 0 for CLKA, Source = 2 for PLL0-0 - Return is 52252344
*unsigned long okPLL22393_SetOutputDivider(unsigned long Handle,
unsigned short int n, unsigned short int Div); - send handle, n = 0 for CLKA, Div = 2 - return is 1
*void okPLL22393_SetOutputEnable(unsigned long Handle, unsigned short int n, unsigned short int Enable); - send handle, n = 0 for CLKA, Enable =1
*unsigned long okPLL22393_GetOutputFrequency(unsigned long Handle,
unsigned short int n); - send handle, n = 0 for CLKA - Return is 30
Setup output B
*unsigned long okPLL22393_SetOutputSource(unsigned long Handle, unsigned short int n, unsigned short int Source); - send handle, n = 1 for CLKB, Source = 4 for PLL1-0 - Return is 52252344
*unsigned long okPLL22393_SetOutputDivider(unsigned long Handle,
unsigned short int n, unsigned short int Div); - send handle, n = 1 for CLKb, Div = 8 - return is 1
*void okPLL22393_SetOutputEnable(unsigned long Handle, unsigned short int n, unsigned short int Enable); - send handle, n = 1 for CLKb, Enable =1
*unsigned long okPLL22393_GetOutputFrequency(unsigned long Handle,
unsigned short int n); - send handle, n = 1 for CLKb - Return is 14
Setup output C
*unsigned long okPLL22393_SetOutputSource(unsigned long Handle, unsigned short int n, unsigned short int Source); - send handle, n = 2 for CLKC, Source = 6 for PLL2-0 - Return is 52252344
*unsigned long okPLL22393_SetOutputDivider(unsigned long Handle,
unsigned short int n, unsigned short int Div); - send handle, n = 2 for CLKC, Div = 16 - return is 1
*void okPLL22393_SetOutputEnable(unsigned long Handle, unsigned short int n, unsigned short int Enable); - send handle, n = 2 for CLKC, Enable =1
*unsigned long okPLL22393_GetOutputFrequency(unsigned long Handle,
unsigned short int n); - send handle, n = 2 for CLKC - Return is 4.92308
Setup output D
*unsigned long okPLL22393_SetOutputSource(unsigned long Handle, unsigned short int n, unsigned short int Source); - send handle, n = 3 for CLKD, Source = 0 for REF - Return is 52252344
*unsigned long okPLL22393_SetOutputDivider(unsigned long Handle,
unsigned short int n, unsigned short int Div); - send handle, n = 3 for CLKD, Div = 1 - return is 1
*void okPLL22393_SetOutputEnable(unsigned long Handle, unsigned short int n, unsigned short int Enable); - send handle, n = 3 for CLKD, Enable =0
*unsigned long okPLL22393_GetOutputFrequency(unsigned long Handle,
unsigned short int n); - send handle, n = 3 for CLKD - Return is 0
Setup output E
*unsigned long okPLL22393_SetOutputSource(unsigned long Handle, unsigned short int n, unsigned short int Source); - send handle, n = 5 for CLKE, Source = 2 for PLL0-0 - Return is 52252344
*unsigned long okPLL22393_SetOutputDivider(unsigned long Handle,
unsigned short int n, unsigned short int Div); - send handle, n = 5 for CLKE, Div = 2 - return is 1
*void okPLL22393_SetOutputEnable(unsigned long Handle, unsigned short int n, unsigned short int Enable); - send handle, n = 5 for CLKD, Enable =0
*unsigned long okPLL22393_GetOutputFrequency(unsigned long Handle,
unsigned short int n); - send handle, n = 5 for CLKE - Return is 0
Then Destruct
void okPLL22393_Destruct(unsigned long Handle)
Now, I believe that the only difference between the way the FrontPanel and my code operates is that after you have all the settings the way you need, then the operator “Applies” those changes. In my code, you set the parameters and then run the code from beginning to end to program the PLL.
Did I miss a general PLL enable somewhere?
Thanks