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
Support Question of the Week: Using Aardvark Host Adapter and Control Center Software to Program Device Registers
Rena

Q:  I am using the Aardvark I2C/SPI Host Adapter and the Control Center software to read from and write to the registers of the target device, ADV7850. I could use help with the following:

  1. How do I set the device address and the sub-address that I am interested in writing or reading and also the value to write (during I2C writes).
  2. How should I write a script to control different sub-addresses?
  3. I tried the example in Knowledge Base Article: How to Read and Write to an I2C EEPROM Using the Aardvark adapter and Control Center , but it looks like I need to make some modifications to make this work for ADV7850. Can you help me with that?

A: Thanks for your question! Information is available online about how to program device registers with the Aardvark host adapter and Control Center, including Aardvark Getting Started and more Knowledge Base Articles.

You can use the Control Center batch mode to write an XML file for transferring I2C data to multiple sub-addresses. For additional information about the batch mode, please refer to the Control Center manual section 2.4.

Looking at the data sheet for ADV7850, we came up with the following steps for programming your device:

  1. Launch the Control Center Software.
  2. Click "Configure Aardvark Adapter" and choose "Aardvark Adapter".
  3. Click "Aardvark", select "I2C + SPI", and enable "I2C Pulls-Ups and Target Power".
  4. Click "Master".
  5. Enter 200 in Bit rate rectangular, and click "Set".
  6. Enter 0x20 in Slave Address rectangular (select target address 0x20).
  7. Disable 10-Bit Address and select "No Stop".
  8. Enter 0xC0 0x40 in the Message rectangular, and click "Master Write" (write to register address 0x0C data 0x40).
  9. Enable "No Stop".
  10. Enter 0x0C in the Message rectangular, and click "Master Write" (write to register address 0x0C).
  11. Disable "No Stop".
  12. Enter 1 in Number of Bytes rectangle.
  13. Click "Master Read", and verify that the read data is 0x40 (read data 0x40 from register address 0x0C).

The script has three transactions:

Transaction 1 is writing to register address 0x0C, data 0x40 (steps 7-8) .  This transaction has a stop bit. Before issuing this transaction, the Aardvark host adapter is configured to disable “No Stop”.

  • Start bit, Address 1-7 bits: 20, W/R 8 bit: 0, Acknowledgment: 0, Sub-address 1-8 bits: 0C, Acknowledgment: 0, Data 1-8 bits: 40, Acknowledgment: 0, Stop bit.
Transaction 2 is the first part of reading ADV7850 (steps 9-10). This transaction is Aardvark writing an operation to register address 0x0C. This transaction does not have a stop bit. Before issuing this transaction, the Aardvark is configured to enable “No Stop”.

  • Start bit, Address 1-7 bits: 20, W/R 8 bit: 0, Acknowledgment: 0, Sub-address 1-8 bits: 0C, Acknowledgment: 0
 Transaction 3 is the second part of reading ADV7850 (step 11-13). This transaction is the Aardvark reading from register address 0x0C of the data 0x40. This transaction has a stop bit. Before issuing this transaction, the Aardvark is configured to disable “No Stop”.

  • Start bit, Address 1-7 bits: 20, W/R 8 bit: 1, Acknowledgment: 0, Data 1-8 bits: 40, Acknowledgment: 0, Stop bit.

For more information, please see the following documents:

Aardvark I2C/SPI Host Adapter Data Sheet

Control Center Software

Product Selector Guide

We hope this answers your question. If you have other questions about our host adapters, software tools or other Total Phase products, feel free to email us at sales@totalphase.com  or support@totalphase.com.