Question

Would it be possible to emulate a I2C slave using the digital discovery (using scripting)?

If not, is this something that could potentially be added in the future, or are there any HW limitations that make this infeasible?  

Share this post


Link to post
Share on other sites

7 answers to this question

Recommended Posts

  • 0

Hi, thanks for the response, but that's not really what I am looking for.

What I need is to create a I2C slave (hopefully using the Digital Discovery), that will communicate with an actual I2C master device.

Share this post


Link to post
Share on other sites
  • 0

Scripting delays are large, and SPI slaves are expected to respond instantly (half the clock period) to the clock, so I don't think that a general slave emulator is possible.  It can be difficult to make an SPI slave even with a dedicated microcontroller that has SPI hardware support, and compromises need to be made.  

An I2C emulator may be more feasible, as that protocol allows the slave to retard the clock.

Share this post


Link to post
Share on other sites
  • 0

Hi @ned_zepplin

At the moment the WF/Protocol interface supports I2C spying and master (master,custom,sensor), but slave is not supported.
You could implement I2C slave using SDK or script/staticio but this would be slow, ~10ms/bit, and could cause SMBus timeout.

We might add Slave for Protocol/I2C later.
Thank you for this post.

Here you can find a related topic:

 

Share this post


Link to post
Share on other sites
  • 0

OK, thanks for the clarification.

Note that I think supporting a configurable I2C slave would be a great feature for future versions of Waveforms.

 

3 hours ago, attila said:

Hi @ned_zepplin

At the moment the WF/Protocol interface supports I2C spying and master (master,custom,sensor), but slave is not supported.
You could implement I2C slave using SDK or script/staticio but this would be slow, ~10ms/bit, and could cause SMBus timeout.

We might add Slave for Protocol/I2C later.
Thank you for this post.

Here you can find a related topic:

 

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now