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