1、功能
Si5340/41-D可以输出任意频率,当然有范围,100Hz1GHz。外部输入为24M或者4854M的XTAL,VCO在13500~14256Mhz之间,控制接口采用IIC或者SPI。
芯片架构图
2、IIC控制方式
3、直接上控制代码
使用米联客ZU3EG,将控制接口接入到PS的IIC上
4、控制需要注意的寄存器
输出公式
P0=IN*(M_NUM/M_DEN)/R_REG/(N_NUM/N_DEN)
(1)输入选择
(2)输出配置
(3)Divider
(4)分数倍频器 M_NUM/M_DEN
(5)第一级整数分频器R_REG
(6)分数分频器N_NUM/N_DEN
5、PS控制
(1)写函数
int si5340_write(XIicPs *I2C_Ptr,u16 register_address, u8 data) {
u8 slave = SI5430_SLAVE_ID;
u8 page_byte;
page_byte = (register_address >> 8);
int status;
u8 page_select_send_buff[2] = {0x01,page_byte};
status = XIicPs_MasterSendPolled(I2C_Ptr, page_select_send_buff, 2, slave);
u8 reg_byte;
reg_byte = (register_address & 0xFF);
u8 write_reg_send_buff[2] = {reg_byte,data};
status = XIicPs_MasterSendPolled(I2C_Ptr, write_reg_send_buff, 2, slave);
return status;
}
(2)读函数
u8 si5340_read(XIicPs *I2C_Ptr,u16 register_address) {
u8 slave = SI5430_SLAVE_ID;
u8 page_byte;
page_byte = (register_address >> 8);
u8 page_select_send_buff[2] = {0x01,page_byte};
XIicPs_MasterSendPolled(I2C_Ptr, page_select_send_buff, 2, slave);
u8 reg_byte;
reg_byte = (register_address & 0xFF);
XIicPs_MasterSendPolled(I2C_Ptr, ®_byte, 1, slave);
u8 data;
XIicPs_MasterRecvPolled(I2C_Ptr, &data, 1, slave);
return data;
}
6、控制结束
控制函数在链接