111617by admin

Simple Serial I2c Programmer

Simple Serial I2c Programmer Average ratng: 3,7/5 5023reviews

I2. C Tiny USB Cheap and simple IC to USB interface. No custom hardware is needed anymore since the i. Introduction. Attach any I2. C client chip thermo sensors, AD converter, displays, relais driver,. PC via USB. Drivers for Linux, Windows and Mac. OS available. The i. The goal of i. 2c tiny usb is to provide a cheap generic i. It is meant as a replacement for those simple and cheap printer port to i. A USB solution has several advantages incl. Simple Serial I2c Programmer UsbFurthermore no cpu intense bitbanging is required on the host side. This USB solution even requires less parts than some printer port solutions. While the i. 2c tiny usb was developed under and for Linux it also works under Windows and Mac. OS X. A windows demo driver and demo application is included to get you started immediately. The i. 2c tiny usb project is based on Hardware. The hardware of the i. Atmel AVR ATtiny. Features. PIC16F87x serial bootloader. Used successfully by thousands of users worldwide. Compatible with the 16F87013467 and 16F876, 16F876A, 16F877, 16F877A. PG2C-4.jpg' alt='Simple Serial I2c Programmers' title='Simple Serial I2c Programmers' />CPU, a cheap and easy to obtain microcontroller with 4 KBytes flash of which 2k are used in this application and 2. Bytes RAM. The processor is surrounded by few other parts. The USB interface. The USB interface of the i. AVR PB0 and PB2. This software implementation supports low speed USB only which is signalled to the PC by resistor R1. The I2. C interface is implemented using a bitbanging approach. The hardware supported twi interface of the attiny. USB operation and can thus not be used for I2. C. The bitbanging I2. C interface being used instead may not be fully I2. C compatible and thus not every I2. C client chip may function correctly at this bus. No incompatibilities have been reported so far. Not Recommended for new designs. Please consider this device MCP2221A View Side By Side Comparison. The MCP2221 is a USBtoUARTI2C serial converter. Microcontroller PIC Projects are categorized on the basis of microcontroller applications. Microchip pic microcontrollers belongs to modern family of MCUs. This looks like itll be quite useful though a write function that doesnt take a registerAddress might be nice. Some homebrew I2C devices dont seem to use a. C sample code for PIC micros and HiTech C. Sample projects for the Microchip PIC micro series of microcontrollers, including the PIC12x, PIC16x, PIC18x, PIC24x, and. The i. 2c tiny usb provides a software adjustable i. The default delay is 1. Due to additional delays in the i. Hz. 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. Windows Live Mail Dk 2013. This requires some additional limitation to prevent multiple driver software e. 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. Manual De Asamblea De Oracion more. 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 I2. C client chips are powered from the USB VBUS signal. The adapter itself draws less than 1. A and reports this to the host via its USB descriptors. The device is able to power I2. C 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 5. A. 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 i. Linux. It comes with a Linux kernel driver that bridges between the USB and I2. C subsystems in the Linux kernel. The driver then attaches to the USB device and make the i. Thus the entire setup is transparent to client applications like the lmsensors framework and no special client chip drivers are required. Instead the drivers already present in the linux kernel are used with the i. With e. g. the ds. Adapter i. 2c tiny usb at bus 0. C low 1. 5. 0C, high 1. C ALARM HIGH. Schematics and PCBThe zener diodes in the schematic are optional. They may be required since the i. USBs VBUS singnal at 5. V. The USB data lines D and D are supposed to be operated at 3. V only. Some PCs encounter problems at 5. V and limiting the voltage to at most 3. V may help. My prototype lacks these diodes since my PC works fine with D and D at 5. V. Resistor R1 is 2k. It is meant to pullup to 3. V. Since we are pulling up to 5. V the higher resistance is required. Below is the final PCB layout. It consists of the USB and I2. C parts only and does not include a I2. C client chip. Instead it comes with a solder area for easy prototyping. I do have some of these PCBs left. Just drop me an email if you want to buy one 6 EUR per PCB 4 EUR shipping. You can easily etch a PCB youself. Since most of the connections are on the bottom side even a single sided PCB will work. Youll just have to add the four missing connections using thin wires. The USB connector space on the PCB provides two additional holes to allow an USB cable to be directly and firmly attached to the device without the use of the USB connector. See the image below for the desired pinout. Part list. You can get all parts directly via my i. Reichelt. This list includes the following parts Part. Qty. Name. Reichelt Part No. D1, D2. 23. 6. V zener diode. ZF 3,6. Q1. 11. 2Mhz crystal, HC4. U package. 12,0. 00. HC4. 9U SR1. 12. W 2,2k. R2, R3. 26. W 6. 8R4, R5. W 1. 0k. C1, C2. 22. F ceramic capacitor, 2. KERKO 2. 2PC3. 11. F capacitor, 5. 0. X7. R 5 1. 00. NC6. F electrolytic capacitor. RAD 1. 03. 5 1. USB B print connector. USB BWJP1. 14 pin I2. C connector. SL 1. X3. 6G 2,5. 4U1. Attiny. DIP 2. Mhz. ATTINY 4. PU 1socket for U1. GS 8. PCompiling the firmware. The ATtiny. 45 is quite new and thus not all parts of the developement chain support this chip in their current release versions. The latest binutils linker an assembler and avrdude programmer support the new chips as well but gcc doesnt. The gcc 4. 1. 0 has to be patched to support some AVR cpus incl. Get the latest avr device patches patch newdevices e. Uploading the firmware. If you are familiar with Atmel programming you probably know what you are doing. The Makefile in i. Makefile assumes, that you are using the stk. Since all 6 user configurable pins of the ATtiny. E. g. the stk. 50. AVR Doper and the AVR Dragon are supporting this mode. Two versions of the firmware can be compiled which are based on different USB software implementations for the AVR. If in doubt use the pre compiled firmware. Troubleshooting. Problem The device seems to work fine, it is detected correctly by Linux, but i get various error messages when accessing it from the test application. Solution First make sure that the kernel driver is not loaded when trying to use the libusb based test application. Since the kernel driver is part of the main kernel line, it may even be already installed on your system. Type rmmod i. 2ctinyusb to remove it. Also make sure that you run the test application as the root user since the standard user may lack the rights to access all aspects of the i. Problem The device is not properly detected. Linux reports an error like device not accepting address in the system log. Solution The USB interface is not working at all. Please make sure that the AVR CPU is correctly flashed and that the fuses are set correctly. Another reason may be that the zener diodes are too slow see next problem. Problem The device is not properly detected. Linux reports an an error like device descriptor readall, error 7. Solution The device is working partly and the USB transfers are unreliable. This is often cauesed by slow high current zener diodes.