Hi labjack team,
I'm trying to operate a MCP4728 i2c DAC using the Labjack u6 as a master, running windows. I've attached an example script below that reproduces the issue. It is based off of https://labjack.com/sites/default/files/2011/05/HMC6352.py_.txt
It appears that the u6 is not responding to i2c commands for a reason I cannot discover. I have a scope on the pins I have chosen, fio7 & fio6, but I see no activity on them.
Am I not configuring the i2c on the u6 correctly? I have sprinkled setDIOState and getFeedback calls to see if it was a communication issue to no avail. Any ideas?
Thank you,
-Greg
My issue was silly... I forgot to specify keywords for SDAPinNumber and SCLPinNumber in the i2c call.
Correct call is d.i2c(addr, cmd, SDAPinNum=7, SCLPinNum=6).
-Greg
Right now your calls are using the default values for SDAPinNum (0/FIO0) and SCLPinNum (1/FIO1). With your i2c command the parameters where you set 7 and 6 are EnableClockStretching and NoStopWhenRestarting. Try something like this instead to use FIO7 as the SDA line and FIO6 as the SCL line:
d.i2c(96, cmd, SDAPinNum = 7, SCLPinNum = 6)
Use the help function ( help(u6.U6.i2c) ) or check the u6.py source code to see the i2c LabJackPython documentation and the parameters order.
And it looks like you figured out the issue while I was in the process of responding.