I2C is a hardware thing and is not standardly available on desktop (including laptop) style computers.

It is available on most Desktops and Laptops, but most people do not know. If your computer supports EDID (monitor detection), it uses I²C (see DDC2). It is available on most VGA connectors (pins 12 and 15), on all HDMI connectors (pins 15 and 16) , on all DVI Ports (pins 6 and 7) - but not on DisplayPort connectors. How? Your monitor contains a tiny I²C EEPROM (or some hardware that emulates that EEPROM) with information about the monitor. And the graphic adapter uses I²C on the two pins to read that EEPROM.

Yes, that I²C port is a little bit hard to use, as you need some cooperation from the graphics card, but it is I²C. At least for Linux, there are some driver hacks to make the I²C port on the graphics card usable for any I²C device.

I²C can also be used in laptops for HID devices, typically for keyboard and/or touchpad or trackpoint. That's almost completely transparent, because the chipset and/or the drivers hide that interface.

Furthermore, SMbus, used to detect RAM modules, to control fans, to talk with laptop batteries, and to measure temperature and voltages, is also an I²C bus with slightly stricter rules and some extended features.


Some FDTI USB to RS232 chips (e.g. FT232H) can also be repurposed to talk SPI or I²C, using the official FTDI drivers.

Alexander

--
Today I will gladly share my knowledge and experience, for there are no sweeter words than "I told you so". ;-)

In reply to Re^2: perl to I2C by afoken
in thread perl to I2C by mbcc

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.