diff options
author | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-04-16 18:20:36 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-04-16 18:20:36 -0400 |
commit | 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 (patch) | |
tree | 0bba044c4ce775e45a88a51686b5d9f90697ea9d /Documentation/i2c/busses/i2c-parport |
Linux-2.6.12-rc2v2.6.12-rc2
Initial git repository build. I'm not bothering with the full history,
even though we have it. We can create a separate "historical" git
archive of that later if we want to, and in the meantime it's about
3.2GB when imported into git - space that would just make the early
git days unnecessarily complicated, when we don't have a lot of good
infrastructure for it.
Let it rip!
Diffstat (limited to 'Documentation/i2c/busses/i2c-parport')
-rw-r--r-- | Documentation/i2c/busses/i2c-parport | 154 |
1 files changed, 154 insertions, 0 deletions
diff --git a/Documentation/i2c/busses/i2c-parport b/Documentation/i2c/busses/i2c-parport new file mode 100644 index 000000000000..9f1d0082da18 --- /dev/null +++ b/Documentation/i2c/busses/i2c-parport | |||
@@ -0,0 +1,154 @@ | |||
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) | ||
20 | |||
21 | These devices use different pinout configurations, so you have to tell | ||
22 | the driver what you have, using the type module parameter. There is no | ||
23 | way to autodetect the devices. Support for different pinout configurations | ||
24 | can be easily added when needed. | ||
25 | |||
26 | |||
27 | Building your own adapter | ||
28 | ------------------------- | ||
29 | |||
30 | If you want to build you own i2c-over-parallel-port adapter, here is | ||
31 | a sample electronics schema (credits go to Sylvain Munaut): | ||
32 | |||
33 | Device PC | ||
34 | Side ___________________Vdd (+) Side | ||
35 | | | | | ||
36 | --- --- --- | ||
37 | | | | | | | | ||
38 | |R| |R| |R| | ||
39 | | | | | | | | ||
40 | --- --- --- | ||
41 | | | | | ||
42 | | | /| | | ||
43 | SCL ----------x--------o |-----------x------------------- pin 2 | ||
44 | | \| | | | ||
45 | | | | | ||
46 | | |\ | | | ||
47 | SDA ----------x----x---| o---x--------------------------- pin 13 | ||
48 | | |/ | | ||
49 | | | | ||
50 | | /| | | ||
51 | ---------o |----------------x-------------- pin 3 | ||
52 | \| | | | ||
53 | | | | ||
54 | --- --- | ||
55 | | | | | | ||
56 | |R| |R| | ||
57 | | | | | | ||
58 | --- --- | ||
59 | | | | ||
60 | ### ### | ||
61 | GND GND | ||
62 | |||
63 | Remarks: | ||
64 | - This is the exact pinout and electronics used on the Analog Devices | ||
65 | evaluation boards. | ||
66 | /| | ||
67 | - All inverters -o |- must be 74HC05, they must be open collector output. | ||
68 | \| | ||
69 | - All resitors are 10k. | ||
70 | - Pins 18-25 of the parallel port connected to GND. | ||
71 | - Pins 4-9 (D2-D7) could be used as VDD is the driver drives them high. | ||
72 | The ADM1032 evaluation board uses D4-D7. Beware that the amount of | ||
73 | current you can draw from the parallel port is limited. Also note that | ||
74 | all connected lines MUST BE driven at the same state, else you'll short | ||
75 | circuit the output buffers! So plugging the I2C adapter after loading | ||
76 | the i2c-parport module might be a good safety since data line state | ||
77 | prior to init may be unknown. | ||
78 | - This is 5V! | ||
79 | - Obviously you cannot read SCL (so it's not really standard-compliant). | ||
80 | Pretty easy to add, just copy the SDA part and use another input pin. | ||
81 | That would give (ELV compatible pinout): | ||
82 | |||
83 | |||
84 | Device PC | ||
85 | Side ______________________________Vdd (+) Side | ||
86 | | | | | | ||
87 | --- --- --- --- | ||
88 | | | | | | | | | | ||
89 | |R| |R| |R| |R| | ||
90 | | | | | | | | | | ||
91 | --- --- --- --- | ||
92 | | | | | | ||
93 | | | |\ | | | ||
94 | SCL ----------x--------x--| o---x------------------------ pin 15 | ||
95 | | | |/ | | ||
96 | | | | | ||
97 | | | /| | | ||
98 | | ---o |-------------x-------------- pin 2 | ||
99 | | \| | | | ||
100 | | | | | ||
101 | | | | | ||
102 | | |\ | | | ||
103 | SDA ---------------x---x--| o--------x------------------- pin 10 | ||
104 | | |/ | | ||
105 | | | | ||
106 | | /| | | ||
107 | ---o |------------------x--------- pin 3 | ||
108 | \| | | | ||
109 | | | | ||
110 | --- --- | ||
111 | | | | | | ||
112 | |R| |R| | ||
113 | | | | | | ||
114 | --- --- | ||
115 | | | | ||
116 | ### ### | ||
117 | GND GND | ||
118 | |||
119 | |||
120 | If possible, you should use the same pinout configuration as existing | ||
121 | adapters do, so you won't even have to change the code. | ||
122 | |||
123 | |||
124 | Similar (but different) drivers | ||
125 | ------------------------------- | ||
126 | |||
127 | This driver is NOT the same as the i2c-pport driver found in the i2c | ||
128 | package. The i2c-pport driver makes use of modern parallel port features so | ||
129 | that you don't need additional electronics. It has other restrictions | ||
130 | however, and was not ported to Linux 2.6 (yet). | ||
131 | |||
132 | This driver is also NOT the same as the i2c-pcf-epp driver found in the | ||
133 | lm_sensors package. The i2c-pcf-epp driver doesn't use the parallel port as | ||
134 | an I2C bus directly. Instead, it uses it to control an external I2C bus | ||
135 | master. That driver was not ported to Linux 2.6 (yet) either. | ||
136 | |||
137 | |||
138 | Legacy documentation for Velleman adapter | ||
139 | ----------------------------------------- | ||
140 | |||
141 | Useful links: | ||
142 | Velleman http://www.velleman.be/ | ||
143 | Velleman K8000 Howto http://howto.htlw16.ac.at/k8000-howto.html | ||
144 | |||
145 | The project has lead to new libs for the Velleman K8000 and K8005: | ||
146 | LIBK8000 v1.99.1 and LIBK8005 v0.21 | ||
147 | With these libs, you can control the K8000 interface card and the K8005 | ||
148 | stepper motor card with the simple commands which are in the original | ||
149 | Velleman software, like SetIOchannel, ReadADchannel, SendStepCCWFull and | ||
150 | many more, using /dev/velleman. | ||
151 | http://home.wanadoo.nl/hihihi/libk8000.htm | ||
152 | http://home.wanadoo.nl/hihihi/libk8005.htm | ||
153 | http://struyve.mine.nu:8080/index.php?block=k8000 | ||
154 | http://sourceforge.net/projects/libk8005/ | ||