21 SPI.__init__(self,
toint(chip), 0, 8, 10000000)
22 DAC.__init__(self, channelCount, 12, float(vref))
26 self.
values = [0
for i
in range(channelCount)]
32 return self.
values[channel]
37 d[0] |= (channel & 0x01) << 7
39 d[0] |= (
not self.
gain & 0x01) << 5
40 d[0] |= (
not self.
shutdown & 0x01) << 4
41 d[0] |= (value >> 8) & 0x0F
44 self.
values[channel] = value
48 MCP492X.__init__(self, chip, 1)
52 MCP492X.__init__(self, chip, 2)