06-19-2019 03:11 AM
Hello,
I want to create simulate slave on I2C bus using USB-8452. My external master send read request and I want to answer from simulated slave. But, when I want to use VI NI-845x I2C Slave Write.vi, I got this error -301782. What does it means, what is wrong?
07-26-2019 06:33 AM
Hi Martin,
are you still struggling with this problem? Or you had already dealt with it.
08-12-2019 01:22 AM
Hello,
I have already solved this topic. I have wrongly implemented the communication procedure of slave writing. Now, I have fixed.
Thank you
M.
08-13-2019 09:39 AM
Hey Martin,
I am still having the same problem.
Can you please tell me how you solved it?
Regards
Hmd
08-14-2019 01:22 AM
Hello Hmd,
I wanted to simulate slave with this behaviour: My master asks slave for a data. Slave should receive this request and answer to master. For this behaviour, I had to follow the procedure from NI help. It means to configure I2C slave, start I2C slave, wait for a message from master, read this message (VI I2C Slave Read send automaticaly acknoledge) and again wait for message from master (comand from master that slave can send data) then send a data to master by I2C Slave Write.
Here is a extract from my VI, which works me. I am bigginner with Labview, so the code isn´t so optimal 🙂
Also, take care for pull up resistors. You can switch ON by setting of I2C or you can use external resistors.
I hope it helps a bit.
Martin