ned_zepplin Posted August 28, 2017 Share Posted August 28, 2017 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? Link to comment Share on other sites More sharing options...
attila Posted August 30, 2017 Share Posted August 30, 2017 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: Link to comment Share on other sites More sharing options...
D@n Posted August 28, 2017 Share Posted August 28, 2017 @ned_zepplin, If you are building a Verilog project, then you might find the i2c slave emulator as part of the wbi2c project to be something you are looking for. It integrates nicely into a Verilator based simulation, should you wish to go that route. Dan Link to comment Share on other sites More sharing options...
ned_zepplin Posted August 28, 2017 Author Share Posted August 28, 2017 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. Link to comment Share on other sites More sharing options...
D@n Posted August 28, 2017 Share Posted August 28, 2017 @ned_zepplin, Well it was a shot in the dark. Let's see how the Digilent staff reply. (@attila seems the one most working with DD ...) Dan Link to comment Share on other sites More sharing options...
gasstationwithoutpumps Posted August 28, 2017 Share Posted August 28, 2017 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. Link to comment Share on other sites More sharing options...
HansV Posted August 29, 2017 Share Posted August 29, 2017 Hi, I use a Chipkit microcontroller for this or a Arduino, https://www.arduino.cc/en/Tutorial/MasterWriter Hans. Link to comment Share on other sites More sharing options...
ned_zepplin Posted August 30, 2017 Author Share Posted August 30, 2017 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: Link to comment Share on other sites More sharing options...
Question
ned_zepplin
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?
Link to comment
Share on other sites
7 answers to this question
Recommended Posts
Archived
This topic is now archived and is closed to further replies.