From 870020bc9f231724bc741a8cbbe5c27db4c9f756 Mon Sep 17 00:00:00 2001 From: occheung Date: Mon, 18 Sep 2023 19:55:16 -0700 Subject: [PATCH] adc: use a generous upper bound --- artiq/coredevice/shuttler.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/artiq/coredevice/shuttler.py b/artiq/coredevice/shuttler.py index 75c970033..97d0ee6f5 100644 --- a/artiq/coredevice/shuttler.py +++ b/artiq/coredevice/shuttler.py @@ -224,6 +224,9 @@ class ADC: self.bus.set_config_mu( ADC_SPI_CONFIG | spi.SPI_END, 32, SPIT_ADC_WR, CS_ADC) self.bus.write(addr << 24 | (data & 0xffffff)) + + delay(100*us) + adc_code = self.read24(_AD4115_REG_DATA) return ((adc_code / (1 << 23)) - 1) * 2.5 / 0.1 @kernel