简体   繁体   English

c#LPT控制所有引脚。 不是8

[英]c# LPT Control all pins. Not 8

I can control 8 pins in LPT using inpout.dll. 我可以使用inpout.dll控制LPT中的8个引脚。 I want to control some LPT device but I need to use more than 8 pins. 我想控制一些LPT设备,但我需要使用8个以上的引脚。 How to do it? 怎么做?

例

It can be COM or NET dll. 它可以是COM或NET dll。 I have no idea how to control more than 8 pins. 我不知道如何控制8个以上的引脚。

MUX maybe? 可能是MUX

It can help you manipulate certain amount of bits by using less bits. 它可以通过减少使用位数来帮助您处理一定数量的位数。 By using 7 of them you could use the last X to multiplex others: 通过使用其中的7个,您可以使用最后一个X来复用其他多个:

6 (data) + 1 (selector) => 12 bits 6(数据)+ 1(选择器)=> 12位
5 + 2 => 20 bits 5 + 2 => 20位
4 + 3 => 32 bits 4 + 3 => 32位
3 + 4 => 48 bits 3 + 4 => 48位
2 + 5 => 64 bits 2 + 5 => 64位

But this is not a programming question anyway. 但这毕竟不是编程问题。 You will have to attach a multiplexer and a demultiplexer on the other side. 您将不得不在另一侧连接一个多路复用器和一个多路解复用器。

BTW: What kind of an LPT port is this, since [LPT port has lots of pins]. 顺便说一句,这是什么样的LPT端口,因为[LPT端口有很多引脚]。 25 and not just 7 or 8. Your holes for a connector are not really related to LPT port. 25,而不仅仅是7或8。连接器的孔与LPT端口没有真正的关系。 At least it doesn't really look like they would be. 至少看起来并没有真正的样子。 Unless they are serialized. 除非将它们序列化。 It seems there are 4 LPT ports on your connector + enable, ground & power supply (Vcc) 看来您的连接器上有4个LPT端口+启用,接地和电源(Vcc)

http://www.codeproject.com/KB/vb/Inpout32_read.aspx它在VB.NET中,但是我确定您可以弄清楚如何翻译它;)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM