How Can I Best Use the Aardvark I2C/SPI Host Adapter with an I2C Open Collector Slave Device?

Question from the Customer:

I am looking at the specifications and user manuals of the Aardvark I2C/SPI Host Adapter and Level Shifter Board, and I have some questions about these devices.

Is looks like the Aardvark adapter has 2 .2k pullup resistors connected to +3.3V. Are these resistors always active, or are they enabled by software, such as the MATLAB “i2c(‘Aardvark’)” function?

Is it possible for the Aardvark adapter and Level Shifter Board to be connected to an open collector I2C slave device, and the SDA/SCL lines are held high without a pullup resistor? In other words, can the pullup resisters be disabled?

Response from Technical Support:

Thanks for your questions! The Aardvark adapter has high resistance internal pull-up resisters that cannot be disabled in I2C mode. However, we have an option that could work for you. First, we will go over why the Aardvark adapter needs the pull-up resistors in I2C mode and then go over the methods for disabling pull-up resistors.

Why Aardvark Host Adapter Needs Pull-Ups in I2C Mode

There are two pull-up resistors in parallel on each line, 2.2k ohms and 100k ohm.

  • The 2.2k ohms resistors can be configured: turned on and off.
  • The 100K ohms resistors, which are extremely weak, cannot be turned on and off.

The 100K pull-up resistors are always active to ensure the signal lines are logic high when nothing is connected to those pins. Even if the pins are de-selected, the logic high state will continue. As the stronger 2.2k ohms resistors can be disabled, the Aardvark adapter in I2C mode may work for you; the logic high 100k ohms resistors have not created issues for many customers.

If you need logic low instead of logic high, you could add an external pull-down, about 20k ohms, to offset the weak internal pull-up. However, if having any pull-up resistor is an issue for your setup, we do have potential solutions for you.

Configuring Pull-Ups in GPIO Mode for Open Collector Devices

To fully disable the pull-up resistors, you can configure the Aardvark adapter to function in GPIO mode. There are two ways you can do that: with Control Center Serial Software or Aardvark Software API.

Disable Pull-Ups with GUI Software

  • To quickly try it out, you can manually change the configuration using Control Center Serial Software
  • For a long-term solution, you can instead use the Batch Mode. Here is a simple script that executes the I2C command and then enables GPIO mode with all the lines as inputs.
<!-- Configure for I2C and execute -->
<configure i2c="1" spi="0" gpio="0" tpower="0" pullups="1"/>
<i2c_bitrate khz="400"/>
<i2c_write addr="0x38" count="0" radix="16">FF</i2c_write>

<!-- Configure for GPIO to ensure pullups are disabled -->
<configure i2c="0" spi="0" gpio="1" tpower="0" pullups="0"/>
<gpio_config direction="0" pullups="0"/>

Disable Pull-Ups with API Script

You can also create a custom application with Aardvark Software API. This way, you can incorporate similar functionality to enable GPIO when not communicating via I2C. In addition to “writing from scratch”, functional scripts are provided with the API, which can be used as is or modified as needed for your setup.

Power Specifications

This section summarizes the power specifications of the Level Shifter Board and related devices.

Level Shifter Board Power Consumption

The Level Shifter Board does not have I2C pull-up resistors or an option to enable or disable I2C pull-ups.

  • The power consumption of the Level Shifter Board depends on its configuration. The board will draw approximately 6 mA from the Adapter/Analyzer side when configured to power the target device, and approximately 4 mA when the target is supplying its own power.
  • The current draw of the Level Shifter Board on the target side is only applicable when the target device is supplying power to the board. This current draw will be approximately 1 mA.

I2C Power Sourcing

This section includes information about other devices that support I2C protocols: the Cheetah SPI Host Adapter and the Beagle I2C/SPI Protocol Analyzer.

Source Power to I2C Target Devices

  • The Aardvark adapter, Cheetah SPI adapter, and Beagle I2C/SPI analyzer can each provide up to 25 mA to the target device through each of the +5V/NC pins.
  • If you use one of the Total Phase I2C/SPI devices (Aardvark adapter, Cheetah adapter, or Beagle i2C/SPI analyzer), then the TPWR signal (on the Level Shifter Board EXT TGT connector) can provide max 22 mA and 3.3V signal can provide max 22 mA.

Source or Current to Target Device Signal Pins

  • The Aardvark and Cheetah adapters can each provide up to 10 mA current source or sink to the target device through each of the I2C/SPI signals.

We hope this answers your questions. Additional resources that you may find helpful include the following:

If you want more information, feel free to contact us with your questions, or request a demo that applies to your application.