.base.used_pins = 0x00FF,
.base.freq_min = U2_DOUBLE_TO_FXPT_FREQ(400e6),
.base.freq_max = U2_DOUBLE_TO_FXPT_FREQ(500e6),
- //.base.gain_min = U2_DOUBLE_TO_FXPT_GAIN(xxx),
- //.base.gain_max = U2_DOUBLE_TO_FXPT_GAIN(xxx),
- //.base.gain_step_size = U2_DOUBLE_TO_FXPT_GAIN(xxx),
+ .base.gain_min = U2_DOUBLE_TO_FXPT_GAIN(0),
+ .base.gain_max = U2_DOUBLE_TO_FXPT_GAIN(45),
+ .base.gain_step_size = U2_DOUBLE_TO_FXPT_GAIN(0.022),
.base.is_quadrature = true,
.base.i_and_q_swapped = true,
.base.spectrum_inverted = false,
.base.used_pins = 0x00FF,
.base.freq_min = U2_DOUBLE_TO_FXPT_FREQ(800e6),
.base.freq_max = U2_DOUBLE_TO_FXPT_FREQ(1000e6),
- //.base.gain_min = U2_DOUBLE_TO_FXPT_GAIN(xxx),
- //.base.gain_max = U2_DOUBLE_TO_FXPT_GAIN(xxx),
- //.base.gain_step_size = U2_DOUBLE_TO_FXPT_GAIN(xxx),
+ .base.gain_min = U2_DOUBLE_TO_FXPT_GAIN(0),
+ .base.gain_max = U2_DOUBLE_TO_FXPT_GAIN(70),
+ .base.gain_step_size = U2_DOUBLE_TO_FXPT_GAIN(0.034),
.base.is_quadrature = true,
.base.i_and_q_swapped = true,
.base.spectrum_inverted = false,
.base.used_pins = 0x00FF,
.base.freq_min = U2_DOUBLE_TO_FXPT_FREQ(1150e6),
.base.freq_max = U2_DOUBLE_TO_FXPT_FREQ(1350e6),
- //.base.gain_min = U2_DOUBLE_TO_FXPT_GAIN(xxx),
- //.base.gain_max = U2_DOUBLE_TO_FXPT_GAIN(xxx),
- //.base.gain_step_size = U2_DOUBLE_TO_FXPT_GAIN(xxx),
+ .base.gain_min = U2_DOUBLE_TO_FXPT_GAIN(0),
+ .base.gain_max = U2_DOUBLE_TO_FXPT_GAIN(70),
+ .base.gain_step_size = U2_DOUBLE_TO_FXPT_GAIN(0.034),
.base.is_quadrature = true,
.base.i_and_q_swapped = true,
.base.spectrum_inverted = false,
.base.used_pins = 0x00FF,
.base.freq_min = U2_DOUBLE_TO_FXPT_FREQ(1600e6),
.base.freq_max = U2_DOUBLE_TO_FXPT_FREQ(2000e6),
- //.base.gain_min = U2_DOUBLE_TO_FXPT_GAIN(xxx),
- //.base.gain_max = U2_DOUBLE_TO_FXPT_GAIN(xxx),
- //.base.gain_step_size = U2_DOUBLE_TO_FXPT_GAIN(xxx),
+ .base.gain_min = U2_DOUBLE_TO_FXPT_GAIN(0),
+ .base.gain_max = U2_DOUBLE_TO_FXPT_GAIN(70),
+ .base.gain_step_size = U2_DOUBLE_TO_FXPT_GAIN(0.034),
.base.is_quadrature = true,
.base.i_and_q_swapped = true,
.base.spectrum_inverted = false,
.base.used_pins = 0x00FF,
.base.freq_min = U2_DOUBLE_TO_FXPT_FREQ(2300e6),
.base.freq_max = U2_DOUBLE_TO_FXPT_FREQ(2700e6),
- //.base.gain_min = U2_DOUBLE_TO_FXPT_GAIN(xxx),
- //.base.gain_max = U2_DOUBLE_TO_FXPT_GAIN(xxx),
- //.base.gain_step_size = U2_DOUBLE_TO_FXPT_GAIN(xxx),
+ .base.gain_min = U2_DOUBLE_TO_FXPT_GAIN(0),
+ .base.gain_max = U2_DOUBLE_TO_FXPT_GAIN(70),
+ .base.gain_step_size = U2_DOUBLE_TO_FXPT_GAIN(0.034),
.base.is_quadrature = true,
.base.i_and_q_swapped = true,
.base.spectrum_inverted = false,
// test gain
dbb->set_gain(dbb,U2_DOUBLE_TO_FXPT_GAIN(45.0));
- printf("set the gain\n");
return true;
}
mdelay(10);
spi_transact(SPI_TXONLY,db->common.spi_mask,N,24,SPIF_PUSH_FALL);
- printf("A = %d, B = %d, N_DIV = %d\n",A, B, N_DIV);
+ //printf("A = %d, B = %d, N_DIV = %d\n",A, B, N_DIV);
*dc = (N_DIV * phdet_freq) / db->common.freq_mult;
return true;
}
int offset_q8 = (int)(1.2/3.3*4096*(1<<15));
int slope_q8 = (int)(-1.0/45.0*4096/3.3*256);
int dacword = ((slope_q8 * gain) + offset_q8)>>15;
- printf("DACWORD %d\n",dacword);
+ //printf("DACWORD %d\n",dacword);
lsdac_write_rx(1,dacword);
return true;
/*