I am using the Aardvark I2C/SPI Host Adapter with Aardvark Software API via Python and I need to communicate with registers. I noticed that the Python API supports functions aa_i2c_write and aa_i2c_read, which perform I2C Master write and I2C Master read respectively. Is there an API function to perform I2C Master register read?
Response from Technical Support:Thanks for your question! The Master Write-Read (also known as Master Register Read) is actually a combination of two I2C transactions, which is duplicated by calling these functions directly. There are two ways you can perform a register read, which are described below.
Using the NO_STOP flag on the write combines the two API calls into a single I2C transaction. Here is an example of a full I2C transaction:
You can achieve the same operation with two transactions; the only difference would be excluding the NO_STOP flag. In this case, the I2C transaction would look like this:
The Total Phase API bindings support Python 2.5 though to 3.6. Sample code is available, which can used as is, or customized for your specifications. For more information about Aardvark Software API, please refer to the API Document section of the Aardvark I2C/SPI Host Adapter User Manual. We also provide detailed examples of using API in our Software API Knowledge Base.
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, you can contact us at sales@totalphase.com. You can also request a demo that applies to your application.