Aardvark I2C/SPI Host Adapter Data Sheet v5.00

2 Hardware Specifications

2.1 Pinouts

Connector Specification

The ribbon cable connector is a standard 0.100” (2.54mm) pitch IDC type connector. This connector will mate with a standard keyed boxed header.

Alternatively, a split cable is available which connects to the ribbon cable and provides individual leads for each pin.

Orientation

The ribbon cable pin order follows the standard convention. The red line indicates the first position. When looking at your Aardvark adapter in the upright position (figure 5), pin 1 is in the top left corner and pin 10 is in the bottom right corner.

\includegraphics[clip=true,scale=0.5]{cable-01}
Figure 5: The Aardvark I2C/SPI Host Adapter in the upright position.
Pin 1 is located in the upper left corner of the connector and Pin 10 is located in the lower right corner of the connector.

If you flip your Aardvark adapter over (figure 6) such that the text on the serial number label is in the proper upright position, the pin order is as shown in the following diagram.

\includegraphics[clip=true,scale=0.5]{cable-02}
Figure 6: The Aardvark I2C/SPI Host Adapter in the upside down position.
Pin 1 is located in the lower left corner of the connector and Pin 10 is located in the upper right corner of the connector.

Order of Leads

  1. SCL

  2. GND

  3. SDA

  4. NC/+5V

  5. MISO

  6. NC/+5V

  7. SCLK

  8. MOSI

  9. SS

  10. GND

Ground

GND (Pin 2):
GND (Pin 10):

It is imperative that the Aardvark adapter be on a common ground with the target system. If the grounds are not connected, the signaling is entirely unpredictable and communication will likely be corrupted. Two pins are connected to provide a solid ground path.

I2C Pins

SCL (Pin 1):

Serial Clock line – the signal used to synchronize communication between the master and the slave.

SDA (Pin 3):

Serial Data line – the signal used to transfer data between the transmitter and the receiver.

SPI Pins

SCLK (Pin 7):

Serial Clock – control line that is driven by the master and regulates the flow of the data bits.

MOSI (Pin 8):

Master Out Slave In – this data line supplies output data from the master which is shifted into the slave.

MISO (Pin 5):

Master In Slave Out – this data line supplies the output data from the slave to the input of the master.

SS (Pin 9):

Slave Select – control line that allows slaves to be turned on and off via hardware control.

Powering Downstream Devices

It is possible to power a downstream target, such as an I2C or SPI EEPROM with the Aardvark adapter’s power (which is provided by the USB port). It is ideal if the downstream device does not consume more than 20–30 mA. The Aardvark adapter is compatible with USB hubs as well as USB host controllers (see section below on USB compliance). USB hubs are technically only rated to provide 100 mA per USB device. If the Aardvark adapter is directly plugged into a USB host controller, it can theoretically draw up to 500 mA total, leaving approximately 400 mA for any downstream target. However, the Aardvark adapter always reports itself to the host as a low-power device (<100 mA). Therefore, drawing large amounts of current from the host is not advisable.

NC/+5V (Pin 4): I2C Power
NC/+5V (Pin 6): SPI Power

By default, these pins are left unconnected at the time of shipping. For hardware versions 2.00 and greater, these pins are switched through the software API. A maximum of 50 mA may be drawn from each pin.

For hardware versions prior to 2.00, power cannot be supplied unless the appropriate jumpers are connected inside the Aardvark unit. To connect VDD to pins 4 and 6, connect jumpers J301 and J302.

Opening your Aardvark unit will void any hardware warranty. Any modifications are at the user’s own risk.

2.2 Signal Levels/Voltage Ratings

Logic High Levels

All signal levels are nominally 3.3 volts (+/- 10%) logic high. This allows the Aardvark adapter to be used with both TTL and CMOS logic level devices. A logic high of 3.3 volts will be adequate for TTL-compliant devices since such devices are ordinarily specified to accept logic high inputs above approximately 3 volts.

ESD protection

The Aardvark adapter has built-in electrostatic discharge protection to prevent damage to the unit from high voltage static electricity.

Input Current

All inputs are high-impedance so the input current is approximately 1 µA.

Drive Current

The Aardvark adapter can drive all output signals with a maximum of 10 mA current source or sink. It may be possible to exceed this for short periods of time, but drawing more than 20 mA may damage the I/O buffers.

2.3 I2C Signaling Characteristics

Speed

As of hardware version 3.00, the Aardvark I2C master can operate at a maximum bitrate of 800 kbps and supports many intermediate bitrates between 1 kHz and the maximum. The power-on default bitrate is for the I2C master unit is 100 kbps.

For slave functionality, the Aardvark adapter can operate at any rate less than the maximum bitrate of 800 kbps.

For hardware versions before 3.00, the maximum I2C master bitrate is 663 kbps and the maximum I2C slave bitrate is 595 kbps.

It is not possible to send bytes at a throughput of exactly 1/8 times the bitrate. The I2C protocol requires that 9 bits are sent for every 8 bits of data. There is also a finite time required to setup a byte transmission. In the development of the Aardvark adapter, many optimizations have been employed to decrease this setup time. This allows byte throughputs within each transaction to be very close to the theoretical maximum byte throughput of 1/9 the bitrate.

There can be extra overhead introduced by the operating system between calls to the Aardvark API. These delays will further reduce the overall throughput across multiple transactions. To achieve the fastest throughput, it is advisable to send as many bytes as possible in a single transaction (i.e., a single call to the Aardvark API).

Pull-up Resistors

There is a 2.2K resistor on each I2C line (SCL, SDA). The lines are effectively pulled up to 3.3V, resulting in approximately 1.5 mA of pull-up current. If the Aardvark adapter is connected to an I2C bus that also includes pull-up resisters, the total pull-up current could be potentially larger. The I2C specification allows for a maximum of 3 mA pull-up current on each I2C line.

A good rule of thumb is that if a downstream I2C device can sink more than 5 mA of current, the protocol should operate properly. Stronger pull-up resistors and larger sink currents may be required for fast bitrates, especially if there is a large amount of capacitance on the bus. The Aardvark device is able to sink approximately 10 mA, so it is possible to have two Aardvark devices communicate with each other as master and slave, with both devices’ pull-up resistors enabled.

Hardware versions 2.00 and later have the ability to switch the pull-up resistors by through the software API. Refer to the API section for more details.

I2C Clock Stretching

When the Aardvark adapter is configured as an I2C master, it supports both inter-bit and inter-byte slave clock-stretching. If a slave device pulls SCL low during a transaction, the adapter will wait until SCL has been released before continuing with the transaction.

Known I2C Limitations

Since firmware version 2.00, the Aardvark adapter supports the repeated start, 10-bit addressing, and combined format features of the I2C protocol.

Since firmware version 3.00, the Aardvark adapter can keep the slave functions enabled even while master operations are executed through the same adapter. The Aardvark adapter can even respond to slave requests immediately after losing bus arbitration during the slave addressing phase of a master transaction.

Multi-master is also supported with the following features:

  1. If there is a bus collision during data transmission and the Aardvark adapter loses the bus, the transaction will be be cut short and the host API will report that fewer bytes were transmitted than the requested number. This condition can be distinguished from the case in which the downstream slave cuts short the transmission by sending a NACK by using the function aa_i2c_read_ext.

  2. Collisions are not detected in the following situations:

    • Between a REPEATED START condition and a data bit

    • Between a STOP condition and a data bit

    • Between a REPEATED START and a STOP condition

This constraint can be phrased in a different manner. Say that I2C master device A has a packet length of X bytes. If there is a second I2C master device, B, that sends packets of length greater than X bytes, the first X bytes should never contain exactly the same data as the data sent by device A. Otherwise the results of the arbitration will be undefined.

This is a constraint found with most I2C master devices used in a multi-master environment.

2.4 SPI Signaling Characteristics

SPI Waveforms

The SPI signaling is characterized by the waveforms in Figures 7 and 8.

\includegraphics[clip=true]{spi-03}
Figure 7: SPI Waveform
Three different times are of note: t 1 , time from the assertion of SS# to the first clock cycle; t 2 , time from the last clock cycle and the deassertion of SS#; t p , clock period.

\includegraphics[clip=true]{spi-04}
Figure 8: SPI Byte Timing
t d is the setup time between SPI bytes and t b is the total byte-to-byte time.

Table 1: SPI Timing Parameters

Symbol

Parameter

Min

Max

Units

t 1

SS# assertion to first clock

10

20

µs

t 2

Last clock to SS# deassertion

5

10

µs

t p

Clock period

125

8000

ns

t d

Setup time (Master)

7

9

µs

t d

Setup time (Slave)

4

n/a

µs

t b

Time between start of bytes (Slave)

10

n/a

µs

Speeds

The Aardvark SPI master can operate at bitrates of 125 kHz, 250 kHz, 500 kHz, 1 MHz, 2 MHz, 4 MHz, and 8 MHz. The power-on default bitrate is 1 MHz. The quoted bitrates are only achievable within each individual byte and does not extend across bytes. There is approximately 9 µs of setup time required in between each byte which results in a total transmission period of the byte transmission time plus 9 µs.

The Aardvark SPI slave can operate at any bitrate up to 4 Mbps. However, for correct transmission from slave to master there must be at least 4 µs delay between the end of byte n and start of byte n+1 for the MISO data to be setup properly for byte n+1. Otherwise, the Aardvark adapter will simply return the data it just received. Likewise, for correct reception of data by the slave, there must be at least 10 µs between the start of byte n and the start of byte n+1.

Similarly, when the Aardvark adapter is configured to act as an SPI slave, and the slave select is pulled high to indicate the end of a transaction, there is a data processing overhead of sending the transaction to the PC host. As such, if the SPI master sends a subsequent transaction in rapid succession to the Aardvark slave, the data received by the Aardvark slave may be corrupted. There is no precise value for this minimum inter-transaction time, but a suggested spacing is approximately 100–200 µs.

Pin Driving

When the SPI interface is activated as a master, the slave select line (SS) is actively driven low. The MOSI and SCK lines are driven as appropriate for the SPI mode. After each transmission is complete, these lines are returned to a high impedance state. This feature allows the Aardvark adapter, following a transaction as a master SPI device, to be then reconnected to another SPI environment as a slave. The Aardvark adapter will not fight the master lines in the new environment.

Consequently, any SPI slave target to which the Aardvark adapter is interfaced must have a pull-up resistor on its slave select line, preventing fluttering of the voltage when the Aardvark adapter stops driving the signal. It is also advisable that every slave also have passive pull-ups on the MOSI and SCK lines. These pull-up resistors can be relatively weak — 100k should be adequate.

As a slave, the MOSI, SCK, and SS lines are configured as an input and the MISO line is configured as an output. This configuration is held as long as the slave mode is enabled (see the API documentation later in the datasheet).

Known SPI Limitations

There is currently an issue with SPI mode 2 (clock idles high, and sampling of MOSI is on the leading edge) that induces periodic bit corruptions in the most significant bit of certain bytes. The bug has been noted for SPI slave devices and there may also be corruptions when using this mode for sending or receiving messages as an SPI master. Unfortunately there is no fix for this problem and the best solution is to use another mode. If you have any questions regarding this issue please contact Total Phase support.

It is only possible to reliably send and receive transactions of 4 KiB or less as an SPI master or slave. This is due to operating system issues and the full-duplex nature of the SPI signaling.

Aardvark Device Power Consumption

The Aardvark adapter consumes less than 100 mA of current. This is within the USB 1.1 current specification for devices powered from a USB host adapter (500 mA maximum per device) or a USB hub (100 mA maximum per device).

2.5 USB 1.1 Compliance

The Aardvark adapter is USB 1.1 compliant and will also operate as a full speed (12 Mbps) device on a USB 2.0 hub or host controller

2.6 Temperature Specifications

The Aardvark device is designed to be operated at room temperature (10–35° C). The electronic components are rated for standard commercial specifications (0–70° C). However, the plastic housing, along with the ribbon and USB cables, may not withstand the higher end of this range. Any use of the Aardvark device outside the room temperature specification will void the hardware warranty.

© 2008 Total Phase, Inc. All rights reserved.
Terms of Use | Privacy Notice
HOME | PRODUCTS | SALES | SUPPORT | COMPANY | CONTACT