6 / 6 / 0
Регистрация: 29.06.2018
Сообщений: 1,536
|
|
1 | |
Работа с портом LPT в линуксе02.12.2018, 21:24. Показов 7996. Ответов 4
Метки нет (Все метки)
Как управлять портом /dev/lp0 в линуксе (например, если карта на CH382 или динамодовская )? Как обеспечить управление направлением , ввод и вывод байта данных , чтение регистров адрес+1, адрес +2 , визуализировать их состояние ?
0
|
02.12.2018, 21:24 | |
Ответы с готовыми решениями:
4
Работа с LPT портом Работа с LPT портом Работа с LPT портом. Работа с LPT портом |
6 / 6 / 0
Регистрация: 29.06.2018
Сообщений: 1,536
|
||||||
02.12.2018, 22:49 [ТС] | 3 | |||||
https://www.tldp.org/HOWTO/pdf... amming.pdf
Добавлено через 6 минут
Как использовать ReadFile , WriteFile, CreateFile , GetCommState для LPT? А в линуксе для CH382 ? Когда будут драйвера ? Добавлено через 2 минуты http://forums.codeguru.com/sho... PT-problem Добавлено через 1 минуту http://www.kernelchip.ru/pcports/PS004.php Добавлено через 2 минуты http://www.qrx.narod.ru/komp/r_prin.htm Добавлено через 1 минуту http://www.cyberguru.ru/progra... l=&start=2 Добавлено через 33 секунды http://ivt-margtu.narod.ru/ipu/t15.html Добавлено через 51 секунду http://proga-school.narod.ru/M... OM_LPT.htm Добавлено через 1 минуту http://sarfti.ru/wp-content/up... ktikum.pdf Добавлено через 1 минуту http://silver-dog.narod.ru/hands/ports/ports.htm Добавлено через 1 минуту http://www.algopas.narod.ru/sys/lptdos.htm
0
|
Почетный модератор
11525 / 4320 / 448
Регистрация: 12.06.2008
Сообщений: 12,412
|
|
02.12.2018, 23:03 | 4 |
Судя по истории git'а, Linux умеет с ним работать:
parport: Add support for the WCH382 2S/1P multi-IO card Вот описание по работе с LPT-портом в трёх режимах (через raw IO, через /dev/lp и через /dev/parport) https://mockmoon-cybernetics.c... rport.html
0
|
6 / 6 / 0
Регистрация: 29.06.2018
Сообщений: 1,536
|
||||||
03.12.2018, 00:39 [ТС] | 5 | |||||
А в стиле Access via /dev/lp, Full access via /dev/parport только для /dev/usblp0 , /dev/usb/lp0 для PL2305 (VEN11,VEN12)
(http://www.prolific.com.tw/US/... =6&pcid=41 , http://fen.pl/pub/sterowniki/P... 05_v11.pdf )? Добавлено через 47 секунд 067B:2305 по lsusb Добавлено через 3 минуты https://www.linuxquestions.org... rt-654695/ Добавлено через 25 минут Из https://www.tldp.org/HOWTO/pdf... amming.pdf The port BASE+0 (Data port) controls the data signals of the port (D0 to D7 for bits 0 to 7, respectively; states: 0 = low (0 V), 1 = high (5 V)). A write to this port latches the data on the pins. A read returns the data last written in standard or extended write mode, or the data in the pins from another device in extended read mode. The port BASE+1 (Status port) is read−only, and returns the state of the following input signals: • Bits 0 and 1 are reserved. • Bit 2 IRQ status (not a pin, I don't know how this works) • Bit 3 ERROR (1=high) • Bit 4 SLCT (1=high) • Bit 5 PE (1=high) • Bit 6 ACK (1=high) • Bit 7 −BUSY (0=high) The port BASE+2 (Control port) is write−only (a read returns the data last written), and controls the following status signals: • Bit 0 −STROBE (0=high) • Bit 1 −AUTO_FD_XT (0=high) • Bit 2 INIT (1=high) • Bit 3 −SLCT_IN (0=high) • Bit 4 enables the parallel port IRQ (which occurs on the low−to−high transition of ACK) when set to 1. • Bit 5 controls the extended mode direction (0 = write, 1 = read), and is completely write−only (a read returns nothing useful for this bit). • Bits 6 and 7 are reserved. Pinout (a 25−pin female D−shell connector on the port) (i=input, o=output): 1io −STROBE, 2io D0, 3io D1, 4io D2, 5io D3, 6io D4, 7io D5, 8io D6, 9io D7, 10i ACK, 11i −BUSY, 12i PE, 13i SLCT, 14o −AUTO_FD_XT, 15i ERROR, 16o INIT, 17o −SLCT_IN, 18−25 Ground для PL2305 распиновка разъема на 36 контактов: https://uk.wikipedia.org/wiki/IEEE_1284 Добавлено через 1 минуту Для примера кода
0
|
03.12.2018, 00:39 | |
03.12.2018, 00:39 | |
Помогаю со студенческими работами здесь
5
Работа с LPT портом в С++Builder Работа с LPT- портом на CH382L Работа с LPT- портом в Win32Forth Работа с LPT-портом из ВСВ 6 Искать еще темы с ответами Или воспользуйтесь поиском по форуму: |