Commit 769bd069 authored by Paolo Baesso's avatar Paolo Baesso

Changes in scripts

parent b08899cd
...@@ -45,20 +45,20 @@ class EUDETdummy: ...@@ -45,20 +45,20 @@ class EUDETdummy:
self.IC6=PCA9539PW(self.TLU_I2C, 0x74) self.IC6=PCA9539PW(self.TLU_I2C, 0x74)
self.IC6.setInvertReg(0, 0x00)# 0= normal, 1= inverted self.IC6.setInvertReg(0, 0x00)# 0= normal, 1= inverted
self.IC6.setIOReg(0, 0x00)# 0= output, 1= input self.IC6.setIOReg(0, 0x00)# 0= output, 1= input
self.IC6.setOutputs(0, 0xAA)# If output, set to XX self.IC6.setOutputs(0, 0x77)# If output, set to XX
self.IC6.setInvertReg(1, 0x00)# 0= normal, 1= inverted self.IC6.setInvertReg(1, 0x00)# 0= normal, 1= inverted
self.IC6.setIOReg(1, 0x00)# 0= output, 1= input self.IC6.setIOReg(1, 0x00)# 0= output, 1= input
self.IC6.setOutputs(1, 0xAA)# If output, set to XX self.IC6.setOutputs(1, 0x77)# If output, set to XX
self.IC7=PCA9539PW(self.TLU_I2C, 0x75) self.IC7=PCA9539PW(self.TLU_I2C, 0x75)
self.IC7.setInvertReg(0, 0x00)# 0= normal, 1= inverted self.IC7.setInvertReg(0, 0x00)# 0= normal, 1= inverted
self.IC7.setIOReg(0, 0x00)# 0= output, 1= input self.IC7.setIOReg(0, 0x00)# 0= output, 1= input
self.IC7.setOutputs(0, 0x0F)# If output, set to XX self.IC7.setOutputs(0, 0x00)# If output, set to XX
self.IC7.setInvertReg(1, 0x00)# 0= normal, 1= inverted self.IC7.setInvertReg(1, 0x00)# 0= normal, 1= inverted
self.IC7.setIOReg(1, 0x00)# 0= output, 1= input self.IC7.setIOReg(1, 0x00)# 0= output, 1= input
self.IC7.setOutputs(1, 0x50)# If output, set to XX self.IC7.setOutputs(1, 0xB0)# If output, set to XX
################################################################################################################################## ##################################################################################################################################
...@@ -521,7 +521,7 @@ class EUDETdummy: ...@@ -521,7 +521,7 @@ class EUDETdummy:
pprint.pprint(outList) pprint.pprint(outList)
return outList return outList
################################################################################################################################## ##################################################################################################################################
...@@ -535,7 +535,7 @@ class EUDETdummy: ...@@ -535,7 +535,7 @@ class EUDETdummy:
#READ CONTENT OF EPROM VIA I2C #READ CONTENT OF EPROM VIA I2C
self.getSN() self.getSN()
# #
# #SET DACs # #SET DACs
targetV= -0.12 targetV= -0.12
...@@ -568,8 +568,8 @@ class EUDETdummy: ...@@ -568,8 +568,8 @@ class EUDETdummy:
if resetCounters: if resetCounters:
self.resetCounters() self.resetCounters()
print "EUDUMMY INITIALIZED" print "EUDUMMY INITIALIZED"
################################################################################################################################## ##################################################################################################################################
......
...@@ -45,22 +45,22 @@ class TLU: ...@@ -45,22 +45,22 @@ class TLU:
self.IC6=PCA9539PW(self.TLU_I2C, 0x74) self.IC6=PCA9539PW(self.TLU_I2C, 0x74)
self.IC6.setInvertReg(0, 0x00)# 0= normal, 1= inverted self.IC6.setInvertReg(0, 0x00)# 0= normal, 1= inverted
self.IC6.setIOReg(0, 0x00)# 0= output, 1= input self.IC6.setIOReg(0, 0x00)# 0= output, 1= input
self.IC6.setOutputs(0, 0x77)# If output, set to XX self.IC6.setOutputs(0, 0xAA)# If output, set to XX
self.IC6.setInvertReg(1, 0x00)# 0= normal, 1= inverted self.IC6.setInvertReg(1, 0x00)# 0= normal, 1= inverted
self.IC6.setIOReg(1, 0x00)# 0= output, 1= input self.IC6.setIOReg(1, 0x00)# 0= output, 1= input
self.IC6.setOutputs(1, 0x77)# If output, set to XX self.IC6.setOutputs(1, 0xAA)# If output, set to XX
self.IC7=PCA9539PW(self.TLU_I2C, 0x75) self.IC7=PCA9539PW(self.TLU_I2C, 0x75)
self.IC7.setInvertReg(0, 0x00)# 0= normal, 1= inverted self.IC7.setInvertReg(0, 0x00)# 0= normal, 1= inverted
self.IC7.setIOReg(0, 0x00)# 0= output, 1= input self.IC7.setIOReg(0, 0x00)# 0= output, 1= input
self.IC7.setOutputs(0, 0x00)# If output, set to XX self.IC7.setOutputs(0, 0x0F)# If output, set to XX
self.IC7.setInvertReg(1, 0x00)# 0= normal, 1= inverted self.IC7.setInvertReg(1, 0x00)# 0= normal, 1= inverted
self.IC7.setIOReg(1, 0x00)# 0= output, 1= input self.IC7.setIOReg(1, 0x00)# 0= output, 1= input
self.IC7.setOutputs(1, 0xB0)# If output, set to XX self.IC7.setOutputs(1, 0x50)# If output, set to XX
################################################################################################################################## ##################################################################################################################################
################################################################################################################################## ##################################################################################################################################
def DUTOutputs(self, dutN, enable=False, verbose=False): def DUTOutputs(self, dutN, enable=False, verbose=False):
...@@ -645,7 +645,7 @@ class TLU: ...@@ -645,7 +645,7 @@ class TLU:
self.setDUTmask(DUTMask) self.setDUTmask(DUTMask)
# #
# # # Set mode # # # Set mode
DUTMode= 0xFFFFFFFC DUTMode= 0xFFFFFFFF
self.setMode(DUTMode) self.setMode(DUTMode)
# # # Set modifier # # # Set modifier
...@@ -696,7 +696,7 @@ class TLU: ...@@ -696,7 +696,7 @@ class TLU:
################################################################################################################################## ##################################################################################################################################
################################################################################################################################## ##################################################################################################################################
def stop(self): def stop(self, saveD= False, plotD= False):
print "TLU STOPPING..." print "TLU STOPPING..."
self.getPostVetoTrg() self.getPostVetoTrg()
...@@ -709,8 +709,8 @@ class TLU: ...@@ -709,8 +709,8 @@ class TLU:
fifoData= self.getFifoData(nFifoWords) fifoData= self.getFifoData(nFifoWords)
outList= self.parseFifoData(fifoData, nFifoWords/6, False) outList= self.parseFifoData(fifoData, nFifoWords/6, False)
saveD= 0 #saveD= 0
plotD= 0 #plotD= 0
if saveD: if saveD:
self.saveFifoData(outList) self.saveFifoData(outList)
if plotD: if plotD:
......
...@@ -65,8 +65,8 @@ if __name__ == "__main__": ...@@ -65,8 +65,8 @@ if __name__ == "__main__":
logdata= True logdata= True
TLU.start(logdata) TLU.start(logdata)
time.sleep(5) time.sleep(1.5)
TLU.stop() TLU.stop(False, False)
# prompt = MyPrompt() # prompt = MyPrompt()
# prompt.prompt = '>> ' # prompt.prompt = '>> '
# prompt.cmdloop("Welcome to miniTLU test console.\nType HELP for a list of commands.") # prompt.cmdloop("Welcome to miniTLU test console.\nType HELP for a list of commands.")
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment