User Tools

Site Tools

Translations of this page?:

en:i2cspi

I²C SLAVE to SPI Master converter

The module allows controling of SPI devices by I²C bus. Therefore is possible to control SPI devices trought Pymlab library.

Basic features

  • I²C-bus slave interface operating up to 400 kHz
  • SPI master operating up to 1.8 Mbit/s
  • 200-byte data buffer
  • Up to four slave select outputs
  • Up to four programmable I/O pins
  • Operating supply voltage: 2.4 V to 3.6 V
  • Low power mode
  • Internal oscillator option
  • Active LOW interrupt output

I²C Adderess selection

I²C address can be selected from several addresses by jumpers configuration or by placement of resistors soldered on PCB. If configuration of addess is changed, the new adderess will by active after power-on reset.

Usage of module

The module is connected to the I²C bus by standard MLAB pinheader connector. If connected propertly the module can be seen by i2cdetect utility. I2CSPI module is present at bus with address 0x2E.

odroid@odroid:~$ sudo i2cdetect -y 4
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:          -- -- -- -- -- -- -- -- -- -- -- -- -- 
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- 2e -- 
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
70: 70 -- -- -- -- -- -- --                         
odroid@odroid:~$

Pymlab library

Converter module can be controlled from Python by Pymlab library. It allows connection to the USB to I2C converter thus the control is possible from every system by HIDAPI standard. An example of use SPI communication over I²C is prepared in library sources. The example uses barometric altimeter module ALTIMET with SPI variant of sensor MPL115A1.

 Connection of SPI version of ALTIMET sensor to I²C bus.

en/i2cspi.txt · Last modified: 2015/03/05 19:35 (external edit)