/Designs/Measuring_instruments/RMDS02C/SW/Host_controller/frequency_log.py
7,19 → 7,13
import sys
from pymlab import config
 
#### Script Arguments ###############################################
req_freq = 286.0788 # required local oscillator frequency in MHz.
 
if (len(sys.argv) > 3) or (len(sys.argv) < 2):
sys.stderr.write("Invalid number of arguments.\n")
sys.stderr.write("Usage: %s PORT_ADDRESS [REQUIERED_MHz]\n" % (sys.argv[0], ))
sys.exit(1)
 
port = eval(sys.argv[1])
#### Sensor Configuration ###########################################
 
cfg = config.Config(
i2c = {
"port": port,
"port": 1,
},
bus = [
{
42,9 → 36,6
rfreq = fgen.get_rfreq()
hsdiv = fgen.get_hs_div()
n1 = fgen.get_n1_div()
#fdco = 0
#fxtal = 0
#regs = [0, 0, 0]
 
'''
# sample GPS configuration
66,7 → 57,7
if (now.second == 15) or (now.second == 35) or (now.second == 55):
frequency = fcount.get_freq()
if (len(sys.argv) == 3):
regs = fgen.set_freq(frequency/1e6, float(eval(sys.argv[2])))
regs = fgen.set_freq(frequency/1e6, float(req_freq))
now = datetime.datetime.now()
 
rfreq = fgen.get_rfreq()