i2c-tiny-usb 2007-01-05
Sponsored Links
i2c-tiny-usb 2007-01-05 Ranking & Summary
File size:
0.20 MB
Platform:
Any Platform
License:
GPL (GNU General Public License)
Price:
Downloads:
1038
Date added:
2007-01-09
Publisher:
Till Harbaum
i2c-tiny-usb 2007-01-05 description
i2c-tiny-usb is a open source/open hardware project.
Attach any I2C client chip (thermo sensors, AD converter, displays, relais driver, ...) to your PC via USB ... quick, easy and cheap! Drivers for Linux, Windows and MacOS available.
The i2c-tiny-usb project is an open source/open hardware project. The goal of i2c-tiny-usb is to provide a cheap generic i2c interface to be attached to the usb. It is meant as a replacement for those simple and cheap printer port to i2c adapters. A USB solution has several advantages incl. the built-in power supply and a more future proof interface.
Furthermore no cpu intense bitbanging is required on the host side. This USB solution even requires less parts than some printer port solutions.
While the i2c-tiny-usb was developed under and for Linux it also works under Windows and MacOS X. A windows demo driver and demo application is included to get you started immediately.
The i2c-tiny-usb project is based on:
The Linux USB project and the Linux i2c implementation
The windows driver and test application are based on the libusb-win32
AVR-USB, a pure software implementation of USB for the AVR platform
USBtiny, another software usb implementation for the AVR
The hardware of the i2c-tiny-usb interface consists of the Atmel AVR ATtiny45 CPU, a cheap and easy to obtain microcontroller with 4 KBytes flash (of which ~2k are used in this application) and 256 Bytes RAM. The processor is surrounded by few other parts.
The USB interface
The USB interface of the i2c-tiny-usb interface is based on a pure software implementation and uses two pins of the AVR (PB0 and PB2). This software implementation supports low speed USB only which is signalled to the PC by resistor R1.
The I2C interface is implemented using a bitbanging approach. The hardware supported twi interface of the attiny45 is bound to hardware pins at the chip that are required for USB operation and can thus not be used for I2C. The bitbanging I2C interface being used instead may not be fully I2C compatible and thus not every I2C client chip may function correctly at this bus. No incompatibilities have been reported so far. The i2c-tiny-usb provides a software adjustable i2c clock delay allowing to configure the i2c clock. The default delay is 10us. Due to additional delays in the i2c bitbanging code this results in a i2c clock of about 50kHz.
For simplicity reasons all USB transfers are done via the control endpoint. Since the avr usb library does only support low speed devices it cannot use bulk transfers which are specified for high and full speed devices only. Low speed devices support so called interrupt transfers which are limited to a preset bandwidth while control transfers can use any free bandwidth (if theres any at all).
The device therefore uses control transfers for all of its communication. This requires some additional limitation to prevent multiple driver software (e.g. the kernel driver and the libusb based test application) to access the device at the same time. Under Linux this can be achieved by selecting certain access request types. This kind of access control may not be possible under other operating systems.
Power consumption
The whole device is a so called bus powered device. This means that the complete device is powered directly from USB. Therefore the AVR and one or more I2C client chips are powered from the USB VBUS signal.
The adapter itself draws less than 10mA and reports this to the host via its USB descriptors. The device is able to power I2C client chips as well. But since these chips vary in power consumption it is not possible to correctly include their demands into the device descriptors. Its your responsibility to keep an eye on the total power supply and especially to make sure that the entire device does not exceed the total USB limit of 500mA.
It is planned for future firmware versions to make the reported power consumption software configurable so the value can easily be adopted to the real power demands of the entire device.
Kernel driver
The i2c-tiny-usb is meant to be used with Linux. It comes with a Linux kernel driver that bridges between the USB and I2C subsystems in the Linux kernel. The driver then attaches to the USB device and make the i2c bus available to the i2c subsystem. Thus the entire setup is transparent to client applications like the lm_sensors framework and no special client chip drivers are required. Instead the drivers already present in the linux kernel are used with the i2c-tiny-usb as well. With e.g. the ds1621 temperature sensors used in the prototype the output of sensors may e.g. look like this:
ds1621-i2c-2-48
Adapter: i2c-tiny-usb at bus 003 device 017
temp: +21.50°C (low = +15.0°C, high = +10.0°C) ALARM (HIGH)
Attach any I2C client chip (thermo sensors, AD converter, displays, relais driver, ...) to your PC via USB ... quick, easy and cheap! Drivers for Linux, Windows and MacOS available.
The i2c-tiny-usb project is an open source/open hardware project. The goal of i2c-tiny-usb is to provide a cheap generic i2c interface to be attached to the usb. It is meant as a replacement for those simple and cheap printer port to i2c adapters. A USB solution has several advantages incl. the built-in power supply and a more future proof interface.
Furthermore no cpu intense bitbanging is required on the host side. This USB solution even requires less parts than some printer port solutions.
While the i2c-tiny-usb was developed under and for Linux it also works under Windows and MacOS X. A windows demo driver and demo application is included to get you started immediately.
The i2c-tiny-usb project is based on:
The Linux USB project and the Linux i2c implementation
The windows driver and test application are based on the libusb-win32
AVR-USB, a pure software implementation of USB for the AVR platform
USBtiny, another software usb implementation for the AVR
The hardware of the i2c-tiny-usb interface consists of the Atmel AVR ATtiny45 CPU, a cheap and easy to obtain microcontroller with 4 KBytes flash (of which ~2k are used in this application) and 256 Bytes RAM. The processor is surrounded by few other parts.
The USB interface
The USB interface of the i2c-tiny-usb interface is based on a pure software implementation and uses two pins of the AVR (PB0 and PB2). This software implementation supports low speed USB only which is signalled to the PC by resistor R1.
The I2C interface is implemented using a bitbanging approach. The hardware supported twi interface of the attiny45 is bound to hardware pins at the chip that are required for USB operation and can thus not be used for I2C. The bitbanging I2C interface being used instead may not be fully I2C compatible and thus not every I2C client chip may function correctly at this bus. No incompatibilities have been reported so far. The i2c-tiny-usb provides a software adjustable i2c clock delay allowing to configure the i2c clock. The default delay is 10us. Due to additional delays in the i2c bitbanging code this results in a i2c clock of about 50kHz.
For simplicity reasons all USB transfers are done via the control endpoint. Since the avr usb library does only support low speed devices it cannot use bulk transfers which are specified for high and full speed devices only. Low speed devices support so called interrupt transfers which are limited to a preset bandwidth while control transfers can use any free bandwidth (if theres any at all).
The device therefore uses control transfers for all of its communication. This requires some additional limitation to prevent multiple driver software (e.g. the kernel driver and the libusb based test application) to access the device at the same time. Under Linux this can be achieved by selecting certain access request types. This kind of access control may not be possible under other operating systems.
Power consumption
The whole device is a so called bus powered device. This means that the complete device is powered directly from USB. Therefore the AVR and one or more I2C client chips are powered from the USB VBUS signal.
The adapter itself draws less than 10mA and reports this to the host via its USB descriptors. The device is able to power I2C client chips as well. But since these chips vary in power consumption it is not possible to correctly include their demands into the device descriptors. Its your responsibility to keep an eye on the total power supply and especially to make sure that the entire device does not exceed the total USB limit of 500mA.
It is planned for future firmware versions to make the reported power consumption software configurable so the value can easily be adopted to the real power demands of the entire device.
Kernel driver
The i2c-tiny-usb is meant to be used with Linux. It comes with a Linux kernel driver that bridges between the USB and I2C subsystems in the Linux kernel. The driver then attaches to the USB device and make the i2c bus available to the i2c subsystem. Thus the entire setup is transparent to client applications like the lm_sensors framework and no special client chip drivers are required. Instead the drivers already present in the linux kernel are used with the i2c-tiny-usb as well. With e.g. the ds1621 temperature sensors used in the prototype the output of sensors may e.g. look like this:
ds1621-i2c-2-48
Adapter: i2c-tiny-usb at bus 003 device 017
temp: +21.50°C (low = +15.0°C, high = +10.0°C) ALARM (HIGH)
i2c-tiny-usb 2007-01-05 Screenshot
i2c-tiny-usb 2007-01-05 Keywords
USB
AVR
i2c
device
interface
linux
project
hardware
i2c-tiny-usb
i2ctinyusb
i2c-tiny-usb 2007-01-05
Kernels
System
Bookmark i2c-tiny-usb 2007-01-05
i2c-tiny-usb 2007-01-05 Copyright
WareSeeker periodically updates pricing and software information of i2c-tiny-usb 2007-01-05 full version from the publisher, so some information may be slightly out-of-date. You should confirm all information before relying on it. Software piracy is theft, Using crack, password, serial numbers, registration codes, key generators is illegal and prevent future development of i2c-tiny-usb 2007-01-05 Edition. Download links are directly from our publisher sites, torrent files or links from rapidshare.com, yousendit.com or megaupload.com are not allowed
Featured Software
Want to place your software product here?
Please contact us for consideration.
Contact WareSeeker.com
Related Information
what is i2c interface
CompTIA
interface fabrics
project linus
linux windows
device driver updates
ace hardware
wow interface
input devices
science fair projects
linux operating system
linux microsoft
project revolution
interface security
device management
hardware store
device manager
project playlist
Related Software
Linux DC++ is a project to port the DC++ direct connect client to Linux or any POSIX-compliant Unix. Free Download
TFM Linux is a Linux operating system that can be used for small enterprises. Free Download
Mactel-Linux project is the effort to adapt the GNU/Linux operating system to Intel-based Apple Macintosh hardware. Free Download
The Linux Test Project is a joint project with SGI, IBM, OSDL, Bull, and Wipro Technologies. Free Download
Linux+ Live is a Fedora-based live DVD. Free Download
LCD2USB is a open source/open hardware project. Free Download
Linux::Smaps is a Perl interface to /proc/PID/smaps. Free Download
An internet telephone as simple as an instant messenger. Freeware for linux Free Download
Latest Software
Popular Software
Favourite Software