I2C SPI USB CAN eSPI Cable Testing View All Videos Quick Start Guides Software Downloads App Notes White Papers User Manuals Knowledge Base Sales Support About Us
Products Blog Sales Support Contact Search
Using the Aardvark I2C/SPI Host Adapter, How Do I a Perform "Master Register Read" in Batch Mode?
Rena

Question from the Customer:

I am using the Aardvark I2C/SPI Host Adapter with the Control Center Serial Software. In the I2C Control section, I see that I can easily perform a "Master Register Read". I observe writes to a device register and then a read with the number of bytes specified in the Number of Data Bytes field. How can I do this in batch mode?

Response from Technical Support:

Thanks for your question! The following information about the Control Center Serial Software read commands may be helpful to you:

  • The Control Center Serial I2C/SPI mode has a "Master Read Register" command that provides I2C write with no stop, and then an I2C read with stop.

    Control Center Serial Software with Master Register Read Figure 1 - Control Center Serial Software with Master Register Read

     

  • The Control Center Serial Batch mode has "nostop" parameter, write command, and read command. However, the Control Center Serial Batch mode does not have a "Master Read Register" command.

    Control Center Serial Software in Batch Mode Figure 2: Control Center Serial Software in Batch Mode

However, in batch mode, you can implement the register read by using the following two operations:

  1. I2C write with no stop
  2. I2C read with stop

The example below reads four bytes at 100 KHz from the I2C slave address 0x50 register address 08, with the Control Center Serial Software set in Batch Mode:

<aardvark>

<configure i2c="1" spi="1" gpio="0" tpower="1" pullups="1"/>

<i2c_bitrate khz="100"/>

<i2c_write addr="0x50" count="1" radix="16" nostop="1">08</i2c_write>

<i2c_read addr="0x50" count="4"/>

</aardvark>

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.