473,396 Members | 2,147 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

C# I\O Port Control using Parallel Port from PC

Dear All,

I am trying to interface the above application with a reference of CodeProject: I/O Ports Uncensored - 1 - Controlling LEDs (Light Emiting Diodes) with Parallel Port. Free source code and programming help. The coding wise is ok no error but I don't know too much about the voltage of interfacing of LPT. After I connect the cable from LPT to bread board(project borad), all LED turn on without any debugging from this example. Now, I am searching a way how to overcome this issue in a hurry mode. So pls advise me some one in here and looking forward to hearing from anyone.


Thanks
Jan 16 '09 #1
6 16579
vekipeki
229 Expert 100+
This doesn't have much to do with programming, but:

If you are driving your LEDs directly from the port as drawn here (which doesn't seem like the best idea because you can easily burn your port):



they should be lit when your outputs are set to '1' (check the output using a voltmeter).

If they are grounded, and your LEDs are lit, then you probably connected them over a transistor or some optocoupled circuit (which is the right way to go), and you might just have reversed the logic ("1" is off, "0" is on).
Jan 16 '09 #2
Hi,


Thanks for your reply and help. I follow your comments and did the [COLOR=#105cb6]CodeProject: I/O Ports Uncensored - 1 - Controlling LEDs (Light Emiting Diodes) with Parallel Port.[/COLOR] but couldn't managed to control even in one pin for input and output. I suspect the vista even i made the correct wiring and no issue for building and debugging so pls advice ne asap coz I am in a hurry mode.



Best regards
Jan 19 '09 #3
@vekipeki

Hi,

I don't know why this inpout32.dll can't add in the reference and show error "it is a valid assembly or component". So far, I knew it was built and compiled in VC++. Is there any difference to load dll of VC++ and C#?
I am looking forward to hearing from you.


Thanks and best regards
Jan 19 '09 #4
vekipeki
229 Expert 100+
You cannot reference a Win32 dll in C#, you can only use P/Invoke to call individual functions.

Basically, if you have a C++ header file, you will have to add extern methods with a DllImport attribute for all functions that you want to access.

Check this link: How to interface and access parallel ports(printer port) in C# (CSharp) programming using inpout32.dll
Jan 19 '09 #5
Hi,


Thanks for ur prompt reply but still no data output from parallel port from pc to my bread board althuogh I am using same as ur comments.
I suspect Windows Vista coz Inpout32.dll can use upto WinXP and Vista had lots of secutiry right to block output and so far I found mostly used this kind of interfacing in XP.
In this link show, registry denied OASIS - SCParallelPortLibraryForNet.zip
pls advice me for that.

Best regards
Jan 19 '09 #6
vekipeki
229 Expert 100+
Please be a bit clearer, what do you mean be 'registry denied'?

I entered Inpout32.dll in Google and found a couple of links stating that it is compatible with Vista, are you sure that it doesn't work? You will probably have to install a driver of some sort in any case.
Jan 20 '09 #7

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: David Wigg | last post by:
I am trying to use a dll to control a parallel port. The instructions tell me what to do to output data to the data lines and how to read them by making the port bidirectional via the control...
9
by: MNQ | last post by:
Hi All I want to use my parallel port of my PC to control some external devices. I am writing a program in ANSI C using the PacificC compiler. What I need to know is how to access the parallel...
0
by: navalha | last post by:
I'm trying to run pyparallel to control de parallel port in python but i cant, because it doesnt find pyparallelioctl.py, and i cant find it anywhere in the internet does anyone have any ideas...
1
by: bass29 | last post by:
hi! i made a program in vb that controls the data port of the parallel port.. all is working properly, but i want to control the parallel port remotely. the problem is i dont know how to send the...
0
by: saptharishi123 | last post by:
please help me and anyone send vb code to control robot(back, front, right, left) using vb.and also to insert a video window to view video from tv tuner card,and if possible to show the status of...
3
by: thye | last post by:
Hi, I'm a very beginner in C++.....:) How to start a new project? Whats the simple code to control parallel port? Can show me step by step? Thanks a lot........
1
by: abhinav7777 | last post by:
Hi!! I'm Final Year Student(CS).. I'm developing a project which is a prototype of a SPY Vehicle.. I want to know how to access parallel port using C/C++ , VB.Net or Java. Anybody having...
4
by: Soren | last post by:
Hi, I want to control some motors using the parallel port.. however, my laptop does not have any parallel ports (very few do). What I do have is a USB->Parallel converter... I thought about...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.