misc testing
authorDan White <dan@whiteaudio.com>
Fri, 15 Jun 2012 22:20:13 +0000 (17:20 -0500)
committerDan White <dan@whiteaudio.com>
Fri, 15 Jun 2012 22:20:13 +0000 (17:20 -0500)
python-lib/mpsse-test.py

index 0e39e1c56a66567ca61a83de768e09bd768a15c0..33e862dd17303d5631903f207a4464f63ec1ee70 100755 (executable)
@@ -131,11 +131,14 @@ dac.power(dac.POWER_ON, bitfield)
 # set initial output voltages
 # before tuning
 # channels 0 .. 4
-dac.vina(1.2)
-dac.vinb(1.2)
-dac.vcmi(1.2)
-dac.vbias_core(100e-3)
-dac.vbias_buf(100e-3)
+
+VCM = 1.2483 # multimeter says 0.0 mV between ref/2 and vcmi(VCM)
+VCM = 1.2500 # multimeter says 0.0 mV between ref/2 and vcmi(VCM)
+dac.vcmi(VCM)
+dac.vina(VCM)
+dac.vinb(VCM)
+dac.vbias_core(000e-3)
+dac.vbias_buf(000e-3)
 
 # zero others
 # part A already POR's to 0 but...
@@ -172,18 +175,22 @@ amux = usbio.Mux(spi1, 'chain1_mux')
 
 # Main Chain0
 for h in chain.h:
-    h.cal = 1
+    h.cal = 0
     for ota in h.ota:
-        ota.se = 0
+        ota.se = 1
         ota.cint = 1
         ota.zero = 0
         ota.fast = 1
-        ota.gain = 8
+        ota.gain = 15
         ota.offset = 0
+out = chain.write()
+print str2hex(out)
 chain.write()
+print str2hex(out)
+print str2hex(bytes2str(chain.bytes))
 
-mux.selA = 48
-mux.selB = 48
+mux.selA = 0
+mux.selB = 0
 for ota in mux.ota:
     ota.mode = ota.MUX_CMP
     ota.fast = 1