How to Use Devantech USB to I2C SPI and Serial Interface for Your Projects
If you are looking for a low-cost and versatile module that can communicate with I2C, SPI and serial buses from a USB port, you might want to check out the Devantech USB to I2C SPI and Serial Interface. This module is an enhanced version of the Devantech USB to I2C Interface Module, which has a simple command set and can interface with any I2C device. The Devantech USB to I2C SPI and Serial Interface can also connect to SPI and serial devices, as well as digital I/O and analog inputs. It has a built-in bootloader that allows easy user updates, and it can operate from 3.3V or 5V. In this article, we will show you how to use this module for your projects.
What You Need
To use the Devantech USB to I2C SPI and Serial Interface, you will need the following items:
The module itself, which you can buy from RobotShop or Acroname.[^1^] [^2^]
A USB cable type A to B, which is usually included with the module.
A computer with a USB port and an operating system that supports the module. The module is compatible with Windows, Mac OS X, and Linux-based operating systems. For Windows, you will need to install a driver that you can download from here.[^1^]
An I2C, SPI or serial device that you want to communicate with. For example, you can use the Devantech SRF08 Ultrasonic Range Finder, which combines with the module to make a complete USB self-powered ultrasonic ranger.[^1^]
Some jumper wires and a breadboard to connect the module and the device.
How to Connect
The Devantech USB to I2C SPI and Serial Interface has 10 pins that can be used for different purposes depending on the mode of operation. The pinout is shown below:
The power link jumper determines whether the module operates from 5V or 3.3V. With the jumper on, the module is powered via USB and can supply up to 80mA at 5V for external circuitry. With the jumper off, a 3.3V regulator supplies the power and can provide up to 30mA for external devices. Do not apply your own voltage to this pin.
The bootloader link jumper is used to enter bootloader mode for updating the firmware of the module. To enter bootloader mode, fit the jumper and reset the module by unplugging and plugging it back in. To exit bootloader mode, remove the jumper and reset the module again.
The I/O pins (1 to 4) can be individually configured as analog input, digital input or digital output. The analog inputs span from 0V to the supply voltage and are connected to a 10-bit ADC. The digital inputs are not 5V tolerant when operating at 3.3V.
The SCL and SDA pins are used for I2C communication. They should be connected directly to the SCL and SDA pins on your I2C device. The module is always a bus master and has 4.7kÎ pull-up resistors on these pins.
The SDI, SCK, SDO and CE pins are used for SPI communication. SDI is a474f39169