如何使用Vb.Net 2012控制并行端口 [英] How Do I Control Parallel Port Using Vb.Net 2012

查看:73
本文介绍了如何使用Vb.Net 2012控制并行端口的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的项目有点问题



我的程序是用.net 2012编写的,这个想法是当我按下一个数字时它的声音有了它,意思是数字1有一个错误的声音,当我按它数字2有和接受声音,当我按它到目前为止每个想法是好的现在我想控制并行端口所以如果数字1按下< b>红色LED 打开,如果按下数字2,则绿色LED 打开



任何可能导致的想法或链接我在那里!!谢谢

我的操作系统是Windows 8.1

i have a little problem in my project

my program was coded in .net 2012 and the idea was when i press a number its has a sound with it ,means number 1 have an error sound when i press it number 2 have and accept sound when i press it so far every think is ok now i want to control a parallel port so if number 1 pressed the Red LED is on and if number 2 pressed the Green LED is on

any ideas or Links that can leads me there !! thanks
my OS is Windows 8.1

推荐答案

您不希望将LED直接连接到并行端口。有些项目可以告诉你你可以逃脱它,但是如果你不小心并且使用某些端口你可能会炸毁端口,它根本不起作用。



这是可能的,但我建议不要这样做。请参阅这篇文章 [ ^ ]关于如何做的讨论它。



我强烈建议您使用接口板,例如 Phidg​​ets InterfaceKit [ ^ 董事会。如果你搞砸了,更换其中一个比更换你的主板要便宜得多。
You do NOT want to attach LEDs directly to the parallel port. There are projects out there that will tell you you can get away with it, but you risk blowing up the port if you're not careful and with some ports, it won't work at all.

It's possible to do but I recommended against it. See this article[^] for the discussion on how to do it.

I STRONGLY recommend you use an interface board, like a Phidgets InterfaceKit[^] board. If you blow something up, it's much cheaper to replace one of these than it is to replace your motherboard.


请看我对这个问题的评论。您甚至不需要走远: http://www.codeproject。 com / search.aspx?q = control + parallel + port& doctypeid = 1 [ ^ ]。



如您所见,第一个找到的项目甚至是关于通过并行端口控制LED。



唯一可能的问题是:你发现很多文章都是关于本机代码编程的,比如使用C / C ++,而不是。净。在这种情况下,不要气馁;您可以随时使用 P / Invoke ,也许您可​​以找到.NET样本,无论如何您都可以自己编写。



-SA
Please see my comment to the question. You don't even need to go far: http://www.codeproject.com/search.aspx?q=control+parallel+port&doctypeid=1[^].

As you can see, the first found item is even about controlling LED through a parallel port.

The only possible problem is: many article you find will be about native-code programming, such as with C/C++, not for .NET. In this case, don't be discouraged; you can always use P/Invoke, and probably you can find .NET samples, which you can write yourself anyway.

—SA


这篇关于如何使用Vb.Net 2012控制并行端口的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆