User Tools

Site Tools


en:i2c

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
en:i2c [2014/12/21 10:18] kakliken:i2c [Unknown date] (current) – external edit (Unknown date) 127.0.0.1
Line 38: Line 38:
 ===== Convertors to connect I²C to PC ===== ===== Convertors to connect I²C to PC =====
  
-Although I²C is quite popular bus suitable to connect different sensors over short distances, it is not usually found and readily available on regular computers with exception of [[http://www.paintyourdragon.com/?p=43|DCC leading out of free display port.]]+Although I²C is quite popular bus suitable to connect different sensors over short distances, it is not usually found and readily available on regular computers. (([[http://www.paintyourdragon.com/?p=43|with exception of DCC leading out at free display port.]]))
  
 ==== USB interface ==== ==== USB interface ====
Line 127: Line 127:
 Reading from I²CHub is atypical as well, because the data registry is not addressed:  Reading from I²CHub is atypical as well, because the data registry is not addressed: 
  
-  $ sudo i2cget -y 1 0x70 0xff+  $ sudo i2cget -y 1 0x70  
 +  0xff
  
 +==== Use of Linux kernel drivers ====
 +
 +Some I²C devices have their drivers directly in the linux kernel allowing an access directly through file system. It applies to following MLAB modules:
 +
 +  * [[en:usbi2c]]
 +  * [[en:i2chub]]
 +  * [[en:i2cspi]]
 +
 +Due to the fact that, in principle, I²C is not a [[http://en.wikipedia.org/wiki/Plug_and_play|plug-and-play]] bus, every connected device must be explicitly reported to the kernel. A general procedure of such connection is via a following command: 
 +
 +  echo driver's_name i2c_adresa > /sys/bus/i2c/devices/i2c-X/new_device
 +
 +Linux kernel will take control of I²C device - such state can be seen in i2cdetect list labeled as UU. Details concerning the initialisation can be further found in [[http://en.wikipedia.org/wiki/Dmesg|dmesg]].
  
 ===== Other operating systems ===== ===== Other operating systems =====
en/i2c.txt · Last modified: 2014/12/21 10:42 (external edit)