Quantcast
Channel: Digital I/O topics
Viewing all articles
Browse latest Browse all 2167

NI-8452 Slave continuously waiting for event - I2C

$
0
0

Hello,

 

Recently I have been working on a I2C Slave simulation for one of my Master circuits, using the NI-8452 Interface. I have created a GUI in the Visual Studio 6 C++ and I am capable of setting up the Slave, waiting for an event from the Master and writing the data to it following the data request event. However, I have a problem with getting the procedure to run continuously - every time after sending the data I would like the Slave to be waiting for an event once again. I've tried using several 'for' and 'while' loops but I seem to be getting some synchronization problems with my Master - commands end in errors and crashes.

 

I guess my questions is about any potential examples available, demonstrating a continuous wait for a request from the Master, replying to that request and then going back to the waiting state.

 

Best regards,

 

Konrad


Viewing all articles
Browse latest Browse all 2167

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>