def __init__(self, chip, channelCount): SPI.__init__(self, toint(chip), 0, 8, 10000000, "MCP492%d" % channelCount) DAC.__init__(self, channelCount, 12, 3.3) self.buffered=False self.gain=False self.shutdown=False self.values = [0 for i in range(channelCount)]
def __init__(self, chip, channelCount): SPI.__init__(self, toint(chip), 0, 8, 10000000) DAC.__init__(self, channelCount, 12, 3.3) self.buffered = False self.gain = False self.shutdown = False self.values = [0 for i in range(channelCount)]
def __init__(self, chip, channelCount, vref): SPI.__init__(self, toint(chip), 0, 8, 10000000) DAC.__init__(self, channelCount, 12, float(vref)) self.buffered=False self.gain=False self.shutdown=False self.values = [0 for i in range(channelCount)]
def __init__(self, chip, channelCount, resolution, name): SPI.__init__(self, toint(chip), 0, 8, 10000000) DAC.__init__(self, channelCount, resolution, 2.048) self.name = name self.buffered=False self.gain=False self.shutdown=True self.values = [0 for i in range(channelCount)]
def __init__(self, chip, channelCount, resolution, name): SPI.__init__(self, toint(chip), 0, 8, 10000000) DAC.__init__(self, channelCount, resolution, 2.048) self.name = name self.buffered = False self.gain = False self.shutdown = True self.values = [0 for i in range(channelCount)]
def __init__(self, chip, slave, channelCount, name): SPI.__init__(self, toint(chip), 0, 8, 10000000) MCP23XXX.__init__(self, channelCount) self.slave = self.SLAVE iocon_value = 0x08 # Hardware Address Enable iocon_addr = self.getAddress(self.IOCON) self.writeRegister(iocon_addr, iocon_value) self.slave = toint(slave) self.name = name
def __init__(self, chip, slave, channelCount, name): SPI.__init__(self, toint(chip), 0, 8, 10000000, name) MCP23XXX.__init__(self, channelCount) self.slave = self.SLAVE slave = toint(slave) addr = self.getAddress(self.IOCON) iocon = self.readRegister(addr) iocon |= 0x08 # Hardware Address Enable self.writeRegister(addr, iocon) self.slave = slave
def __init__(self, chip, channelCount, resolution, name): SPI.__init__(self, toint(chip), 0, 8, 10000) ADC.__init__(self, channelCount, resolution, 3.3) self.name = name self.MSB_MASK = 2**(resolution-8) - 1
def __init__(self, chip, vref, channelCount, resolution, name): SPI.__init__(self, toint(chip), 0, 8, 10000000) DAC.__init__(self, toint(channelCount), toint(resolution), float(vref)) self.name = name self.values = [0 for i in range(toint(channelCount))]
def __init__(self, chip, channelCount, resolution, name): SPI.__init__(self, toint(chip), 0, 8, 10000) ADC.__init__(self, channelCount, resolution, 3.3) self.name = name self.MSB_MASK = 2**(resolution - 8) - 1
def __init__(self, chip, vref, resolution, name): SPI.__init__(self, toint(chip), 0, 8, 10000000) DAC.__init__(self, 1, resolution, float(vref)) self.name = name self.value = 0