|
最近学习PLL,想用ADI的ADF4113 + MINI公司的 ROS-550PV,做一个450M-550M的频率源,但是在应用的时候出问题,频率老是不锁,基准25M经R分频后得到200K的鉴相器参考频率,而且经测试基准200K输出是对的,但是测VCO的RF信号经N分频就测不出来,不知道是硬件的环路滤波器设计有问题还是软件数没有送对,请各位高手帮忙看看,谢谢!!<img src="attachments/dvbbs/2011-6/20116920271461986.jpg" border="0" onclick="zoom(this)" onload="if(this.width>document.body.clientWidth*0.5) {this.resized=true;this.width=document.body.clientWidth*0.5;this.style.cursor='pointer';} else {this.onclick=null}" alt="" />
#include <REGX51.H>
sbit pll4113_CLK=P1^0;
sbit pll4113_LE=P1^1;
sbit pll4113_DATA=P1^2;
sbit pll4113_CE=P1^3;
//*************************************//
//ADF4113 参数初始值
unsigned long int A_ref = 0x0001F4; //25MHz经R=125分频=200KHZ基准频率(基准分频器R设定值)
unsigned long int AB_counter = 0x013811; //500MHz->0x013811,500MHz/200KHz=2500=BP+A,(B=312,A=4,8/9)
unsigned long int fre=500000000;
//************************************//
void delay100us()
{
register int i;
for (i=0;i<40;i++);
}
void ADF4113_data_input (unsigned long int ddata1)
{
unsigned long int temp;
unsigned int i;
temp=0x800000;
pll4113_CLK=0;
pll4113_LE=0;
delay100us();
for(i=0;i<24;i++)
{
pll4113_CLK=0;
if(ddata1&temp )
{
pll4113_DATA=1;
}
else
{
pll4113_DATA=0;
}
temp=temp>>1;
delay100us();
pll4113_CLK=1;
delay100us();
}
pll4113_LE=1;
delay100us();
pll4113_LE=0;
}
void pll4113_setfreq(unsigned long int freq)
{
unsigned long int value = 0;
float pdf = 200000;
float B,A;
unsigned long int B_int, A_int;
B = (float)freq/pdf/(float)(8);
B_int = (unsigned long int)(B);
A = (float)freq/pdf - (8*(float)B_int);
A_int = (unsigned long int)(A);
value = B_int<<8;
value += A_int<<2;
value += 1;//C2 C1=01 时计数器为N(A B)计数器
ADF4113_data_input(0x1F80C3); //init
ADF4113_data_input(A_ref); // R
ADF4113_data_input(value); // AB
}
void main(void)
{
pll4113_setfreq(fre) ;
while(1)
{
}
}[em03] |
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有账号?注册
×
|