From 3a7990751d32cd55a93d16861405ac7428ee7431 Mon Sep 17 00:00:00 2001 From: Dan White Date: Sun, 13 May 2012 21:17:22 -0500 Subject: [PATCH] track down arb_out1 wiggles WRT PS settings --- python-lib/mpsse-test.py | 64 +++++++++++++++++++++++++++++----------- 1 file changed, 47 insertions(+), 17 deletions(-) diff --git a/python-lib/mpsse-test.py b/python-lib/mpsse-test.py index a71b557..f395b2d 100755 --- a/python-lib/mpsse-test.py +++ b/python-lib/mpsse-test.py @@ -11,8 +11,8 @@ import usbio -do_shell = True -#do_shell = False +#do_shell = True +do_shell = False @@ -52,8 +52,10 @@ i2c = usbio.I2C(interface=usbio.ftdi.INTERFACE_C, scl=0, sda=1, # need to make a wrapper class to do e.g. ibias.buf = 10 uA) # ibias = usbio.AD524x(i2c, 0) -ibias.posA = 0 -ibias.posB = 0 +#ibias.posA = 0 +#sleep(0.1) +#ibias.posB = 0 +#sleep(0.1) ############################################################################## @@ -69,10 +71,40 @@ v430.alias('vb', 'vdd') # setup power supply defaults def psdefaults(): - vatoi.avdd = 2.5 vatoi.vdd = 1.2 + vatoi.avdd = 2.5 v430.vdd = 1.2 v430.dvdd = 2.5 + #sleep(0.1) + #sleep(0.1) + #sleep(0.1) + #sleep(0.1) + + +from itertools import permutations +def s0(): vatoi.vdd = 1.2 +def s1(): vatoi.avdd = 2.5 +def s2(): v430.vdd = 1.2 +def s3(): v430.dvdd = 2.5 + +order = [s0, s1, s2, s3] + +orderiter = permutations(order) +for p in orderiter: + print p + #setup POR values each time + vatoi.posA = 128 + vatoi.posB = 128 + v430.vdd = 128 + v430.dvdd = 128 + sleep(0.1) + for s in p: + s() + sleep(0.1) + sleep(1.0) + + + psdefaults() @@ -88,7 +120,7 @@ dac.swreset() dac.reference(dac.REF_FLEXIBLE_ALWAYS_ON) # CLR is tied high, explicitly ignore anyway -dac.CCR(dac.IGNORE_CLR) +#dac.CCR(dac.IGNORE_CLR) # power up all channels bitfield = 0xff @@ -97,15 +129,15 @@ dac.power(dac.POWER_ON, bitfield) # set initial output voltages # before tuning # channels 0 .. 4 -dac.vina(1.0) -dac.vinb(1.0) -dac.vcmi(1.0) -dac.vbias_core(0.0) -dac.vbias_buf(0.0) +#dac.vina(2.0) +#dac.vinb(2.0) +#dac.vcmi(2.0) +dac.vbias_core(100e-3) +dac.vbias_buf(100e-3) # zero others -for i in range(5, 8): - dac.setv(i, 0.0) +#for i in range(5, 8): + #dac.setv(i, 0.0) ############################################################################## @@ -184,16 +216,14 @@ amux.write() ############################################################################## # transient testing stuff # -dac.vina(1.1) -dac.vinb(0.9) +#dac.vina(1.1) +#dac.vinb(0.9) ############################################################################## # ADC testing stuff # -dac.vina(1.1) - #go to idle mode adc.triggerMode(adc.MODE_IDLE) -- 2.25.1