← Documents Documentation/i2c/busses/i2c-parport.rst GitHub 원문 ↗

Linux 6.18.37 · I2C Buses

Kernel driver i2c-parport

병렬 포트 I2C 어댑터 유형 9개, 74HC05 자작 회로, Velleman과 JP1 레거시 자료를 설명합니다.

Source pathDocumentation/i2c/busses/i2c-parport.rst
Source versionLinux v6.18.37
TranslationDUJINLABS 전문 번역 + 해설

요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.

1. 요약·해설

원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.

요약·해설

i2c-parport.rst:1-190

자동 감지가 없는 병렬 포트 I2C 어댑터는 정확한 `type`을 지정해야 하며, 5V·10kΩ 풀업·74HC05 오픈 컬렉터 배선과 전류·단락 주의가 핵심입니다.

문서 개요
항목
SourceDocumentation/i2c/busses/i2c-parport.rst
분량190 source lines
지원 유형9
회로기본 + ELV 양방향

원문 분량과 핵심 기능을 요약합니다.

동작 흐름
어댑터 핀 배치 확인`type` 지정74HC05·풀업 연결모듈 로드SCL·SDA 전송

장치 인식부터 기능 제공까지의 순서입니다.

2. 영어 원문 전체

번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.

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

3. 한국어 전문 번역

영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.

통합 병렬 포트 I2C 드라이버

1-40

작성자는 Jean Delvare <[email protected]>입니다. `i2c-parport`는 Philips, Velleman, ELV 등이 만든 여러 I2C-over-parallel-port 어댑터를 위한 통합 드라이버입니다.

이 드라이버는 기존의 개별 드라이버 `i2c-philips-par`, `i2c-elv`, `i2c-velleman`, `video/i2c-parport`를 대체합니다. 마지막 드라이버는 이 드라이버와 같지 않으며 자가 제작 teletext 어댑터 전용이었습니다.

현재 `type=0`부터 `type=8`까지 아홉 가지 배선을 지원합니다.

장치마다 핀 배치가 다르므로 `type` 모듈 매개변수로 보유한 장치를 알려야 합니다. 자동 감지 방법은 없습니다. 필요하면 다른 핀 배치도 쉽게 추가할 수 있습니다.

이전 커널은 Philips용 `type=0`을 기본값으로 사용했지만, 이제 `type` 매개변수가 없으면 드라이버 초기화가 실패합니다.

SMBus alert 선을 병렬 포트의 인터럽트 핀에 올바르게 연결한 어댑터에서는 SMBus alert를 지원합니다.

i2c-parport 지원 유형
유형어댑터
`type=0`Philips adapter
`type=1`자가 제작 teletext adapter
`type=2`Velleman K8000 adapter
`type=3`ELV adapter
`type=4`Analog Devices ADM1032 evaluation board
`type=5`Analog Devices ADM1025, ADM1030, ADM1031 evaluation boards
`type=6`Barco LPT→DVI (K5800236) adapter
`type=7`One For All JP1 parallel port adapter
`type=8`VCT-jig

모듈 매개변수 값과 배선 유형 9개를 보존합니다.

병렬 포트 어댑터 선택
어댑터 모델과 배선 확인`type=0`~`type=8` 선택모듈 로드SCL·SDA 핀 설정선택적으로 SMBus alert IRQ 연결

자동 감지가 없으므로 사용자가 정확한 핀 배치를 선택합니다.

=========================
Kernel driver i2c-parport
=========================

Author: Jean Delvare <[email protected]>

This is a unified driver for several i2c-over-parallel-port adapters,
such as the ones made by Philips, Velleman or ELV. This driver is
meant as a replacement for the older, individual drivers:

 * i2c-philips-par
 * i2c-elv
 * i2c-velleman
 * video/i2c-parport
   (NOT the same as this one, dedicated to home brew teletext adapters)

It currently supports the following devices:

 * (type=0) Philips adapter
 * (type=1) home brew teletext adapter
 * (type=2) Velleman K8000 adapter
 * (type=3) ELV adapter
 * (type=4) Analog Devices ADM1032 evaluation board
 * (type=5) Analog Devices evaluation boards: ADM1025, ADM1030, ADM1031
 * (type=6) Barco LPT->DVI (K5800236) adapter
 * (type=7) One For All JP1 parallel port adapter
 * (type=8) VCT-jig

These devices use different pinout configurations, so you have to tell
the driver what you have, using the type module parameter. There is no
way to autodetect the devices. Support for different pinout configurations
can be easily added when needed.

Earlier kernels defaulted to type=0 (Philips).  But now, if the type
parameter is missing, the driver will simply fail to initialize.

SMBus alert support is available on adapters which have this line properly
connected to the parallel port's interrupt pin.

Analog Devices형 기본 회로

41-76

자가 제작 I2C-over-parallel-port 어댑터를 위한 예제 회로이며, 회로 설계의 공은 Sylvain Munaut에게 있습니다.

장치 측 SCL은 10kΩ 풀업과 오픈 컬렉터 74HC05 인버터를 거쳐 PC 병렬 포트 핀 2의 출력으로 구동합니다. SDA는 10kΩ 풀업을 두고, 입력 감지 경로는 핀 13, 출력 구동 경로는 74HC05를 거쳐 핀 3에 연결합니다.

PC 측 출력 경로에도 10kΩ 저항과 접지 연결을 사용하며, 회로의 공통 기준은 병렬 포트 GND입니다.

기본 i2c-parport 배선
I2C 신호병렬 포트 핀방향·회로
SCLpin 2PC 출력 → 74HC05 오픈 컬렉터 → SCL, 10kΩ Vdd 풀업
SDA 입력pin 13SDA → 입력 경로 → PC 상태 입력, 10kΩ Vdd 풀업
SDA 출력pin 3PC 출력 → 74HC05 오픈 컬렉터 → SDA
전원선택적 data pinsVdd는 5V, 전류 제한 주의
접지pins 18-25모두 GND에 연결

첫 번째 ASCII 회로를 신호별 연결 표로 다시 그렸습니다.

기본 회로 신호 경로
5V Vdd에서 SCL·SDA를 10kΩ로 풀업pin 2가 74HC05를 통해 SCL을 낮춤pin 3이 74HC05를 통해 SDA를 낮춤pin 13이 SDA 상태를 읽음pins 18-25가 공통 GND 제공

오픈 컬렉터 출력과 풀업으로 I2C 유선 AND 동작을 만듭니다.

Building your own adapter
-------------------------

If you want to build you own i2c-over-parallel-port adapter, here is
a sample electronics schema (credits go to Sylvain Munaut)::

  Device                                                      PC
  Side          ___________________Vdd (+)                    Side
                 |    |         |
                ---  ---       ---
                | |  | |       | |
                |R|  |R|       |R|
                | |  | |       | |
                ---  ---       ---
                 |    |         |
                 |    |    /|   |
  SCL  ----------x--------o |-----------x-------------------  pin 2
                      |    \|   |       |
                      |         |       |
                      |   |\    |       |
  SDA  ----------x----x---| o---x---------------------------  pin 13
                 |        |/            |
                 |                      |
                 |         /|           |
                 ---------o |----------------x--------------  pin 3
                           \|           |    |
                                        |    |
                                       ---  ---
                                       | |  | |
                                       |R|  |R|
                                       | |  | |
                                       ---  ---
                                        |    |
                                       ###  ###
                                       GND  GND

회로 주의사항과 ELV 호환 배선

77-140

이 회로는 Analog Devices 평가 보드에서 실제 사용하는 핀 배치와 전자 회로입니다. 모든 인버터는 오픈 컬렉터 출력인 74HC05여야 하며, 모든 저항은 10kΩ입니다. 병렬 포트 핀 18~25는 GND에 연결합니다.

드라이버가 핀을 high로 구동하므로 핀 4~9(D2~D7)를 Vdd로 사용할 수 있습니다. ADM1032 평가 보드는 D4~D7을 사용합니다. 다만 병렬 포트에서 끌어올 수 있는 전류는 제한적입니다.

연결된 모든 전원선은 반드시 같은 상태로 구동해야 합니다. 그렇지 않으면 출력 버퍼를 단락시킵니다. 초기화 전 데이터선 상태를 알 수 없으므로 `i2c-parport` 모듈을 로드한 뒤 I2C 어댑터를 꽂는 것이 안전할 수 있습니다.

이 회로는 5V입니다. 기본 회로에서는 SCL을 읽을 수 없어 엄밀히 표준을 준수하지 않습니다. SDA 입력 부분을 복사해 다른 입력 핀에 연결하면 SCL 읽기를 쉽게 추가할 수 있으며, 그러면 ELV 호환 핀 배치가 됩니다.

ELV 호환 배선은 SCL 입력을 pin 15, SCL 출력을 pin 2, SDA 입력을 pin 10, SDA 출력을 pin 3에 둡니다. 각 버스선은 10kΩ로 Vdd에 풀업하고 출력은 74HC05 오픈 컬렉터 인버터로 구동합니다.

가능하면 기존 어댑터와 같은 핀 배치를 사용해야 코드 변경 없이 동작시킬 수 있습니다.

ELV 호환 양방향 배선
신호병렬 포트 핀연결
SCL 입력pin 15SCL → 74HC05 입력 경로 → PC
SCL 출력pin 2PC → 74HC05 오픈 컬렉터 → SCL
SDA 입력pin 10SDA → 74HC05 입력 경로 → PC
SDA 출력pin 3PC → 74HC05 오픈 컬렉터 → SDA
풀업SCL·SDA각각 10kΩ, 5V Vdd
접지pins 18-25공통 GND

두 번째 ASCII 회로를 SCL·SDA의 입력 및 출력 경로로 구조화했습니다.

ELV 호환 회로
SCL·SDA를 10kΩ로 5V에 풀업pin 2로 SCL 오픈 컬렉터 구동pin 15로 SCL 상태 읽기pin 3으로 SDA 오픈 컬렉터 구동pin 10으로 SDA 상태 읽기

SCL과 SDA 모두 읽기·쓰기가 가능한 연결입니다.

Remarks:
 - This is the exact pinout and electronics used on the Analog Devices
   evaluation boards.
 - All inverters::

                   /|
                 -o |-
                   \|

   must be 74HC05, they must be open collector output.
 - All resistors are 10k.
 - Pins 18-25 of the parallel port connected to GND.
 - Pins 4-9 (D2-D7) could be used as VDD is the driver drives them high.
   The ADM1032 evaluation board uses D4-D7. Beware that the amount of
   current you can draw from the parallel port is limited. Also note that
   all connected lines MUST BE driven at the same state, else you'll short
   circuit the output buffers! So plugging the I2C adapter after loading
   the i2c-parport module might be a good safety since data line state
   prior to init may be unknown.
 - This is 5V!
 - Obviously you cannot read SCL (so it's not really standard-compliant).
   Pretty easy to add, just copy the SDA part and use another input pin.
   That would give (ELV compatible pinout)::


      Device                                                      PC
      Side          ______________________________Vdd (+)         Side
                     |    |            |    |
                    ---  ---          ---  ---
                    | |  | |          | |  | |
                    |R|  |R|          |R|  |R|
                    | |  | |          | |  | |
                    ---  ---          ---  ---
                     |    |            |    |
                     |    |      |\    |    |
      SCL  ----------x--------x--| o---x------------------------  pin 15
                          |   |  |/         |
                          |   |             |
                          |   |   /|        |
                          |   ---o |-------------x--------------  pin 2
                          |       \|        |    |
                          |                 |    |
                          |                 |    |
                          |      |\         |    |
      SDA  ---------------x---x--| o--------x-------------------  pin 10
                              |  |/              |
                              |                  |
                              |   /|             |
                              ---o |------------------x---------  pin 3
                                  \|             |    |
                                                 |    |
                                                ---  ---
                                                | |  | |
                                                |R|  |R|
                                                | |  | |
                                                ---  ---
                                                 |    |
                                                ###  ###
                                                GND  GND


If possible, you should use the same pinout configuration as existing
adapters do, so you won't even have to change the code.

비슷하지만 다른 드라이버

141-155

이 드라이버는 i2c 패키지의 `i2c-pport` 드라이버와 같지 않습니다. `i2c-pport`는 현대 병렬 포트 기능을 사용하므로 추가 전자 회로가 필요 없지만 다른 제약이 있으며 당시 Linux 2.6으로 포팅되지 않았습니다.

또한 lm_sensors 패키지의 `i2c-pcf-epp`와도 다릅니다. `i2c-pcf-epp`는 병렬 포트를 I2C 버스로 직접 사용하지 않고 외부 I2C 버스 마스터를 제어하는 데 사용합니다. 이 드라이버 역시 당시 Linux 2.6으로 포팅되지 않았습니다.

병렬 포트 I2C 드라이버 비교
드라이버병렬 포트 사용추가 회로·상태
`i2c-parport`SCL·SDA를 직접 구동간단한 외부 회로 사용
`i2c-pport`현대 병렬 포트 기능 사용추가 회로 불필요, Linux 2.6 미포팅
`i2c-pcf-epp`외부 I2C 버스 마스터 제어Linux 2.6 미포팅

이름이 비슷한 세 구현의 차이를 구분합니다.

올바른 드라이버 선택
병렬 포트 하드웨어 구조 확인직접 SCL·SDA 구동이면 `i2c-parport`고급 병렬 포트 기능이면 `i2c-pport` 검토외부 버스 마스터면 `i2c-pcf-epp` 검토커널 포팅 상태 확인

하드웨어가 버스를 직접 구동하는지 외부 마스터를 제어하는지 구분합니다.


Similar (but different) drivers
-------------------------------

This driver is NOT the same as the i2c-pport driver found in the i2c
package. The i2c-pport driver makes use of modern parallel port features so
that you don't need additional electronics. It has other restrictions
however, and was not ported to Linux 2.6 (yet).

This driver is also NOT the same as the i2c-pcf-epp driver found in the
lm_sensors package. The i2c-pcf-epp driver doesn't use the parallel port as
an I2C bus directly. Instead, it uses it to control an external I2C bus
master. That driver was not ported to Linux 2.6 (yet) either.

Velleman 어댑터의 레거시 자료

156-178

Velleman 웹사이트는 `http://www.velleman.be/`이고 K8000 Howto는 `http://howto.htlw16.ac.at/k8000-howto.html`에 있습니다.

이 프로젝트는 Velleman K8000과 K8005용 새 라이브러리 `LIBK8000 v1.99.1` 및 `LIBK8005 v0.21`로 이어졌습니다.

이 라이브러리를 사용하면 `/dev/velleman`을 통해 원래 Velleman 소프트웨어의 `SetIOchannel`, `ReadADchannel`, `SendStepCCWFull` 같은 간단한 명령으로 K8000 인터페이스 카드와 K8005 스테퍼 모터 카드를 제어할 수 있습니다.

관련 자료 주소는 `http://home.wanadoo.nl/hihihi/libk8000.htm`, `http://home.wanadoo.nl/hihihi/libk8005.htm`, `http://struyve.mine.nu:8080/index.php?block=k8000`, `http://sourceforge.net/projects/libk8005/`입니다.

Velleman 레거시 구성
대상자료·인터페이스
K8000`LIBK8000 v1.99.1`
K8005`LIBK8005 v0.21`
장치 파일`/dev/velleman`
예제 명령`SetIOchannel`, `ReadADchannel`, `SendStepCCWFull`
Howto`http://howto.htlw16.ac.at/k8000-howto.html`

카드, 라이브러리, 장치 파일과 명령을 정리합니다.

Velleman 카드 제어
LIBK8000 또는 LIBK8005 로드Velleman 호환 명령 호출`/dev/velleman` 접근K8000 I/O 또는 K8005 모터 제어

사용자 명령이 라이브러리와 장치 파일을 거쳐 카드에 전달됩니다.

Legacy documentation for Velleman adapter
-----------------------------------------

Useful links:

- Velleman                http://www.velleman.be/
- Velleman K8000 Howto    http://howto.htlw16.ac.at/k8000-howto.html

The project has lead to new libs for the Velleman K8000 and K8005:

  LIBK8000 v1.99.1 and LIBK8005 v0.21

With these libs, you can control the K8000 interface card and the K8005
stepper motor card with the simple commands which are in the original
Velleman software, like SetIOchannel, ReadADchannel, SendStepCCWFull and
many more, using /dev/velleman.

  - http://home.wanadoo.nl/hihihi/libk8000.htm
  - http://home.wanadoo.nl/hihihi/libk8005.htm
  - http://struyve.mine.nu:8080/index.php?block=k8000
  - http://sourceforge.net/projects/libk8005/

One For All JP1 어댑터

179-190

JP1 프로젝트는 배터리실의 6핀 점퍼를 통해 내부 구성 EEPROM이 연결된 I2C 버스를 외부에 노출하는 여러 리모컨을 다룹니다.

자세한 프로젝트 정보는 `http://www.hifi-remote.com/jp1/`에서, 단순한 병렬 포트 하드웨어의 세부 사항은 `http://www.hifi-remote.com/jp1/hardware.shtml`에서 확인할 수 있습니다.

JP1 연결 정보
항목내용
대상One For All JP1 remote controls
내부 장치구성 EEPROM
노출 인터페이스I2C bus
커넥터배터리실 6핀 점퍼
프로젝트`http://www.hifi-remote.com/jp1/`
하드웨어`http://www.hifi-remote.com/jp1/hardware.shtml`

리모컨 내부 EEPROM과 병렬 포트 어댑터의 관계입니다.

JP1 EEPROM 접근
리모컨 구성 EEPROM내부 I2C 버스배터리실 6핀 JP1 점퍼JP1 병렬 포트 어댑터PC 병렬 포트

리모컨의 점퍼에서 병렬 포트까지의 경로입니다.

One For All JP1 parallel port adapter
-------------------------------------

The JP1 project revolves around a set of remote controls which expose
the I2C bus their internal configuration EEPROM lives on via a 6 pin
jumper in the battery compartment. More details can be found at:

http://www.hifi-remote.com/jp1/

Details of the simple parallel port hardware can be found at:

http://www.hifi-remote.com/jp1/hardware.shtml