Solved

Communication with devices connected to serial com or parallel ports

Posted on 1998-09-01
4
183 Views
Last Modified: 2013-11-20
How can I communicte with devices connected to my PC serial
or pralllel ports when developing my application using MFC

Thanks and regards,
Neo
0
Comment
Question by:essneo
  • 2
4 Comments
 
LVL 23

Accepted Solution

by:
chensu earned 50 total points
ID: 1321587
A process uses the CreateFile function to open a handle to a communications resource. For example, specifying COM1 opens a handle to a serial port, and LPT1 opens a handle to a parallel port.

There is full documentation in the Platform SDK.
Platform SDK\Windows Base Services\Files and I/O\Communications.
0
 

Author Comment

by:essneo
ID: 1321588
Thanks for your answer.

But where can I find the full documentation.

Best regards,
Neo
0
 
LVL 23

Expert Comment

by:chensu
ID: 1321589
It should come with Visual C++. You may search for BuildCommDCB function first and click the Communications Overview link. If you want the latest one, you may install the Platform SDK Jan 1998 on the MSDN CDs. Or you can access the online documentation at http://msdn.microsoft.com/developer/, you need to register first.
0
 
LVL 2

Expert Comment

by:warmcat
ID: 1321590
Ess-oh,

Communication with the serial ports is chensu suggests, and for output using centronics protocol, parallel ports can also be driven by CreateFile() as he says.

For docs on CreateFile, etc, see the help system that comes with Visual C++, or subscribe to MSDN for more data (see http://msdn.microsoft.com/developer/default.htm)

If your peripheral is using any other protocol than centronics nSTB -> nACK/BUSY or using the status lines to read back data, then you must take control of the parallel port yourself.  See http://warmcat.com/parallel for more information.

Regards,

-Andy
0

Featured Post

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

Introduction: The undo support, implementing a stack. Continuing from the eigth article about sudoku.   We need a mechanism to keep track of the digits entered so as to implement an undo mechanism.  This should be a ‘Last In First Out’ collec…
Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

708 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now