We just bought our first Aardvark I2C/SPI Host Adapter and have a couple of questions.
We’re trying to send data to a Master I2C device. The Aardvark adapter has to be the Slave device because the device under test (DUT) can only be configured as the Master device
We can see the data from the DUT, so the MOSI line must be working, but we’re having problems sending data to the DUT. We have successfully sent data from the Aardvark adapter as a Master device, but are unsure about how to get it to work as a Slave device. Can you tell us what we need to look at to make this work?
Response from Technical Support:Thanks for your question! The Aardvark adapter is a great way to simulate a slave device as it can read out (send) data. To set up Slave Response (sending out data), you can use the Control Center Serial or the Aardvark API software. Figure 2 below shows how easy the setup is with the Control Center Serial software.
Figure 1: Aardvark I2C/SPI Host Adapter |
Figure 2: Control Center Serial Software I2C Configuration for Slave Response |
Here is some information about the Slave Response data flow:
The Aardvark adapter will reply with as many bytes as the master device requests; it will repeatedly send out the Slave Response that you set up. For example, if you set the slave response as 10 bytes in the slave configuration and the master device requests 25 bytes to be read from the slave, the slave will reply with the unique 10 bytes twice and the first 5 bytes of the 10 byte response to meet the Master's read request of 25 bytes. Figure 2 above shows the I2C dialog window of the Control Center software. This is where you can easily set up the Aardvark adapter as a Slave device (press the Enable button) and define the Slave Response (enter the desired data in the text field and then press the Set Resp button).
For more information about setting up Slave Response, please refer to the section I2C Slave in the Control Center Serial Software User Manual. For information about using the API software, which enables you to write custom programs for your specifications, please refer to the section API Documentation in the Aardvark I2C/SPI Host Adapter User Manual. We also provide example API programs that you can use as is or customize for your use.
Note – when your device under test is the Master device, you cannot use another Master device to communicate to it. For more information about I2C protocols, please refer to the section I2C Background in the Aardvark I2C/SPI Host Adapter.
Additional resources that you may find helpful include the following:
We hope this answers your question. If you have other questions about our host adapters or other Total Phase products, feel free to email us at sales@totalphase.com, or if you already own one of our devices and have a technical question, please submit a request for technical support.