IOW24-DG USB to I2C Dongle based on IO-Warrior24 Code Mercenaries 1. Features • USB interface • USB V1.1/2.0 low speed device • 100 kHz I2C (IIC / TWI) master • Throughput up to 750 byte/s • Based on IO-Warrior24 • Supports clock stretching • Programmable timeout • Supports Sensirion sensor protocol • 5 V and 3.3 V available for external circuit • Uses standard system drivers • Standard form factor, no blocked ports 1.
Code Mercenaries IOW24-DG 3.1 Compatibility with 3.3 V slaves If a 3.3V slave is to be connected the internal pull up resistors of the IOW24 should be switched off by software on enabling the I2C function. This requires external pull up resistors which may be added either on the slave side or soldered to the lower side of the dongle PCB. It is recommended to add protection diodes so the slave does not see 5V on the signal lines before the I2C function of the IO-Warrior24 is initialized.
IO-Warrior Generic universal I/O Controller for USB Code Mercenaries 1.0 Features • USB interface • USB V1.1/2.0 compliant low speed device • USB HID 1.
IO-Warrior Content 1.0 Features 1.1 Variants 1.2 Custom variants 2.0 Functional overview 2.1 Product selection matrix 3.0 Pin Configurations 4.0 Pin Descriptions IO-Warrior40 4.1 Pin Descriptions IO-Warrior24 4.2 Pin descriptions 4.3 Special mode pin functions 4.3.1 IIC Mode pins 4.3.2 LCD Mode pins 4.3.3 SPI Mode Pins (IOW24 only) 4.3.4 RC5 Mode Pins (IOW24 only) 4.3.5 LED Matrix Mode Pins 4.3.6 Switch Matrix Mode Pins (IOW40 only) 4.3.7 Capture Timer Mode Pins (IOW24 only) 5.0 Device Operation 5.
IO-Warrior Code Mercenaries 2.1 Product selection matrix Type I/O Pins LCD IIC SPI RC5 IR Keys LEDs Timer DIL40 SSOP48 DIL24 SOIC24 Starter Kit IO-Warrior40 32 IO-Warrior24 16 IO-Warrior24PV 12 IO-Warrior56 50 2.2 Starter Kits With the IO-Warrior Starter Kits you can make your first steps with IO-Warrior40 or IO-Warrior24 easily. A couple elements on the kit allow first experiments with inputs and outputs, the bread board area provides space to test your individual circuit.
IO-Warrior Code Mercenaries 2.2.2 The IO-Warrior24 Starter Kit The IOW24KIT for IO-Warrior24 provides a LED, an IR receiver, and the circuit and connector to directly connect a LCD module. The starter kit is sold unassembled. Assembled the starter kit for IO-Warrior24 looks similar to this: Actual components supplied with the kit may vary from those shown here. V 1.1.0, December 2nd 2013, for chip revision V1.0.3.
Code Mercenaries IO-Warrior 3.0 Pin Configurations IO-Warrior40-MOD DIL40 Module D+ DP3.7/Y7 P3.5/Y5 P3.3/Y3 P3.1/Y1 P2.7/X7 P2.5/X5 P2.3/X3 P2.1/X1 LCD-DB7/P1.7/X15 LCD-DB5/P1.5/X13 LCD-DB3/P1.3/X11 LCD-DB1/P1.1/X9 IIC-SDA/P0.7 LCD-E/P0.5 LCD-RS/P0.3 P0.1 PullToGND GND 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 40 39 38 37 36 35 34 33 32 31 30 29 28 27 26 25 24 23 22 21 Vcc GND P3.6/Y6 P3.4/Y4 P3.2/Y2 P3.0/Y0 P2.6/X6 P2.4/X4 P2.2/X2 P2.0/X0 P1.6/LCD-DB6/X14 P1.4/LCD-DB4/X12 P1.
Code Mercenaries IO-Warrior IO-Warrior 40-S SSOP48 D+ DP3.7/X7 P3.5/X5 P3.3/X3 P3.1/X1 P2.7/X7 P2.5/X5 P2.3/X3 P2.1/X1 LCD-DB7/P1.7/X15 LCD-DB5/P1.5/X13 LCD-DB3/P1.3/X11 LCD-DB1/P1.1/X9 NC NC IIC-SDA/P0.7 LCD-E/P0.5 LCD-RS/P0.3 P0.1 NC NC PullToGND GND 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 48 47 46 45 44 43 42 41 40 39 38 37 36 35 34 33 32 31 30 29 28 27 26 25 Vcc GND P3.6/Y6 P3.4/Y4 P3.2/Y2 P3.0Y0 P2.6/X6 P2.4/X4 P2.2/X2 P2.0/X0 P1.6/LCD-DB6/X14 P1.4/LCD-DB4/X12 P1.
Code Mercenaries IO-Warrior IO-Warrior 24-P/-S DIL24 / SOIC24 P0.0/RxD/CAPA IIC-SCL/P0.1/CAPB IIC-SDA/P0.2 SPI-DRDY/P0.3 LCD-DB0/P1.0 LCD-DB2/P1.2 LCD-DB4/P1.4 LCD-DB6/P1.6 GND PullToGND Vreg Power 1 2 3 4 5 6 7 8 9 10 11 12 24 23 22 21 20 19 18 17 16 15 14 13 P0.4/SPI-SS/LCD-/On P0.5/SPI-MOSI/LCD-RS P0.6/SPI-MISO/LCD-R/W P0.7/SPI-SCK/LCD-E P1.1/LCD-DB1 P1.3/LCD-DB3 P1.5/LCD-DB5 P1.7/LCD-DB7 D+ DVcc NC All drawings: TOP VIEW! V 1.1.0, December 2nd 2013, for chip revision V1.0.3.
Code Mercenaries IO-Warrior 4.0 Pin Descriptions IO-Warrior40 Name I/O Type D+, DP0.0, P0.1, P0.2, P0.3, P0.4, P0.5, P0.6, P0.7 P1.0, P1.1, P1.2, P1.3, P1.4, P1.5, P1.6, P1.7 P2.0, P2.1, P2.2, P2.3, P2.4, P2.5, P2.6, P2.7 P3.0, P3.1, P3.2, P3.3, P3.4, P3.5, P3.6, P3.7 PullToGND GND Vcc XOut XIn I/O I/O special 1, 2 USB differential data lines I/O open drain, internal 23, 18, 24, 17, 25, 16, First I/O Port. P0.
Code Mercenaries IO-Warrior 4.2 Pin descriptions D+, DDifferential data lines of USB. Connect these signals direct to a USB cable. D- requires a pull up resistor, see application circuit for details. For a PCB layout make sure to run these two signals next to each other. USB data is a differential signal that produces best signal quality and lowest RF emission if the two lines are close to each other. GND Power supply ground. Vcc Supply voltage.
IO-Warrior Code Mercenaries 4.3.1 IIC Mode pins IO-Warrior can act as an IIC master with about 100kbit/sec data rate (actual throughput is about 750bytes/sec). Multi-Master mode is not supported by IO-Warrior, it has to be the only master on the IIC. Since the IIC bus in IO-Warrior is software driven it does not have as stable a clock timing as hardware IIC masters have. Make sure that the devices you drive with IO-Warrior don't have a problem with some clock jitter.
Code Mercenaries IO-Warrior 4.3.5 LED Matrix Mode Pins IO-Warrior supports driving a LED matrix with up to 8x32 LEDs. The LED matrix mode can not be used at the same time as the LCD mode. IOW40 can use either 16x8 key matrix mode or LED matrix mode, never both at the same time. Function IOW24 IOW40 /OE P1.0 P1.0 Strb P1.1 P1.1 Clk P1.2 P1.2 Data P1.3 P1.3 When the LED Matrix function is enabled these pins will no longer be affected by the normal port setting command.
IO-Warrior Code Mercenaries 5.0 Device Operation Due to the fact that all current operating systems offer an especially easy access to devices in the HID class, IO-Warrior was designed as a generic HID device. While this does not exactly fit the device it makes using it a lot easier. By identifying as a generic HID class device IOWarrior avoids being controlled by any of the higher level system drivers, which makes it possible to access IO-Warrior from application level.
IO-Warrior Code Mercenaries 5.7 Power supply USB does allow a device to be "Bus Powered". This means the device does get its power off the USB port. To avoid overloading on the USB ports devices need to advertise their power requirements. There are two power classes for devices: Low power and high power. Low power devices may draw up to 100mA off the USB, high power devices up to 500mA. Likewise there are high power and low power ports.
IO-Warrior Code Mercenaries 5.10 Special mode I/O To enable IO-Warrior to talk to devices that have more complex demands we have added the special mode functions. When any of these functions is enabled a couple pins of IO-Warrior turn into special function pins. Talking to the special mode functions is handeled via the USB interface 1, which is also configured as generic HID compliant. Commands to the functions are sent via endpoint 0 as SetReport requests to interface 1.
IO-Warrior Code Mercenaries Any write transactions are acknowledged by a report via interrupt-in endpoint 2: sending the command byte and a stop is generated after the last data byte is received. Data is returned in input reports with ID=3 (which is different from the output ReportID=3 used to initiate the read transaction) via endpoint 2. The data is returned in chunks of up to six bytes each with an error flag and byte count.
Code Mercenaries IO-Warrior 5.10.2 LCD Special mode function The LCD special mode function supports display modules that are compatible with the HD44780 controller and several graphic display controllers that use a compatible interface . This controller is made by Hitachi and has set the de-facto standard for alphanumeric LCD modules. The modules come in various configurations with up to 80 characters total in any kind of arrangement from single line to four lines.
IO-Warrior Code Mercenaries 5.10.3 SPI Special mode function (IOW24 only) IO-Warrior24 has a hardware SPI interface enabling it to talk to many peripheral devices. IOW24 supports SPI master mode. received the report with the command but not execute the corresponding function and not send any reports in reaction to the command.
IO-Warrior Code Mercenaries 5.10.4 Getting current pin status Due to the way Windows implements HID support IO-Warrior is unable to continuously send its status. HID class devices do have a function that allows the host to set the rate at which reports should be repeated if there is no change to the data. Windows does this rate to zero for IO-Warrior, which means IO-Warrior may send data only if there are changes.
IO-Warrior Code Mercenaries 5.10.7 Switch Matrix Mode (IOW40 only) IO-Warrior40 can read a matrix of 8x8 or 16x8 switches or keys. Other than with a typical keyboard controller it is possible to read out all possible combinations of closed switches. Since the switch status is reported as a bitmap there is no limitation to the number of switches that can be closed at the same time (diodes are required in the matrix though). The switch matrix function is present in IOW40 since chip revision V1.0.2.
IO-Warrior Code Mercenaries 5.10.8 Capture Timers (IOW24 V1.0.3.0 only) IO-Warrior24 has two capture timers that allow the measurement of the time between rising and falling edges of a signal. The resolution of the timers is 4 sec, the accuracy depends on the USB clock from which IOW24 derives its internal clock with a tolerance of ±1.5%. The capture timers use a 24 bit free running counter that gets incremented every 4 microseconds. When a rising or falling edge occurs on a timer input (i.e.
Code Mercenaries IO-Warrior 6.0 Absolute Maximum Ratings Storage Temperature ........................................................................................-65°C to +150°C Ambient Temperature with power applied...........................................................-0°C to +70°C Supply voltage on Vcc relative to Gnd ..................................................................-0.5V to +7V DC input voltage.....................................................................................
Code Mercenaries IO-Warrior 6.1.
Code Mercenaries IO-Warrior 6.
Code Mercenaries IO-Warrior 7.0 Ordering information Partname IO-Warrior40 IO-Warrior40 IO-Warrior40 Starter kit IO-Warrior24 IO-Warrior24 IO-Warrior24 Starter kit Order Code IOW40-MOD IOW40-S IOW40KIT IOW24-P IOW24-S IOW24KIT Description IO-Warrior 32 I/O pins, module to replace IOW40-P IO-Warrior 32 I/O pins Starterkit for IOW40, comes with a IOW40-P and PCB IO-Warrior 16 I/O pins IO-Warrior 16 I/O pins Starterkit for IOW24, comes with a IOW24-P and PCB The chips listed here are standard products.
1 +5V 2 D3 D+ 4 GND USB 100K 7K5 J1 C i r c u i t : I OWar r i or V e r s i o n : 1.0 Da t e : 26.2.03 Dr a w n by : F u n c t i on : P a ge : Rev. Date By J8 V 1.1.0, December 2nd 2013, for chip revision V1.0.3.0 and up 6M Hz Q1 Change D8 Xin Xout 3 38 4 37 5 36 6 35 7 34 8 33 9 32 10 31 P3.7 P3.6 P3.5 P3.4 P3.3 P3.2 P3.1 P3.0 P2.7 P2.6 P2.5 P2.4 P2.3 P2.2 P2.1 P2.0 2 1 DD+ 21 22 15 26 16 25 17 24 18 23 11 30 12 29 13 28 14 27 C1 10 F S1 100nF C2 J9 Si gn.
V 1.1.0, December 2nd 2013, for chip revision V1.0.3.0 and up VREG 13 Vss P1.7 P1.6 P1.5 P1.4 P1.3 P1.2 P1.1 P1.0 P0.7/ SCK/ E P0.6/ M ISO/ RW P0.5/ M OSI/ RS P0.4/ SS/ On P0.3/ DRDY P0.2/ SDA P0.1/ SCL P0.0/ Rx D ConnectToGnd NC 15 16 DD+ 11 Pow er Change 17 8 18 7 19 6 20 5 21 22 23 24 4 3 2 1 10 F C2 Si gn. Code Mercenaries J1 pul l i ng hi gh sets hi gh pow er mode (500mA) J1 pul l i ng l ow sets l ow pow er mode (100mA) 1K3 C i r c u i t : I O- War r i or 24 V e r s i o n : 1.
IO-Warrior Code Mercenaries 8.2 Warning about USB cables The IO-Warrior Starter Kit does ignore one of the USB standard requirements for cables. Contrary to the standard which does not allow detachable cables on low speed devices, IO-Warrior Starter Kit has a B-type plug on the PCB. As long as a full speed cable according to the USB specs is used this will cause no problems. If you make your own design based on IO-Warrior do use a captive cable. 8.
IO-Warrior Code Mercenaries The same circuit may be employed if you want to control a DC electric motor. Any inductive load has the bad behaviour of generating a voltage with reverse polarity upon being switched off. If this is not shorted with the diode the voltage will rise to relatively high levels that can damage the driver transistor and/or the IO-Warrior. 8.5.3 Protecting inputs and outputs IO-Warrior has a limited protection against electro static discharge in the chip.
Code Mercenaries IO-Warrior This pinout is for the IO-Warrior40! +5V POT1 LCD 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 10k P0.3/ LCD- RS P0.4/ LCD- R/ W P0.5/ LCD- E P1.0/ LCD- DB0 P1.1/ LCD- DB1 P1.2/ LCD- DB2 P1.3/ LCD- DB3 P1.4/ LCD- DB4 P1.5/ LCD- DB5 P1.6/ LCD- DB6 P1.7/ LCD- DB7 R1 4 7 T1 P0.2/ LCD- / On BC307 Pot1 is used to set the contrast of the LCD. T1 and R1 drive the power for the backlighting. This circuit is sufficient for displays which have a LED type backlighting.
IO-Warrior Code Mercenaries 9.0 Package Dimensions 40 Pin DIP (discontinued) IOW40-MOD fits on the same footprint 48 Pin SSOP V 1.1.0, December 2nd 2013, for chip revision V1.0.3.
IO-Warrior Code Mercenaries 24 Pin DIL 24 Pin SOIC V 1.1.0, December 2nd 2013, for chip revision V1.0.3.
IO-Warrior Code Mercenaries 10.0 ESD Considerations IO-Warrior has an internal ESD protection to withstand discharges of more than 2000V without permanent damage. However ESD may disrupt normal operation of the chip and cause it to exhibit erratic behaviour. For the typical office environment the 2000V protection is normally sufficient. Though for industrial use additional measures may be necessary. When adding ESD protection to the signals special care must be taken on the USB signal lines.
Code Mercenaries IO-Warrior 11.0 Revision History 1.0.3.0 • Added clock stretching handshake, timeout, and compatibility with Sensirion to IIC. • Added option to deactivate internal pull-ups for IIC on IOW24. 1.0.2.6 (no general release) • Added capture timers to IOW24. • Added 16x8 key mode to general release. 1.0.2.5 Custom chips only, no general release • Added clearing the buffer for IIC read reports to make the data look better.
IO-Warrior 12.0 Legal Stuff This document Mercenaries. is ©1999-2013 by Code Mercenaries Code The information contained herein is subject to change without notice. Code Mercenaries makes no claims as to the completeness or correctness of the information contained in this document. Code Mercenaries assumes no responsibility for the use of any circuitry other than circuitry embodied in a Code Mercenaries product. Nor does it convey or imply any license under patent or other rights.