| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1 | Kernel driver i2c-parport | 
|  | 2 |  | 
|  | 3 | Author: Jean Delvare <khali@linux-fr.org> | 
|  | 4 |  | 
|  | 5 | This is a unified driver for several i2c-over-parallel-port adapters, | 
|  | 6 | such as the ones made by Philips, Velleman or ELV. This driver is | 
|  | 7 | meant as a replacement for the older, individual drivers: | 
|  | 8 | * i2c-philips-par | 
|  | 9 | * i2c-elv | 
|  | 10 | * i2c-velleman | 
|  | 11 | * video/i2c-parport (NOT the same as this one, dedicated to home brew | 
|  | 12 | teletext adapters) | 
|  | 13 |  | 
|  | 14 | It currently supports the following devices: | 
|  | 15 | * Philips adapter | 
|  | 16 | * home brew teletext adapter | 
|  | 17 | * Velleman K8000 adapter | 
|  | 18 | * ELV adapter | 
|  | 19 | * Analog Devices evaluation boards (ADM1025, ADM1030, ADM1031, ADM1032) | 
| Peter Korsgaard | 1d26f45 | 2005-11-26 20:18:43 +0100 | [diff] [blame] | 20 | * Barco LPT->DVI (K5800236) adapter | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 21 |  | 
|  | 22 | These devices use different pinout configurations, so you have to tell | 
|  | 23 | the driver what you have, using the type module parameter. There is no | 
|  | 24 | way to autodetect the devices. Support for different pinout configurations | 
|  | 25 | can be easily added when needed. | 
|  | 26 |  | 
|  | 27 |  | 
|  | 28 | Building your own adapter | 
|  | 29 | ------------------------- | 
|  | 30 |  | 
|  | 31 | If you want to build you own i2c-over-parallel-port adapter, here is | 
|  | 32 | a sample electronics schema (credits go to Sylvain Munaut): | 
|  | 33 |  | 
|  | 34 | Device                                                      PC | 
|  | 35 | Side          ___________________Vdd (+)                    Side | 
|  | 36 | |    |         | | 
|  | 37 | ---  ---       --- | 
|  | 38 | | |  | |       | | | 
|  | 39 | |R|  |R|       |R| | 
|  | 40 | | |  | |       | | | 
|  | 41 | ---  ---       --- | 
|  | 42 | |    |         | | 
|  | 43 | |    |    /|   | | 
|  | 44 | SCL  ----------x--------o |-----------x-------------------  pin 2 | 
|  | 45 | |    \|   |       | | 
|  | 46 | |         |       | | 
|  | 47 | |   |\    |       | | 
|  | 48 | SDA  ----------x----x---| o---x---------------------------  pin 13 | 
|  | 49 | |        |/            | | 
|  | 50 | |                      | | 
|  | 51 | |         /|           | | 
|  | 52 | ---------o |----------------x--------------  pin 3 | 
|  | 53 | \|           |    | | 
|  | 54 | |    | | 
|  | 55 | ---  --- | 
|  | 56 | | |  | | | 
|  | 57 | |R|  |R| | 
|  | 58 | | |  | | | 
|  | 59 | ---  --- | 
|  | 60 | |    | | 
|  | 61 | ###  ### | 
|  | 62 | GND  GND | 
|  | 63 |  | 
|  | 64 | Remarks: | 
|  | 65 | - This is the exact pinout and electronics used on the Analog Devices | 
|  | 66 | evaluation boards. | 
|  | 67 | /| | 
|  | 68 | - All inverters -o |- must be 74HC05, they must be open collector output. | 
|  | 69 | \| | 
|  | 70 | - All resitors are 10k. | 
|  | 71 | - Pins 18-25 of the parallel port connected to GND. | 
|  | 72 | - Pins 4-9 (D2-D7) could be used as VDD is the driver drives them high. | 
|  | 73 | The ADM1032 evaluation board uses D4-D7. Beware that the amount of | 
|  | 74 | current you can draw from the parallel port is limited. Also note that | 
|  | 75 | all connected lines MUST BE driven at the same state, else you'll short | 
|  | 76 | circuit the output buffers! So plugging the I2C adapter after loading | 
|  | 77 | the i2c-parport module might be a good safety since data line state | 
|  | 78 | prior to init may be unknown. | 
|  | 79 | - This is 5V! | 
|  | 80 | - Obviously you cannot read SCL (so it's not really standard-compliant). | 
|  | 81 | Pretty easy to add, just copy the SDA part and use another input pin. | 
|  | 82 | That would give (ELV compatible pinout): | 
|  | 83 |  | 
|  | 84 |  | 
|  | 85 | Device                                                      PC | 
|  | 86 | Side          ______________________________Vdd (+)         Side | 
|  | 87 | |    |            |    | | 
|  | 88 | ---  ---          ---  --- | 
|  | 89 | | |  | |          | |  | | | 
|  | 90 | |R|  |R|          |R|  |R| | 
|  | 91 | | |  | |          | |  | | | 
|  | 92 | ---  ---          ---  --- | 
|  | 93 | |    |            |    | | 
|  | 94 | |    |      |\    |    | | 
|  | 95 | SCL  ----------x--------x--| o---x------------------------  pin 15 | 
|  | 96 | |   |  |/         | | 
|  | 97 | |   |             | | 
|  | 98 | |   |   /|        | | 
|  | 99 | |   ---o |-------------x--------------  pin 2 | 
|  | 100 | |       \|        |    | | 
|  | 101 | |                 |    | | 
|  | 102 | |                 |    | | 
|  | 103 | |      |\         |    | | 
|  | 104 | SDA  ---------------x---x--| o--------x-------------------  pin 10 | 
|  | 105 | |  |/              | | 
|  | 106 | |                  | | 
|  | 107 | |   /|             | | 
|  | 108 | ---o |------------------x---------  pin 3 | 
|  | 109 | \|             |    | | 
|  | 110 | |    | | 
|  | 111 | ---  --- | 
|  | 112 | | |  | | | 
|  | 113 | |R|  |R| | 
|  | 114 | | |  | | | 
|  | 115 | ---  --- | 
|  | 116 | |    | | 
|  | 117 | ###  ### | 
|  | 118 | GND  GND | 
|  | 119 |  | 
|  | 120 |  | 
|  | 121 | If possible, you should use the same pinout configuration as existing | 
|  | 122 | adapters do, so you won't even have to change the code. | 
|  | 123 |  | 
|  | 124 |  | 
|  | 125 | Similar (but different) drivers | 
|  | 126 | ------------------------------- | 
|  | 127 |  | 
|  | 128 | This driver is NOT the same as the i2c-pport driver found in the i2c | 
|  | 129 | package. The i2c-pport driver makes use of modern parallel port features so | 
|  | 130 | that you don't need additional electronics. It has other restrictions | 
|  | 131 | however, and was not ported to Linux 2.6 (yet). | 
|  | 132 |  | 
|  | 133 | This driver is also NOT the same as the i2c-pcf-epp driver found in the | 
|  | 134 | lm_sensors package. The i2c-pcf-epp driver doesn't use the parallel port as | 
|  | 135 | an I2C bus directly. Instead, it uses it to control an external I2C bus | 
|  | 136 | master. That driver was not ported to Linux 2.6 (yet) either. | 
|  | 137 |  | 
|  | 138 |  | 
|  | 139 | Legacy documentation for Velleman adapter | 
|  | 140 | ----------------------------------------- | 
|  | 141 |  | 
|  | 142 | Useful links: | 
|  | 143 | Velleman                http://www.velleman.be/ | 
|  | 144 | Velleman K8000 Howto    http://howto.htlw16.ac.at/k8000-howto.html | 
|  | 145 |  | 
|  | 146 | The project has lead to new libs for the Velleman K8000 and K8005: | 
|  | 147 | LIBK8000 v1.99.1 and LIBK8005 v0.21 | 
|  | 148 | With these libs, you can control the K8000 interface card and the K8005 | 
|  | 149 | stepper motor card with the simple commands which are in the original | 
|  | 150 | Velleman software, like SetIOchannel, ReadADchannel, SendStepCCWFull and | 
|  | 151 | many more, using /dev/velleman. | 
|  | 152 | http://home.wanadoo.nl/hihihi/libk8000.htm | 
|  | 153 | http://home.wanadoo.nl/hihihi/libk8005.htm | 
|  | 154 | http://struyve.mine.nu:8080/index.php?block=k8000 | 
|  | 155 | http://sourceforge.net/projects/libk8005/ |