Calling the following function gives me the waveform on the first snapshot:
function writeDac(addr, value)
value2 = BitAND(value, 255)
value1 = rshift(value, 8)
i2c.start(bus)
i2c.address(bus, addr, i2c.TRANSMITTER)
i2c.write(bus, value1)
i2c.write(bus, value2)
i2c.stop(bus)
end
Joining two writes in one removes one of the gaps on the waveform:
i2c.write(bus, value1, value2)
instead of
i2c.write(bus, value1)
i2c.write(bus, value2)
So I wonder, is there a way to remove the excessive gaps between "start", "address" and "stop"?