forked from M-Labs/artiq
examples/ad5360: set FMC DIO directions
This commit is contained in:
parent
d80cf8d59d
commit
8407b2c400
|
@ -4,12 +4,15 @@ from artiq.experiment import *
|
||||||
class AD5360Test(EnvExperiment):
|
class AD5360Test(EnvExperiment):
|
||||||
def build(self):
|
def build(self):
|
||||||
self.setattr_device("core")
|
self.setattr_device("core")
|
||||||
|
self.setattr_device("fmcdio_dirctl")
|
||||||
self.dac = self.get_device("dac_zotino")
|
self.dac = self.get_device("dac_zotino")
|
||||||
self.setattr_device("led")
|
self.setattr_device("led")
|
||||||
|
|
||||||
@kernel
|
@kernel
|
||||||
def run(self):
|
def run(self):
|
||||||
self.core.reset()
|
self.core.reset()
|
||||||
|
delay(5*ms) # build slack for shift register set
|
||||||
|
self.fmcdio_dirctl.set(self, 0x00008800)
|
||||||
self.dac.setup_bus(write_div=30, read_div=40)
|
self.dac.setup_bus(write_div=30, read_div=40)
|
||||||
self.dac.write_offsets()
|
self.dac.write_offsets()
|
||||||
self.led.on()
|
self.led.on()
|
||||||
|
|
Loading…
Reference in New Issue