From 0b3b07a7da67ca532b77b92e0e81ebdf1b64de33 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20J=C3=B6rdens?= Date: Thu, 25 Oct 2018 16:02:54 +0000 Subject: [PATCH] ad9910: add power down method MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Robert Jördens --- artiq/coredevice/ad9910.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/artiq/coredevice/ad9910.py b/artiq/coredevice/ad9910.py index c7e1b49a1..442b40210 100644 --- a/artiq/coredevice/ad9910.py +++ b/artiq/coredevice/ad9910.py @@ -165,6 +165,16 @@ class AD9910: return raise ValueError("PLL lock timeout") + @kernel + def power_down(self, bits=0b1111): + """Power down DDS. + + :param bits: power down bits, see datasheet + """ + self.write32(_AD9910_REG_CFR1, 0x00000002 | (bits << 4)) + delay(1*us) + self.cpld.io_update.pulse(1*us) + @kernel def set_mu(self, ftw, pow=0, asf=0x3fff): """Set profile 0 data in machine units.