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:12] – completion fluktuaciaen:i2c [Unknown date] (current) – external edit (Unknown date) 127.0.0.1
Line 1: Line 1:
-FIXME **This page is not fully translated, yet. Please help completing the translation.**\\ //(remove this paragraph once the translation is finished)// 
  
 ====== I²C bus as an MLAB's component ====== ====== I²C bus as an MLAB's component ======
Line 39: 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 54: Line 53:
 ==== USB HID ==== ==== USB HID ====
  
-For connections without the need for drivers designed for specific hardware [[http://en.wikipedia.org/wiki/USB_human_interface_device_class|USB HID]] specification can be used. MLAB has only one module that complies with this particular specification - [[cs:usbi2c|USBI2C01A]]. It can be operated using python or HIDAPI - see below.+For connections without the need for drivers designed for specific hardware [[http://en.wikipedia.org/wiki/USB_human_interface_device_class|USB HID]] specification can be used. MLAB has only one module that complies with this particular specification - [[en:usbi2c|USBI2C01A]]. It can be operated using python or HIDAPI - see below.
  
  
Line 63: Line 62:
 ==== Ethernet to I²C  ==== ==== Ethernet to I²C  ====
  
-This type of convertor can be constructed using [[cs:eth|ETH01A]] and [[cs:stm32f10xrxt|STM32F10xRxT01A]] modules and controlled by Pymlab software package (see below).+This type of convertor can be constructed using [[en:eth|ETH01A]] and [[en:stm32f10xrxt|STM32F10xRxT01A]] modules and controlled by Pymlab software package (see below).
  
 ===== I²C implementation in Linux systems ===== ===== I²C implementation in Linux systems =====
Line 89: Line 88:
   i2c-6 i2c        i2c-tiny-usb at bus 001 device 030 I2C adapter   i2c-6 i2c        i2c-tiny-usb at bus 001 device 030 I2C adapter
  
-Using //i2cdetect// software we can further search for I²C buses for example on [[cs:odroid-x2|Odroid-X2]], which has I²C output through GPIO.+Using //i2cdetect// software we can further search for I²C buses for example on [[en:odroid-x2|Odroid-X2]], which has I²C output through GPIO.
  
   kaklik@radio-arm-0:~$ sudo i2cdetect -y 1   kaklik@radio-arm-0:~$ sudo i2cdetect -y 1
Line 103: Line 102:
   kaklik@radio-arm-0:~$   kaklik@radio-arm-0:~$
  
-The output above shows, that apart from system device with 0x10 address, there are to additional devices connected to the bus: 0x1e ([[cs:mag|MAG01A]]) and 0x70 ([[cs:i2chub|I2CHUB02A]]).+The output above shows, that apart from system device with 0x10 address, there are to additional devices connected to the bus: 0x1e ([[en:mag|MAG01A]]) and 0x70 ([[en:i2chub|I2CHUB02A]]).
  
 ==== Communication with I²C devices ==== ==== Communication with I²C devices ====
Line 128: 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 +  $ sudo i2cget -y 1 0x70 
   0xff   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 =====
Line 138: Line 150:
 ===== Related sites ===== ===== Related sites =====
  
-  * [[cs:usbi2c]] +  * [[en:usbi2c]] 
-  * [[cs:i2c-pic-usb|I2C-PIC-USB]] - Konvertor I²C na USB s PIC +  * [[en:i2c-pic-usb|I2C-PIC-USB]] - Konvertor I²C na USB s PIC 
-  * [[cs:i2c_avr_usb|I2C-AVR-USB]] - Konvertor I²C na USB s AVR +  * [[en:i2c_avr_usb|I2C-AVR-USB]] - Konvertor I²C na USB s AVR 
-  * [[cs:arm|Procesory architektury ARM ve stavebnici MLAB]] +  * [[en:arm|Procesory architektury ARM ve stavebnici MLAB]] 
-  * [[cs:odroid-x2]] +  * [[en:odroid-x2]] 
-  * [[cs:friendlyarm]] +  * [[en:friendlyarm]] 
-  * [[cs:i2chub]] +  * [[en:i2chub]] 
-  * [[cs:pymlab]]+  * [[en:pymlab]]
en/i2c.1419156751.txt.gz · Last modified: 2014/12/21 10:12 (external edit)