/Designs/Measuring_instruments/RMDS02C/SW/Host_controller/setSi570.py
33,9 → 33,9
bus = [
{
"type": "i2chub",
"address": 0x72,
"address": 0x70,
"children": [
{ "name":"clkgen", "type":"clkgen01", "channel": 7, },
{ "name":"clkgen", "type":"clkgen01", "channel": 1, },
],
},
],
44,11 → 44,10
 
fgen = cfg.get_device("clkgen")
sys.stdout.write("Frequency will be set to " + sys.argv[2] + " MHz.\r\n")
 
time.sleep(3)
fgen.route()
fgen.reset() # Reset Si570 to 10 MHz
time.sleep(3)
fgen.recall_nvm() # Reload settings for 10 MHz
time.sleep(3)
fgen = cfg.get_device("clkgen") # Reopen CP2112
fgen.set_freq(10., float(eval(sys.argv[2]))) # Set frequency
sys.stdout.write("Done.\r\n")