473,804 Members | 2,170 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to recieve or sent data through serial or parallel port?

I am writing program that will recieve or sent data to
selected port (users can select which port they want to
recieve or sent) but I don't know how or whick object I
can use.
Nov 20 '05 #1
2 4894
Hello,

"K.K." <mr*****@hotmai l.com> schrieb:
I am writing program that will recieve or sent data to
selected port (users can select which port they want to
recieve or sent) but I don't know how or whick object I
can use.


Thomas Scheidegger's (aka NETMaster) Serial Port FAQ:

http://makeashorterlink.com/?M2FE42E83

HTH,
Herfried K. Wagner
--
MVP · VB Classic, VB .NET
http://www.mvps.org/dotnet
Nov 20 '05 #2
Hi,

These are two different issues. For serial communications, you use the
Windows serial communications APIs. This may be done by using a .NET class
that wraps the functionality of these APIs using Platform Invoke. I have
example code in my book (see below), and there are several examples
available online, both for VB and C# (example, www.msdn.microsoft.com and
search for 101 VB.NET examples). Or, you can use an ActiveX control, like
the free NETComm.ocx that you can download from my homepage. Lastly, there
is at least one commercial comms product for .NET (go to www.saxsoft.net for
this).

For parallel IO, the only way is to use a kernel-mode device driver. There
are no methods built into Windows for this. To make is easy, you can
download IOocx.ocx from my homepage.

Dick

--
Richard Grier (Microsoft Visual Basic MVP)

See www.hardandsoftware.net for contact information.

Author of Visual Basic Programmer's Guide to Serial Communications, 3rd
Edition ISBN 1-890422-27-4 (391 pages) published February 2002.
Nov 20 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
13201
by: willie | last post by:
Hi, I'm writing a program which requires the use of three serial ports and one parallel port. My application has a scanning devices on each port, which I can access fine with pyserial. However, I'm unsure of how exactly I should be designing the program, I thought I could use threading to start class: class scanner(Thread): def __init__(self,port):
3
4200
by: Erik D | last post by:
Hey, Does anyone know if there is something in C that can read the data transfer in the serial/paralel-port? Or can't that be done with C? THX, Erik
2
1737
by: Sonoman | last post by:
Hi all: I tried searching on the net, but I do not even know what I am looking for. What I want to do is to write aprogram using C++ that will gather data from an external microprocessor, format it and write it to a file for later use. I can handle pretty much everything exept the part where I "listen" to either the serial or parallel (may be USB?) ports for data from the external source. Any help will be greatly appreciated. Sonoman
21
2998
by: The Man With The Harmonica | last post by:
Hi All, What kind of commands can I use to control the serial and parallel port of my pc. I want to use my laptop instead of microcontrollers and write my software in ANSI C to be used for control purposes of sensors and other electronic devices. I haven't done any C for a while now so I would assume my knowledge is that of a beginner now.
6
2568
by: notregister | last post by:
hi, i have been trying to send a printer-ready data to an unknown printer to print. the reason why the printer is unknown is that i do no wish installed any printer driver. so at the end my printing would have to bypass the printer driver.. i have read several article on sending file directly to a printer, but i could not understand how could i get the printername from the ports(especially when there is no driver install)? Can anyone...
4
4561
by: ganesah | last post by:
hi, Im working on a project where i need to send binary format data to serial port and output the exact data through parallel port? could anyone explain me how to do, what language should i use ? If possible please forward me the sample source code....advance thanks........
4
2226
by: ganesah | last post by:
hi, Im working on a project where i need to send binary format data to serial port and output the exact data through parallel port? could anyone explain me how to do it, can i use the C++ language? If possible please forward me sample source code(if there are any) or just send me two source codes(for the serial-input port and parallel-output port) and show me how to merge them to become one complete code. FIY this process happens...
8
37236
by: Ringo | last post by:
I have a micro controller that sends a stream of 102 bytes to the pc. The values range from 0 to 255. I set up my serialport like this sp.BaudRate = 115200; sp.PortName = "COM53"; sp.DataBits = 8; sp.StopBits = System.IO.Ports.StopBits.One; sp.Parity = System.IO.Ports.Parity.None; sp.ReadTimeout = 0; sp.Open();
3
2630
by: =?Utf-8?B?aXdkdTE1?= | last post by:
hi, is there any way i can send raw data out of the VGA port? i need to control an external piece of hardware but i dont have a serial or parallel port on my computer...can it b done this way? thanks -- -iwdu15
0
9715
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9595
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10603
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10353
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10356
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9176
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6869
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
2
3836
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3003
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.