I2c Studio,I2C technology and applications

Setup fails with error code 0x80070666

If the telos I2C Studio installation fails with error code 0x80070666 deinstall previous telos I2C Studio versions and reboot. Then have another try, please.

Otherwise, if this error occures although I2C Studio is not installed on your computer, please deinstall the “Visual Studio C++ 2015 Redistributable” via “Control Panel|Software” and then run the Setup again.

Bitrate Resolution in High-Speed Mode

The I2C Studio GUI does not allow setting the bitrate for high-speed mode to arbitrary values. How can I set other values?
The Negative Tester hardware uses a time resolution of 40 ns. The bitrate can be set to the discrete values: 25 MHz/7, 25 MHz/8, …

Add Test Cases the I2C Studio

Can I add my own test cases into the I2C Studio GUI for the Negative Tester?
Typically the users of the Negative Tester are using the GUI for their first tests. Afterwards the customers typically write the own test cases use the I2C APIs. Most users integrate these test cases into their own testing framework, which communicates with the Negative Tester on one side and with the DUT on the other side.

Multiple I2C Studio Versions

Can I install two I2C Studio versions or I2C Frameworks in parallel on one system?
This is not possible, because different I2C Studio versions are using different Windows drivers and Windows services. They cannot be installed and used in parallel.

Registration Code Missing

I have bought a new Tracii XL 2.0 and have not received a registration code for my device. Where can I find my registration code?
You do not need a registration code for a new device. These codes are used only to unlock features, which you have bought later on.

Script Error

When starting I2C Studio I am getting script errors. What does that mean?
These error are reported by the Internet Explorer, which is used by I2C Studio. Please install a newer version of the Internet Explorer on your system or update I2C Studio to at least version 5.9.

Labview DLL

When using the I2C.Labview API Labview asks for the path of the i2capi_dotnet_labview.dll. Where can I find the DLL?
Normally Labview should find these DLLs automatically. There are stored in the Windows assembly caches. There is one assembly cache for .NET 2.0 and one for .NET 4.0.

I2C.NET API for .NET 2.0 and .NET 4.0

There are two versions of the I2C.NET API: i2capi_dotnet_net20.dll and i2capi_dotnet_net40.dll. Which one should I use?
This depends on the used runtime environment. Applications using .NET 2.0, NET 3.0, or NET 3.5 should use the i2capi_dotnet_net20.dll. For .NET 4.0, NET 4.5, and .NET 4.6 you will need the i2capi_dotnet_net40.dll.

Linux Support

Do you offer an I2C API for Linux?What does that mean?
Due to the limited demand there is no special Linux support available. You can use a virtual machine running Windows on a Linux host system.

I2C Studio Without Network

I am using I2C Studio on a PC without an Internet connection. I2C Studio starts unexpectedly slow. During the start-up my PC tries to connect “crl.globalsign.net”.
All executables of I2C Studio have been signed with a digital signature. This digital signature has been issued by Globalsign. Windows tries to read the “Certificate Revocation List” from the CRL server of Globalsign.
This default behaviour of Windows can be disabled using the “Internet Explorer”. Go to “Tools/Internet Options” and choose the “Advanced” tab page. Here you can change this behaviour with the check box “Check for publisher’s certificate revocation”.

I2C Scheduler Does Not Respond

When I try to open a new window in I2C Studio I get an error message like “I2C scheduler does not respond”. What is the I2C scheduler and what is the reason for the I2C scheduler not to answer request of I2C Studio?
I2C Studio does not communicate directly with the drivers of the I2C boards. Instead I2C Studio communicates with the I2C scheduler. The I2C scheduler acts as a kind of multiplexer/demultiplexer (connects I2C boards and I2C software clients).
I2C Studio and the I2C scheduler are using a TCP/IP connection (local loopback device, port 3000) for the communication. Maybe there is a firewall software on your PC which blocks this TCP port and makes it impossible for I2C Studio to communicate with the I2C Scheduler. Another reason could be another process, which uses the same TCP port.You could use a tool like TCPView  to monitor the used TCP ports.

I2C Address Dialog For Entering I2C Addresses

When entering addresses in I2C address fields a dialog pops-up providing different kinds of I2C address formats as 7, 8, 10 bit in decimal / hex or binary notation.
To supress the pop-up please click the checkbox in the dialog. To re-enable it use the checkbox in the I2C Studio-options accessible from the toolbar via “Options/I2C Studio”.

How Do I Capture NAKs From Tracii XL And Resume Program?

I want to keep track of the number of NAKs returned from our test board via the Tracii XL. Currently an exception is thrown and the program exits. I need to be able to detect a NAK, increment a counter, and then return to the program where it left off. I do not want it to exit because I want to know how many NAKs I get after 1000 writes and reads. How do I do this?
You simply have to use the try/catch commands of C++ or C#. You can increment a counter in the catch handler. 
How do I exit the catch without exiting the program? I want to catch the NAK, increment the counter, and then try again. Can I use a goto statement? I am not familiar with object oriented programming. I prefer in-line code like C and assembly. They are much more straight forward. 
As most software is written today using OOP languages, we do not support ANSI C.
I would recommend to have a look into a C++ book for beginners. Maybe Bruce Eckel's free “Thinking in C++” book could be interesting for you:
http://mindview.net/Books/TICPP/ThinkingInCPP2e.html

Running C++ In The I2C Studio Script

I am not familiar with C# nor .NET code. I know C and assembly only.I need example I2C code written with the I2C Studio script that communicates with the Tracii XL at various bitrates between 100K and 105K and writes/reads 16 bytes for 1000 loops and keeps track of NAKs and displays the results.Are there any examples that I can use?
If you know C, I would recommend to use the C++ API of our products.
There are examples in the documentation (in the installation directory). I would recommend to have a look to the master example.

Can I Expect 50-50 Duty Cycle ?

There is a 14.5 microsecond pulse width between the 8th data bit and acknowledge bit at 100 KHz when it should be 5 microseconds. It was said that this bug will be taken care of in the next release.
This is *not* a bug. The behaviour of Tracii XL conforms to the I2C specification. The I2C bus does not guarantee an exact timing for the clock.

How To Set A Valid Bitrate?

I have a Tracii XL hooked up to I2C Studio.
Running C# .NET scipt I set the master.Bitrate = 105260;

I then get the following message:

Error: The specified bitrate is not valid.
Error: Unhandled Exception: System.Exception: Please call Board::Dispose to destroy a Board object.
at telos.I2cApi.DotNet.Board.Finalize()

This is a valid bitrate for the Tracii XL, so why do I get an error message?

Please, read the I2C.NET API documentation.
The HardwareInfo::master_sampling_rate array list does *not* contain the value “105260”. So it is not a valid speed for the XL hardware. You could use for example “105263” with Tracii XL.
Why do we not list all the possible bitrates?
Well, there are up to 2^16 valid values and these values depend on the used I2C board. All valid values for a board are stored in the mentioned variable. So output the variable and you have the bitrates you can use.

How Do I Determine If NAKs Are Returned From The I2C Bus?

Using I2C.NET, when communicating to the I2C bus, I need to determine if a NAK (not acknowledged) has returned, how do I test for this condition?
You will get an exception, if the API cannot transmit or receive all bytes due to a NACK. So add a try/catch block to your code.

How Do I Compile C++ Using I2C Studio Script?

I cut and pasted the MasterExample.cpp to the Script portion of I2C Studio and I get an error message “CS1024: Preprocessor directive expected.” What do I need to do in order to get this to work?
You cannot use C++ code (*.cpp) in the script window of I2C Studio. You have to use the C# language. Please use the examples of the I2C.NET API (*.cs).

What Are The Values Associated With Bitrate Using I2C.NET?

I need to be able to set the I2C bitrate between 100000 and 110000, but I get an invlaid master.bitrate when I run the MasterExample.cs code with anything other than 100000. What are all the possible I2C bitrates? Why are they not the same as those used in I2C Studio?
The possible values for the bitrate depend on the used telos I2C Interface. The possible values can be determined using the “HardwareInfo” object, which can be received using the Board.HardwareInfoOfOpenBoard property.
All bitrates are stored in the master_sampling_rate array list (see documentation of I2C.NET API)
I am using telos Tracii XL 2.0. There is no documentation for the master_sampling_rate that came with the I2C Studio. There is just this code sample:

Constructor & Destructor Documentation
HardwareInfo::HardwareInfo ( )
Constructor

There is no list bitrates, where can I find it?

Please go to the start menu of windows and open “Programm/I2C Studio/API/I2C.NET API”. This document describes the complete API. Simply search for “master_sampling_rate” in the documentation.

How Do I Do Conditional Testing With I2C Studio?

How do I do conditional testing with I2C Studio? I need to constantly read an address from the I2C and I want to halt when the data changes. How can I do this?
I would recommend to use the script functionality of I2C Studio. Please have a look into the I2C.NET API documentation, which can be found in the start menu.

Where Can I Download Examples Of Script Code?

Where can I download examples of Script code such the the ones listed in the I2C Studio user manual (MasterExample.cs)?
You can find all examples described in the manual as files in the installation directory of I2C Studio. A link to this directory can be found in the start menu entry of I2C Studio.

How Do I Add A Loop To The Command Tree?

How do I add a loop to the Command Tree so as to constantly execute a series of I2C commands and messages over and over again?
At the moment this can be done using a script. Sending master messages with a script and the I2C.NET API is quite simply.

Just Like I2C – The TWI Bus

The two wire interface (TWI) is used by several companies including Atmel. Even though this is not officially mentioned, the two buses are compatible with respect to practical use. Since the I2C name and logo are protected by Philips, the “new” name might have been choosen for non-technical reasons. In addition, the I2C specification includes a number of features which are rarely used e.g. 10-bit addressing, general call etc. The TWI cores may not support these features.
We found that there are no problems related to connecting EEPROMs, digital potentiometers and other slave devices to an Atmel TWI-enabled microcontroller. It is also possible to use telos Tracii XL to monitor the TWI traffic.

I2C Cables: The Shorter The Better

The shorter the better – some suggestions on I2C cable length

The I2C bus can be used for on-board communication as well as for talking to externally connected devices. In the latter case a cable is used to connect the two or more ICs involved in that communication and one frequent question we receive is: “What is the maximum cable length for this purpose?”

There is no such thing as an absolute maximum distance between two I2C bus devices, however, there are two major considerations.

Capacitance

The I2C specification defines a maximum capacitance depending on transmission speed. Up to 1.7 MHz (which is well in the high-speed range) this maximum is at 400 pF. This limit drops dramatically at higher speeds.

Our experience shows that these ratings are not just safety suggestions, but hard limits. 400 pF is not that much if you keep in mind that each and every component connected to the bus adds to this “pollution”. Yes, even connectors and cables.

You can buy a round cable with approx. 40 pF per meter and this is about as good as you can get. In other words, one meter of cable brings you 10 % closer toward the absolute limit.
If you consider that 100 to 200 pF are easily added by typical I2C components (controllers, radio and TV chassis etc.), it is obvious that the cable length is a critical factor in communication.

I2C Protocol

Unlike other bus systems like CAN the I2C bus does not provide error checking and/or recovery mechanisms making it necessary to implement this functionality in higher protocol layers.
This often means in practice to read back the contents previously written to a device and checking for equal values.
If such a test fails, it means that considerable writing and reading needs to be repeated.
This may be fatal in a time-critical environment. Therefore, it is wise to calculate a generous safety margin when it comes to electrical limits.
Long cables are frequently subject to EMC influence and should therefore be avoided whenever possible.

As a rule of thumb I2C cables should be as short as possible but not longer than one meter.
By the way: telos Tracii XL has been designed for low capacitance and adds only 50 pF to the bus.

For lab environments where occasional errors are acceptable we heard of set-ups with 4 meters of cable length. This is certainly not advisable.

We recommend to use USB devices like telos Tracii XL 2.0 or telos Connii MM 2.0 in conjunction with an active USB extension if you need to place your I2C equipment apart from the PC. With this method you can easily reach 5 to 7 metres and there are even solutions for 50 meters.