forked from M-Labs/artiq
1
0
Fork 0

examples/ad5360: set FMC DIO directions

This commit is contained in:
Sebastien Bourdeauducq 2017-10-31 23:15:03 +08:00
parent d80cf8d59d
commit 8407b2c400
1 changed files with 3 additions and 0 deletions

View File

@ -4,12 +4,15 @@ from artiq.experiment import *
class AD5360Test(EnvExperiment):
def build(self):
self.setattr_device("core")
self.setattr_device("fmcdio_dirctl")
self.dac = self.get_device("dac_zotino")
self.setattr_device("led")
@kernel
def run(self):
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.write_offsets()
self.led.on()