37

What is the difference between the I2C and TWI interfaces? Wikipedia says that TWI is variant of I2C. Some other sources says that only name is different.

psmears
  • 678
  • 4
  • 6

3 Answers3

33

I agree with everything @Wouter said... Namely, TWI is used by manufacturers (like Atmel) to refer to their I2C interface to avoid legal trouble with Philips since I2C is a registered trademark. Some manufacturers (like Atmel) have implemented proprietary features on top of I2C so that their TWI is an I2C superset.

To answer your follow-up question, yes. It is enough just to change the name. A trademark only protects the name. If it were patented, the situation would be different.

However, it is difficult to defend a patent on a modulation/encoding scheme since it is mostly just math. Often, copyright is used for this, but it is usually pretty easy to circumvent, since the copyright protects only the exact specific instantiation (implementation) of the protocol, not the protocol itself in most cases.

DrFriedParts
  • 12,482
  • 36
  • 54
  • 1
    I would think that some aspects of I2C's handshaking would be novel enough to merit patent protection, though things like EEPROMs that don't use handshaking may not use any patent-worthy features. As for I2C extensions, one I've wished for would be the ability for slave devices to engage in arbitration in something like the same way masters do (a slave which tries to output a "1" while another slave is outputting a "0" should signals a lost arbitration and drops out for the remainder of that byte) [the high-level protocol would decide at what point the slave could rejoin]. – supercat Dec 11 '12 at 00:17
  • 1
    Given such a feature, it would be easy for an arbitrary number of devices with e.g. 64-bit ID numbers to have their identities read out (easier than with 1wire). Have a "start reading IDs" device address, and then have each device output an 8-byte of ID (dropping out if it loses arbitration), and have each device which hasn't successfully output its ID rejoin every 8 bytes. The master would thus read out every device's ID, in numerical order, ending with all FF's once all devices were done. – supercat Dec 11 '12 at 00:21
  • 1
    @supercat And if it were patented, it would prevent other manufacturers from using it for low cost product. It would be another nightmare for users. – JB. Dec 30 '15 at 17:58
  • @JB.: I suspect that I2C disallows slave arbitration because it might make it impossible for bus tranceivers to reliably figure out what was going on, but for buses that don't use such tranceivers such arbitration could sure make things nice. – supercat Dec 30 '15 at 18:42
12

From i2c-bus.org:

TWI stands for Two Wire Interface and this bus is identical to I²C. The name TWI was introduced by Atmel and other companies to avoid conflicts with trademark issues related to I²C. A description of the capabilities of TWI interfaces can be found in the data sheets of corresponding devices. Expect TWI devices to be compatible to I²C devices except for some particularities like general broadcast or 10 bit addressing.

Also, for now, there is also no TWI high speed mode.

If you have an I²C analyser it will work with a TWI set-up as well without modifications.

Dave Tweed
  • 168,369
  • 17
  • 228
  • 393
2

TWI devices typically don't conform completely to the I2C specification.

Notably, clock stretching is usually not supported.

Dave Null
  • 21
  • 1
  • Such as, if my memory serves me correctly, the Raspberry Pi's I²C interface provided by the Broadcomm SoC at it's heart... – SlySven Dec 13 '18 at 04:37